/* ===== MOTOPULSE GLOBAL STYLES — LIGHT THEME ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #F4F6FA;
    color: #1B2E5E;
    overflow-x: hidden;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.18;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(27, 46, 94, 0.12);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(27, 46, 94, 0.15);
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-diamond {
    font-size: 32px;
    color: #14532D;
    margin-bottom: 8px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1B2E5E;
}

.logo-tagline {
    font-size: 11px;
    letter-spacing: 2px;
    color: #16A34A;
    margin-top: 6px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: #14532D;
    margin-bottom: 6px;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: #FFFFFF;
    border: 1px solid #D1D9E6;
    border-radius: 8px;
    color: #1B2E5E;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #16A34A;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #14532D;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #16A34A;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: #64748B;
}

.form-footer a {
    color: #14532D;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #B91C1C;
}

.alert-success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: #15803D;
}

.app-body {
    background-color: #F4F6FA;
    min-height: 100vh;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    padding: 14px 32px;
    box-shadow: 0 2px 8px rgba(27, 46, 94, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-logo {
    font-size: 18px;
    font-weight: 700;
    color: #1B2E5E;
    letter-spacing: 1px;
}

.navbar-center {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #F0FDF4;
    color: #14532D;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    font-size: 13px;
    color: #1B2E5E;
    font-weight: 600;
}

.navbar-role {
    color: #16A34A;
    font-weight: 400;
    text-transform: capitalize;
}

.navbar-logout {
    color: #DC2626;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-logout:hover {
    background: #FEE2E2;
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 32px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1B2E5E;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: #64748B;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(27, 46, 94, 0.05);
}

.kpi-label {
    font-size: 12px;
    color: #64748B;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1B2E5E;
}

.kpi-value.green { color: #16A34A; }
.kpi-value.red { color: #DC2626; }
.kpi-value.blue { color: #2563EB; }

.section-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(27, 46, 94, 0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1B2E5E;
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94A3B8;
    font-size: 14px;
}

/* ===== BUTTONS (Add / Cancel) ===== */
.btn-add {
    display: inline-block;
    background: #14532D;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: #16A34A;
}

.btn-cancel {
    display: inline-block;
    background: #FFFFFF;
    color: #64748B;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #F4F6FA;
}

/* ===== DATA TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 2px solid #E2E8F0;
}

.data-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #1B2E5E;
    border-bottom: 1px solid #F1F5F9;
}

.data-table tbody tr:hover {
    background: #F9FAFB;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-active {
    background: #DCFCE7;
    color: #15803D;
}

.status-part-time {
    background: #DBEAFE;
    color: #1D4ED8;
}

.status-off-duty {
    background: #FEE2E2;
    color: #B91C1C;
}

/* ===== ACTION LINKS (Edit / Delete) ===== */
.action-link {
    font-size: 13px;
    font-weight: 600;
    color: #2563EB;
    text-decoration: none;
    margin-right: 12px;
}

.action-link:hover {
    text-decoration: underline;
}

.action-delete {
    color: #DC2626;
}


/* ===== LOYALTY TIER BADGES ===== */
.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tier-platinum {
    background: #E0E7FF;
    color: #4338CA;
}

.tier-gold {
    background: #FEF3C7;
    color: #B45309;
}

.tier-silver {
    background: #F1F5F9;
    color: #475569;
}

.tier-standard {
    background: #F9FAFB;
    color: #94A3B8;
}


/* ===== WORK ORDER STATUS BADGES (additional colors) ===== */
.status-pending {
    background: #DBEAFE;
    color: #1D4ED8;
}

.status-in-progress {
    background: #FED7AA;
    color: #C2410C;
}

.status-waiting-parts {
    background: #FEF3C7;
    color: #B45309;
}

.status-completed {
    background: #DCFCE7;
    color: #15803D;
}

.status-cancelled {
    background: #FEE2E2;
    color: #B91C1C;
}


/* ===== PARTS STOCK STATUS BADGES ===== */
.status-in-stock {
    background: #DCFCE7;
    color: #15803D;
}

.status-low-stock {
    background: #FEF3C7;
    color: #B45309;
}

.status-out-of-stock {
    background: #FEE2E2;
    color: #B91C1C;
}


/* ===== POPUP / MODAL (Parts Picker) ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 46, 94, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-box {
    background: #FFFFFF;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #E2E8F0;
    font-size: 16px;
    font-weight: 700;
    color: #1B2E5E;
}

.popup-close {
    cursor: pointer;
    font-size: 24px;
    color: #94A3B8;
    line-height: 1;
}

.popup-close:hover {
    color: #DC2626;
}

.popup-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.popup-body .data-table tbody tr:hover {
    background: #F0FDF4;
}


/* ===== SEARCH BAR ===== */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #D1D9E6;
    border-radius: 8px;
    font-size: 14px;
    color: #1B2E5E;
    background: #FFFFFF;
    max-width: 400px;
}

.search-input:focus {
    outline: none;
    border-color: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.btn-search {
    padding: 10px 20px;
    background: #1B2E5E;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #2563EB;
}

.btn-clear {
    padding: 10px 16px;
    background: #F1F5F9;
    color: #64748B;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-clear:hover {
    background: #E2E8F0;
}

.search-results-count {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 12px;
}

.search-highlight {
    background: #FEF9C3;
    padding: 1px 3px;
    border-radius: 3px;
}