/* English Family Car Rental Dashboard Styles - Matching provided UI */

:root {
    --efcr-primary: #1a3a5c;
    --efcr-primary-dark: #0d2137;
    --efcr-accent: #f5c518;
    --efcr-accent-hover: #e0b000;
    --efcr-bg: #f0f4f8;
    --efcr-card: #ffffff;
    --efcr-text: #1a2b3c;
    --efcr-muted: #6b7c8f;
    --efcr-success: #22c55e;
    --efcr-warning: #f59e0b;
    --efcr-danger: #ef4444;
    --efcr-info: #3b82f6;
    --efcr-purple: #8b5cf6;
    --efcr-sidebar-width: 260px;
    --efcr-radius: 12px;
    --efcr-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.efcr-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--efcr-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--efcr-text);
    margin: 0;
    padding: 0;
}

/* Sidebar */
.efcr-sidebar {
    width: var(--efcr-sidebar-width);
    background: linear-gradient(180deg, #0d2137 0%, #1a3a5c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.efcr-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.efcr-logo-icon {
    font-size: 32px;
    background: var(--efcr-accent);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.efcr-logo strong {
    font-size: 16px;
    letter-spacing: 1px;
}

.efcr-logo span {
    font-size: 13px;
    opacity: 0.9;
}

.efcr-logo small {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 2px;
}

.efcr-nav {
    flex: 1;
    padding: 20px 12px;
}

.efcr-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.efcr-nav a:hover,
.efcr-nav a.active {
    background: var(--efcr-accent);
    color: var(--efcr-primary-dark);
    font-weight: 600;
}

.efcr-nav a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.efcr-sidebar-footer {
    padding: 20px;
    font-size: 12px;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

/* Main */
.efcr-main {
    margin-left: var(--efcr-sidebar-width);
    flex: 1;
    padding: 0;
    min-height: 100vh;
}

.efcr-header {
    background: linear-gradient(135deg, #1a5f7a 0%, #0d3b4f 50%, #1a3a5c 100%);
    color: #fff;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.efcr-header::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.efcr-welcome h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.efcr-welcome h1 span {
    color: var(--efcr-accent);
}

.efcr-welcome p {
    margin: 4px 0 0;
    opacity: 0.85;
    font-size: 15px;
}

.efcr-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.efcr-notifications-bell {
    position: relative;
    background: rgba(255,255,255,0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.efcr-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.efcr-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
}

.efcr-user-menu img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.efcr-user-menu span {
    font-size: 13px;
    line-height: 1.3;
}

.efcr-user-menu small {
    opacity: 0.7;
}

/* Stats */
.efcr-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px 32px 0;
}

.efcr-stat-card {
    background: var(--efcr-card);
    border-radius: var(--efcr-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--efcr-shadow);
}

.efcr-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.efcr-stat-icon.blue { background: #dbeafe; color: #2563eb; }
.efcr-stat-icon.green { background: #dcfce7; color: #16a34a; }
.efcr-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.efcr-stat-icon.yellow { background: #fef3c7; color: #d97706; }

.efcr-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.efcr-stat-card h3 {
    margin: 0;
    font-size: 13px;
    color: var(--efcr-muted);
    font-weight: 500;
}

.efcr-stat-value {
    margin: 4px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--efcr-text);
}

.efcr-stat-change {
    font-size: 12px;
    color: var(--efcr-muted);
}

.efcr-stat-change.up {
    color: var(--efcr-success);
}

/* Content */
.efcr-content-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    padding: 24px 32px;
}

.efcr-panel {
    background: var(--efcr-card);
    border-radius: var(--efcr-radius);
    padding: 24px;
    box-shadow: var(--efcr-shadow);
    margin: 0 32px 24px;
}

.efcr-content-row .efcr-panel {
    margin: 0;
}

.efcr-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.efcr-panel-header h2,
.efcr-panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}

.efcr-panel-header a {
    color: var(--efcr-info);
    text-decoration: none;
    font-size: 13px;
}

/* Tables */
.efcr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.efcr-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    color: var(--efcr-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

.efcr-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.efcr-table tr:hover td {
    background: #f8fafc;
}

.efcr-thumb {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Status badges */
.efcr-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.efcr-status-confirmed,
.efcr-status-completed { background: #dcfce7; color: #166534; }
.efcr-status-pending { background: #fef3c7; color: #92400e; }
.efcr-status-active,
.efcr-status-pickup { background: #dbeafe; color: #1e40af; }
.efcr-status-overdue,
.efcr-status-cancelled { background: #fee2e2; color: #991b1b; }
.efcr-status-return { background: #ede9fe; color: #5b21b6; }

/* Buttons */
.efcr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.efcr-btn-primary {
    background: var(--efcr-accent);
    color: var(--efcr-primary-dark);
}

.efcr-btn-primary:hover {
    background: var(--efcr-accent-hover);
    color: var(--efcr-primary-dark);
}

.efcr-btn-sm {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: #e2e8f0;
    color: var(--efcr-text);
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin: 2px;
}

.efcr-btn-sm:hover {
    background: #cbd5e1;
}

.efcr-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.efcr-action-btn.yellow {
    background: var(--efcr-accent);
    color: var(--efcr-primary-dark);
}

.efcr-action-btn.outline {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: var(--efcr-text);
}

/* Side panels */
.efcr-side-panels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.efcr-quick-actions h2 {
    margin-bottom: 12px;
}

.efcr-promo {
    background: linear-gradient(135deg, #0d2137, #1a5f7a) !important;
    color: #fff;
    text-align: center;
}

.efcr-promo h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.efcr-promo p {
    opacity: 0.85;
    margin-bottom: 16px;
}

.efcr-account-info p {
    margin: 0 0 12px;
    font-size: 13px;
}

.efcr-account-info strong {
    display: block;
    color: var(--efcr-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Notifications */
.efcr-notif-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.efcr-notif-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.efcr-notif-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.efcr-notif-icon.green { background: #dcfce7; color: #16a34a; }
.efcr-notif-icon.blue { background: #dbeafe; color: #2563eb; }
.efcr-notif-icon.yellow { background: #fef3c7; color: #d97706; }

.efcr-notif-list small {
    display: block;
    color: var(--efcr-muted);
    margin-top: 2px;
}

/* Vehicles grid */
.efcr-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.efcr-vehicle-card {
    background: #fff;
    border-radius: var(--efcr-radius);
    overflow: hidden;
    box-shadow: var(--efcr-shadow);
    padding-bottom: 16px;
    text-align: center;
}

.efcr-vehicle-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.efcr-vehicle-card h3 {
    margin: 12px 12px 4px;
    font-size: 16px;
}

.efcr-vehicle-card .efcr-rate {
    color: var(--efcr-primary);
    font-weight: 700;
    margin: 4px 0 12px;
}

/* Forms */
.efcr-form-group {
    margin-bottom: 16px;
}

.efcr-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--efcr-muted);
}

.efcr-form-group input,
.efcr-form-group select,
.efcr-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.efcr-form-group input:focus,
.efcr-form-group select:focus,
.efcr-form-group textarea:focus {
    outline: none;
    border-color: var(--efcr-accent);
}

.efcr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.efcr-form-message {
    margin-top: 10px;
    font-size: 13px;
}

.efcr-form-message.success { color: var(--efcr-success); }
.efcr-form-message.error { color: var(--efcr-danger); }

/* Condition forms */
.efcr-condition-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.efcr-condition-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
}

.efcr-condition-box h3,
.efcr-condition-box h4 {
    margin-top: 0;
}

/* Auth */
.efcr-auth-container {
    max-width: 440px;
    margin: 60px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.efcr-auth-tabs {
    display: flex;
}

.efcr-tab {
    flex: 1;
    padding: 16px;
    border: none;
    background: #f1f5f9;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}

.efcr-tab.active {
    background: #fff;
    color: var(--efcr-primary);
}

.efcr-auth-form {
    display: none;
    padding: 32px;
}

.efcr-auth-form.active {
    display: block;
}

.efcr-auth-form h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.efcr-subtitle {
    color: var(--efcr-muted);
    margin: 0 0 24px;
}

/* Modal — hidden by default; only .efcr-open shows */
.efcr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.efcr-modal.efcr-open {
    display: flex !important;
}

.efcr-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.efcr-contract-modal {
    max-width: 900px;
}

.efcr-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.efcr-contract-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

/* Contract document */
.efcr-contract-document {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #222;
}

.efcr-contract-document h1 {
    text-align: center;
    font-size: 24px;
}

.efcr-contract-document h2 {
    font-size: 15px;
    margin-top: 24px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
}

.efcr-contract-field {
    border: 1px solid #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    min-width: 100px;
}

.efcr-filled {
    border-bottom: 1px dotted #666;
    min-width: 80px;
    display: inline-block;
}

.efcr-id-gallery {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.efcr-id-card {
    text-align: center;
}

.efcr-id-card img {
    max-width: 180px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.efcr-notice {
    background: #fff;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 500px;
    box-shadow: var(--efcr-shadow);
}

/* Mobile menu toggle */
.efcr-mobile-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: var(--efcr-accent);
    color: var(--efcr-primary-dark);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}

.efcr-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}

.efcr-id-preview {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 1100px) {
    .efcr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .efcr-content-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .efcr-mobile-toggle {
        display: flex;
    }
    .efcr-sidebar {
        width: var(--efcr-sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 150;
    }
    .efcr-sidebar.efcr-open {
        transform: translateX(0);
    }
    .efcr-sidebar-overlay.efcr-open {
        display: block;
    }
    .efcr-main {
        margin-left: 0;
    }
    .efcr-header {
        padding: 20px 16px 20px 60px;
    }
    .efcr-welcome h1 {
        font-size: 20px;
    }
    .efcr-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px;
    }
    .efcr-stat-value {
        font-size: 22px;
    }
    .efcr-panel {
        margin: 0 12px 16px;
        padding: 16px;
    }
    .efcr-content-row {
        padding: 16px 12px;
        gap: 12px;
    }
    .efcr-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .efcr-form-row {
        grid-template-columns: 1fr;
    }
    .efcr-condition-forms {
        grid-template-columns: 1fr;
    }
    .efcr-vehicles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .efcr-auth-container {
        margin: 24px 12px;
        max-width: none;
    }
    .efcr-contract-modal {
        max-width: 100%;
        margin: 8px;
        padding: 16px;
    }
    .efcr-user-menu span small {
        display: none;
    }
}

@media (max-width: 520px) {
    .efcr-stats-grid {
        grid-template-columns: 1fr;
    }
    .efcr-vehicles-grid {
        grid-template-columns: 1fr;
    }
    .efcr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-left: 16px;
        padding-top: 60px;
    }
    .efcr-header-right {
        width: 100%;
        justify-content: space-between;
    }
    .efcr-stat-card {
        padding: 14px;
    }
    .efcr-btn,
    .efcr-action-btn {
        width: 100%;
        justify-content: center;
    }
    .efcr-table th,
    .efcr-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .efcr-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

/* Print-friendly contracts */
@media print {
    .efcr-sidebar,
    .efcr-mobile-toggle,
    .efcr-header-right,
    .efcr-contract-actions {
        display: none !important;
    }
    .efcr-main {
        margin-left: 0 !important;
    }
}


/* Full-page layout lock — content never wraps under sidebar */
.efcr-dashboard {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    overflow-x: hidden;
}
.efcr-sidebar {
    flex: 0 0 var(--efcr-sidebar-width) !important;
    width: var(--efcr-sidebar-width) !important;
    min-width: var(--efcr-sidebar-width) !important;
    max-width: var(--efcr-sidebar-width) !important;
}
.efcr-main {
    flex: 1 1 auto !important;
    margin-left: 0 !important; /* sidebar is in flex flow, not only fixed */
    width: calc(100vw - var(--efcr-sidebar-width)) !important;
    max-width: calc(100vw - var(--efcr-sidebar-width)) !important;
    min-width: 0 !important;
    overflow-x: hidden;
    position: relative;
}
/* When sidebar is fixed, offset main */
@media (min-width: 901px) {
    .efcr-sidebar {
        position: fixed !important;
        left: 0; top: 0; bottom: 0;
    }
    .efcr-main {
        margin-left: var(--efcr-sidebar-width) !important;
        width: calc(100vw - var(--efcr-sidebar-width)) !important;
        max-width: calc(100vw - var(--efcr-sidebar-width)) !important;
    }
}

/* Glass-style active menu item */
.efcr-nav a {
    position: relative;
    backdrop-filter: blur(0);
    transition: all 0.25s ease;
}
.efcr-nav a.active {
    background: rgba(245, 197, 24, 0.22) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 16px rgba(0,0,0,0.15);
    border: 1px solid rgba(245, 197, 24, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.efcr-nav a.active .dashicons {
    color: var(--efcr-accent);
}
.efcr-nav a:hover:not(.active) {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* SPA tab panels */
.efcr-tab-panel { display: none; }
.efcr-tab-panel.active { display: block; animation: efcrFade 0.2s ease; }
@keyframes efcrFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Charts & GPS */
.efcr-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 32px 24px;
}
.efcr-chart-card, .efcr-gps-card {
    background: #fff;
    border-radius: var(--efcr-radius);
    padding: 20px;
    box-shadow: var(--efcr-shadow);
}
.efcr-chart-card h3, .efcr-gps-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.efcr-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.efcr-filter-bar button {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.efcr-filter-bar button.active {
    background: var(--efcr-primary);
    color: #fff;
    border-color: var(--efcr-primary);
}
#efcr-gps-map { height: 280px; border-radius: 10px; background: #e8eef5; }
.efcr-rented-list { list-style: none; padding: 0; margin: 12px 0 0; }
.efcr-rented-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.efcr-rented-list .dot {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
    display: inline-block; margin-right: 8px;
}

/* Modern contract layout (image 1) */
.efcr-modern-contract {
    background: #fff;
    border: 2px solid #60a5fa;
    border-radius: 16px;
    padding: 24px;
    max-width: 960px;
    margin: 0 auto;
}
.efcr-modern-contract .efcr-mc-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px;
}
.efcr-modern-contract h1 { margin: 0; font-size: 22px; color: #1e3a5f; }
.efcr-mc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.efcr-mc-card {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
}
.efcr-mc-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #1d4ed8;
    display: flex; align-items: center; gap: 6px;
}
.efcr-mc-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; }
.efcr-mc-card strong { color: #334155; }
.efcr-mc-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.efcr-mc-ids img {
    width: 120px; height: auto; border-radius: 8px; border: 1px solid #cbd5e1;
    margin-right: 10px;
}
.efcr-signature-pad-wrap {
    border: 1.5px dashed #94a3b8;
    border-radius: 10px;
    background: #fafafa;
    position: relative;
}
.efcr-signature-pad-wrap canvas {
    width: 100%; height: 140px; display: block; touch-action: none;
}
.efcr-sig-tools {
    display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap;
}
.efcr-sig-tools button {
    padding: 6px 12px; border-radius: 6px; border: 1px solid #cbd5e1;
    background: #fff; font-size: 12px; cursor: pointer;
}
.efcr-sig-tools button.active {
    background: #2563eb; color: #fff; border-color: #2563eb;
}
.efcr-sign-btn {
    display: block; width: 100%; margin-top: 12px;
    background: #16a34a; color: #fff; border: none;
    padding: 12px; border-radius: 8px; font-weight: 700; font-size: 15px;
    cursor: pointer;
}
.efcr-sign-btn:hover { background: #15803d; }

/* Legal PDF contract accordion */
.efcr-legal-contract {
    margin-top: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}
.efcr-legal-contract summary {
    cursor: pointer; font-weight: 600; font-size: 15px;
}

@media (max-width: 900px) {
    .efcr-charts-row, .efcr-mc-grid, .efcr-mc-bottom {
        grid-template-columns: 1fr;
    }
    .efcr-main {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
    }
}


/* Checklist */
.efcr-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 16px;
    margin-bottom: 16px;
}
.efcr-checklist-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}
.efcr-checklist-box h3 { margin-top: 0; }
.efcr-checklist-meta { font-size: 12px; color: #64748b; margin: -8px 0 12px; }
.efcr-cond-select option[value="Damaged"] { color: #b91c1c; }
.efcr-cond-select option[value="Good"] { color: #15803d; }
.efcr-check-value {
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
}

/* ID Scanner */
.efcr-id-scanner {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-top: 12px;
}
.efcr-id-scanner h3 { color: #f5c518; margin-top: 0; }
.efcr-scanner-help { font-size: 13px; opacity: 0.85; line-height: 1.5; }
.efcr-scanner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.efcr-scanner-or { text-align: center; font-size: 12px; opacity: 0.6; margin: 12px 0; }
.efcr-id-scanner .efcr-form-group label { color: #94a3b8; }
.efcr-id-scanner input, .efcr-id-scanner select {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
.efcr-scanner-preview { margin: 12px 0; min-height: 20px; }
.efcr-scanner-preview img { border: 2px solid #f5c518; }

@media (max-width: 600px) {
    .efcr-checklist-grid { grid-template-columns: 1fr 1fr; }
    .efcr-condition-forms { grid-template-columns: 1fr !important; }
}

/* Header with background */
.efcr-header {
    background-size: cover;
    background-position: center;
    min-height: 140px;
}
.efcr-header-id {
    margin: 6px 0 0 !important;
    font-size: 14px !important;
    opacity: 0.95 !important;
}
.efcr-header-datetime {
    margin: 4px 0 0 !important;
    font-size: 13px !important;
    opacity: 0.85 !important;
    font-variant-numeric: tabular-nums;
}

/* Notification center overlay */
.efcr-notif-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.55) !important;
}
.efcr-notif-panel {
    max-width: 480px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
}
.efcr-notif-center-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.efcr-notif-item {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.efcr-notif-item:hover {
    border-color: #f5c518;
    background: #fffbeb;
}
.efcr-notif-time {
    font-size: 11px;
    color: #64748b;
}
.efcr-notif-detail {
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
}
.efcr-notifications-bell {
    cursor: pointer;
}

.efcr-charts-row {
    margin-top: 8px;
}


/* Force dashboard header visible (theme may hide generic header tags) */
header.efcr-header,
.efcr-header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Vehicle card image tap */
.efcr-vehicle-img-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.efcr-vehicle-img-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.efcr-vehicle-tap-hint {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
}
.efcr-vehicle-noimg {
    height: 120px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
.efcr-vehicle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.efcr-blur-modal {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.55);
}
/* never force display on blur modals — visibility is controlled by .efcr-open only */
.efcr-vehicle-preview-panel {
    max-width: 520px;
}
.efcr-vp-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Invoice rows */
.efcr-invoice-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.efcr-invoice-main {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.efcr-invoice-number {
    font-weight: 700;
    color: #1a3a5c;
    text-decoration: none;
    font-size: 15px;
}
.efcr-invoice-number:hover { color: #f5c518; }
.efcr-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.efcr-invoice-preview-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.efcr-muted { color: #94a3b8; font-size: 13px; }

/* Modern contract — match mockup */
.efcr-modern-contract {
    background: #fff;
    border: 2px solid #60a5fa;
    border-radius: 16px;
    padding: 24px;
    max-width: 960px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.08);
}
.efcr-mc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.efcr-modern-contract h1 {
    margin: 0;
    font-size: 24px;
    color: #1e3a5f;
}
.efcr-mc-sub { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.efcr-mc-date { color: #64748b; font-size: 13px; }
.efcr-mc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.efcr-mc-card {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
}
.efcr-mc-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #1d4ed8;
}
.efcr-mc-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: #334155; }
.efcr-mc-license {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #bfdbfe;
}
.efcr-mc-license-title {
    font-weight: 600 !important;
    color: #1d4ed8 !important;
    margin-bottom: 6px !important;
}
.efcr-mc-terms {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
}
.efcr-mc-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.efcr-mc-id-photos {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.efcr-mc-id-item {
    text-align: center;
}
.efcr-mc-id-item img {
    width: 130px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    display: block;
}
.efcr-mc-id-item span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}
.efcr-mc-id-placeholder {
    width: 130px;
    height: 80px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
}
.efcr-signature-pad-wrap {
    border: 1.5px dashed #94a3b8;
    border-radius: 10px;
    background: #fafafa;
    min-height: 140px;
}
.efcr-signature-canvas {
    width: 100% !important;
    height: 160px !important;
    touch-action: none;
    display: block;
}
.efcr-sig-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.efcr-sig-tools button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
}
.efcr-sig-tools button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.efcr-sign-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: #16a34a !important;
    color: #fff !important;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.efcr-signed-ok { color: #16a34a; font-size: 13px; margin-top: 8px; }
.efcr-sig-hint { font-size: 12px; color: #64748b; }

@media (max-width: 800px) {
    .efcr-mc-grid, .efcr-mc-bottom { grid-template-columns: 1fr; }
}

/* Reputation under logo */
.efcr-reputation-block {
    text-align: center;
    padding: 12px 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 8px;
}
.efcr-rep-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}
.efcr-rep-score {
    font-size: 22px;
    font-weight: 800;
    color: #f5c518;
    line-height: 1.2;
}
.efcr-rep-score.efcr-rep-danger {
    color: #ef4444 !important;
    animation: efcr-pulse 1.5s ease-in-out infinite;
}
@keyframes efcr-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.efcr-reward-mini {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}
.efcr-reward-mini .efcr-btn-sm {
    margin-left: 6px;
    background: #f5c518;
    color: #0d2137;
    border: none;
}
.efcr-custom-logo {
    display: block;
    margin: 0 auto 8px;
}

/* Modal visibility lock — only .efcr-open may show; prevents stuck overlays */
.efcr-modal:not(.efcr-open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}
.efcr-modal.efcr-open {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
}
.efcr-blur-modal.efcr-open {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.55) !important;
}
.efcr-sidebar-overlay:not(.efcr-open) {
    display: none !important;
}
