/* Global Styles – Design tokens for consistency and WCAG AA contrast */
:root {
    --bg-primary: #e8ecf7;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #1a1d24;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --accent-primary: #4f46e5;
    --accent-secondary: #6366f1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    background-image: linear-gradient(135deg, #e0e7ff 0%, #e8ecf7 50%, #f3e8ff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

/* Login Container */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
 
.login-box {
    background: var(--bg-surface);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
}
 
.register-box {
    max-width: 550px;
}
 
.logo {
    text-align: center;
    margin-bottom: 30px;
}
 
.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 5px;
}
 
.logo p {
    color: #666;
    font-size: 14px;
}
 
/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}
 
.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}
 
.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}
 
/* Form Styles */
.login-form {
    margin-bottom: 20px;
}
 
.form-group {
    margin-bottom: 20px;
}
 
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}
 
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: white;
}
 
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}
 
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}
 
.form-group select:hover {
    border-color: #667eea;
}
 
.form-group textarea {
    resize: vertical;
    font-family: inherit;
}
 
/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}
 
.btn-primary {
   background: linear-gradient(135deg, #5f72ff 0%, #9b23ea 100%);
    color: white;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
 
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(95, 114, 255, 0.4);
}
 
.btn-secondary {
    background: #6c757d;
    color: white;
}
 
.btn-secondary:hover {
    background: #5a6268;
}
 
.btn-warning {
    background: #ffc107;
    color: #000;
}
 
.btn-warning:hover {
    background: #e0a800;
}
 
.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}
 
/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
 
.login-footer p {
    color: #666;
    font-size: 14px;
}
 
.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}
 
.login-footer a:hover {
    text-decoration: underline;
}
 
/* Test Accounts */
.test-accounts {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}
 
.test-accounts h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #495057;
}
 
.account-info {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
    font-family: 'Courier New', monospace;
}
 
/* Header */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content .logo a {
    color: #667eea;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: #667eea;
}

.main-nav a.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #333;
    font-weight: 500;
}
 
/* Dashboard */
.dashboard-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    flex: 1; 
    position: relative;
    z-index: 2; 
   
}

/* Contact page should use full desktop width */
.dashboard-container.contact-page-container {
    max-width: 100%;
}

.dashboard-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 20px;
    z-index: -1;
}
 
.welcome-section {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 50px 60px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}
 
.welcome-section h1 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 36px;
    font-weight: 700;
}
 
.role-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}
 
.role-customer {
    background: #28a745;
}
 
.role-technician {
    background: #17a2b8;
}
 
.role-administrator {
    background: #dc3545;
}
 
/* Dashboard Grid – balanced columns at 1080p, no full-width stretch */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
 
.dashboard-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
 
.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-secondary);
}
 
.dashboard-card h2 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}
 
.dashboard-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.dashboard-card h3, .dashboard-card h4{
    margin-bottom: 8px; 
}
 
.card-stats {
    margin: 15px 0;
}
 
.stat {
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
}
 
.dashboard-card .btn {
    width: 100%;
    margin-top: auto;
}

/* Dashboard card buttons: same purple as primary for consistency */
.dashboard-card .btn-primary,
.dashboard-card .btn-secondary {
    background: linear-gradient(135deg, #5f72ff 0%, #9b23ea 100%);
    color: white;
    border: none;
}
.dashboard-card .btn-secondary:hover,
.dashboard-card .btn-primary:hover {
    background: linear-gradient(135deg, #4f62ee 0%, #8a1ed9 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(95, 114, 255, 0.4);
}
 
.full-width {
    grid-column: 1 / -1;
}

/* Contact page: feedback fills remaining space, system info fixed on right */
.dashboard-container.contact-page-container .dashboard-grid.contact-layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.dashboard-container.contact-page-container .dashboard-grid.contact-layout .feedback-card {
    grid-column: 1;
}

.dashboard-container.contact-page-container .dashboard-grid.contact-layout .contact-system-info {
    grid-column: 2;
}

@media (max-width: 900px) {
    .dashboard-container.contact-page-container .dashboard-grid.contact-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-container.contact-page-container .dashboard-grid.contact-layout .feedback-card,
    .dashboard-container.contact-page-container .dashboard-grid.contact-layout .contact-system-info {
        grid-column: 1;
    }
}
 
.activity-list {
    padding: 15px 0;
}
 
.activity-list p {
    color: #999;
    font-style: italic;
}
 
.system-info {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}
 
.system-info h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}
 
.system-info p {
    margin: 5px 0;
    color: var(--text-secondary);
}
 
/* Dashboard Table */
.dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 10px;
    overflow: hidden; 
}
 
.dashboard-table thead {
    background: var(--bg-primary);
}
 
.dashboard-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}
 
.dashboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.dashboard-table tbody tr{ 
    transition: background 0.2s ease ; 
}
 
.dashboard-table tbody tr:hover {
    background: #f9faff; 
}


 
/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
 
.priority-standard {
    background: #e9ecef;
    color: #495057;
}
 
.priority-priority {
    background: #fff3cd;
    color: #856404;
}
 
/* Footer */
.main-footer {
    background: var(--bg-surface);
    margin-top: auto;
    padding: 30px 0 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--border-color);
}
 
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}
 
.footer-section h3,
.footer-section h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
}
 
.footer-section p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}
 
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}
 
.footer-bottom p {
    color: #999;
    font-size: 13px;
}
 
/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
 
    .main-nav {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
 
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
 
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .status-submitted{
        background: #fff3cd;
        color: #856404;
    }

    .status-approved {
        background: #d1ecf1;
        color: #0c5460; 
    }

    .status-processing {
    background: #e7e3ff;
    color: #5a4fcf;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

}