:root {
    --bg-dark: #0d0e11;
    --sidebar-bg: #090a0c;
    --sidebar-hover: #1c1d22;
    --sidebar-active-bg: #fcd34d;
    --sidebar-active-text: #0b0b0b;
    --lemonaide-yellow: #fcd34d;
    --lemonaide-yellow-hover: #fbbf24;
    --lemonaide-yellow-light: #fef3c7;
    --lemonaide-yellow-bg: #fffbeb;
    --table-yellow: #fed85d;
    --table-yellow-soft: #fef08a;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --content-bg: #f3f4f6;
    --white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--content-bg);
    color: var(--text-main);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 24px 14px 16px;
    border-right: 1px solid #1f2937;
    z-index: 100;
}

.brand-header {
    margin-bottom: 24px;
    padding-left: 10px;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--lemonaide-yellow);
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 12px 10px 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    color: #d1d5db;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    gap: 8px;
    transition: all 0.15s ease;
}

.nav-link > span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--lemonaide-yellow);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 700;
}

.nav-link .badge {
    background-color: #334155;
    color: #ffffff;
    border: 1px solid #475569;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

.nav-link.active .badge {
    background-color: #0b0b0b;
    color: var(--lemonaide-yellow);
    border-color: #0b0b0b;
}

.nav-sub-group {
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.nav-sub-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 5px;
    color: #9ca3af;
    font-size: 12.5px;
    transition: all 0.15s ease;
}

.nav-sub-link:hover {
    color: var(--lemonaide-yellow);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-sub-link.active {
    background-color: var(--lemonaide-yellow);
    color: #000;
    font-weight: 700;
}

.nav-sub-link.active .badge {
    background-color: #000;
    color: var(--lemonaide-yellow);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.15s;
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.15);
}

.version-text {
    font-size: 11px;
    color: #6b7280;
    padding-left: 10px;
}

/* Main Area */
.main-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    height: 56px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 28px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #111827;
    color: var(--lemonaide-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* Page Content */
.content-body {
    padding: 24px 28px 48px;
    flex-grow: 1;
    min-width: 0;
    width: 100%;
}

/* Flash Messages */
.flash-stack {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-danger, .flash-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dashboard KPI Cards (Matching Image 1) */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.kpi-row-sub {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.kpi-card-top {
    padding: 20px 12px 14px;
}

.kpi-card-val {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.kpi-card-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.kpi-card-bottom {
    background-color: var(--lemonaide-yellow);
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Section Box & Data Tables (Matching Image 1 & 2) */
.data-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.data-card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
}

.data-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

/* Filter controls bar */
.filter-bar {
    padding: 14px 20px;
    background: var(--white);
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select, .filter-input {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background-color: #fff;
    color: #374151;
}

.btn-yellow {
    background-color: var(--lemonaide-yellow);
    color: #111827;
    border: 1px solid #eab308;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-yellow:hover {
    background-color: var(--lemonaide-yellow-hover);
}

.btn-dark {
    background-color: #111827;
    color: var(--white);
    border: 1px solid #111827;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-dark:hover {
    background-color: #1f2937;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    height: 30px;
}

/* Table Style */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.lemonaide-table {
    width: 100%;
    min-width: 1350px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

/* Dashboard Specific Table Styling - Fits neatly inside dashboard columns without horizontal blowout */
.lemonaide-table.dashboard-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: auto !important;
}

.lemonaide-table.dashboard-table th,
.lemonaide-table.dashboard-table td {
    padding: 10px 10px !important;
    font-size: 12.5px !important;
    white-space: normal !important;
}

.lemonaide-table.dashboard-table th.nowrap,
.lemonaide-table.dashboard-table td.nowrap {
    white-space: nowrap !important;
}

.lemonaide-table.dashboard-table th:last-child,
.lemonaide-table.dashboard-table td:last-child,
.lemonaide-table.dashboard-table .actions-col,
.lemonaide-table.dashboard-table .actions-cell {
    position: static !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    box-shadow: none !important;
    border-left: 1px solid rgba(0, 0, 0, 0.05) !important;
    text-align: center !important;
}

.lemonaide-table thead tr:first-child th {
    background-color: #0b0b0b;
    color: #ffffff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid #1f2937;
    border-bottom: 1px solid #1f2937;
}

/* Table Top Meta Header (Matching Image 2) */
.table-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px 20px 4px;
    font-size: 13.5px;
    color: #374151;
}

.table-top-meta .total-count-text {
    font-weight: 500;
}

.table-top-meta .total-count-text strong {
    font-weight: 800;
    color: #111827;
    font-size: 14.5px;
}

.table-top-meta .per-page-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
}

.table-top-meta .per-page-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}

.lemonaide-table thead tr.table-header-titles th {
    background-color: #0b0b0b;
    color: #ffffff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid #1f2937;
    border-bottom: 1px solid #1f2937;
}

.lemonaide-table thead tr.table-header-filters th {
    background-color: #fff7ed;
    padding: 6px 4px;
    border-bottom: 2px solid #fed7aa;
    border-right: 1px solid #ffedd5;
    vertical-align: middle;
}

.btn-clear-filter {
    box-sizing: border-box !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 90px;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #9a3412;
    background: #ffffff;
    border: 1.5px solid #ea580c;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-clear-filter:hover {
    background: #ea580c;
    color: #ffffff;
}

.hdr-filter-input, .hdr-filter-select {
    box-sizing: border-box !important;
    width: 100%;
    min-width: 80px;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px;
    font-size: 12px;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s;
}

.hdr-filter-input:focus, .hdr-filter-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.lemonaide-table thead tr:first-child th span.sort-icon {
    margin-left: 4px;
    font-size: 10px;
    color: var(--lemonaide-yellow);
}

.col-filter-input {
    width: 100%;
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #374151;
    background: #ffffff;
    font-size: 11.5px;
    color: #111827;
}

/* Table Pagination Footer */
.table-pagination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    color: #64748b;
    margin-top: -1px;
}

.table-pagination-info {
    font-weight: 600;
    color: #475569;
}

.table-pagination-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.page-btn.active {
    background: var(--lemonaide-yellow, #fcd34d) !important;
    border-color: #f59e0b !important;
    color: #000000 !important;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

.lemonaide-table tbody tr {
    background-color: var(--table-yellow);
    transition: background-color 0.15s;
}

.lemonaide-table tbody tr:hover {
    background-color: var(--table-yellow-soft);
}

.lemonaide-table tbody td {
    padding: 12px 10px;
    color: #111827;
    font-weight: 500;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    background-color: inherit;
}

/* Sticky Action Column Styles - Fixed to the right */
.lemonaide-table th:last-child,
.lemonaide-table td:last-child,
.lemonaide-table .actions-col,
.lemonaide-table .actions-cell {
    position: sticky !important;
    right: 0 !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    box-sizing: border-box !important;
}

/* Inspected table fits three action buttons (View Report, Edit Checklist, Delete) */
#inspectedTable th:last-child,
#inspectedTable td:last-child {
    width: 310px !important;
    min-width: 310px !important;
    max-width: 310px !important;
}

.lemonaide-table thead tr.table-header-titles th:last-child,
.lemonaide-table thead tr.table-header-titles th.actions-col {
    z-index: 30 !important;
    background-color: #0b0b0b !important;
    border-left: 1.5px solid #27272a !important;
    box-shadow: -5px 0 12px -3px rgba(0, 0, 0, 0.45) !important;
    text-align: center !important;
}

.lemonaide-table thead tr.table-header-filters th:last-child,
.lemonaide-table thead tr.table-header-filters th.actions-col {
    z-index: 29 !important;
    background-color: #fff7ed !important;
    border-left: 1.5px solid #fed7aa !important;
    box-shadow: -5px 0 12px -3px rgba(0, 0, 0, 0.15) !important;
    text-align: center !important;
}

.lemonaide-table tbody td:last-child,
.lemonaide-table tbody td.actions-cell,
.lemonaide-table tbody td.actions-col {
    z-index: 20 !important;
    background-color: var(--table-yellow, #fed85d) !important;
    border-left: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: -5px 0 12px -3px rgba(0, 0, 0, 0.18) !important;
    text-align: center !important;
}

.lemonaide-table tbody tr:hover td:last-child,
.lemonaide-table tbody tr:hover td.actions-cell,
.lemonaide-table tbody tr:hover td.actions-col {
    background-color: var(--table-yellow-soft, #fef08a) !important;
}

.action-gear-btn {
    width: 32px;
    height: 32px;
    background-color: #0b0b0b;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.15s;
}

.action-gear-btn:hover {
    background-color: var(--lemonaide-yellow);
    color: #000;
}

.table-empty-box {
    background-color: var(--table-yellow);
    padding: 16px;
    text-align: center;
    font-weight: 600;
    color: #111827;
}

/* Ensure empty box rows don't stick strangely */
.lemonaide-table tbody tr td.table-empty-box {
    position: static !important;
    box-shadow: none !important;
    border-left: none !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
    background-color: #0b0b0b;
    color: #ffffff;
    font-size: 12px;
    gap: 8px;
}

.entries-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #374151;
    background-color: #1f2937;
    color: #fff;
    font-size: 12px;
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-muted {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Forms */
.form-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    color: #111827;
    background-color: #ffffff;
}

textarea.form-control {
    height: auto;
    min-height: 80px;
}

.form-control:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
}

/* Inspection Report Specific Styling (Matching Image 3) */
.report-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.report-header-banner {
    background: #0f172a;
    color: #ffffff;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid var(--lemonaide-yellow);
}

.report-logo-box {
    display: flex;
    flex-direction: column;
}

.report-brand-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--lemonaide-yellow);
    letter-spacing: 2px;
}

.report-sub-title {
    font-size: 13px;
    color: #cbd5e1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.report-score-badge {
    background: var(--lemonaide-yellow);
    color: #0b0b0b;
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
}

.report-score-num {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.report-score-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 36px;
    gap: 24px;
}

.report-info-table {
    width: 100%;
    font-size: 13px;
}

.report-info-table td {
    padding: 6px 0;
}

.report-info-table td.label-col {
    color: #64748b;
    font-weight: 600;
    width: 45%;
}

.report-info-table td.val-col {
    color: #0f172a;
    font-weight: 700;
}

.report-section {
    padding: 28px 36px;
    border-bottom: 1px solid #f1f5f9;
}

.report-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cat-check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

.cat-check-pass {
    color: #059669;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cat-check-defect {
    color: #dc2626;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cat-check-warning {
    color: #d97706;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Input Icon Wrapper for Datepickers */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: #6b7280;
    pointer-events: none;
    font-size: 14px;
    z-index: 2;
}

.input-icon-wrapper input.form-control {
    padding-left: 36px !important;
    background-color: #ffffff;
    cursor: pointer;
}

.input-icon-wrapper input.form-control:focus {
    background-color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.35);
}

/* Custom Flatpickr Theme for Lemonaide */
.flatpickr-calendar {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    font-family: inherit !important;
}

.flatpickr-months {
    background: #0f172a !important;
    border-top-left-radius: 9px !important;
    border-top-right-radius: 9px !important;
    padding: 6px 0 !important;
}

.flatpickr-current-month, .flatpickr-month {
    color: #f8fafc !important;
    fill: #f8fafc !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    color: #f8fafc !important;
    background: #0f172a !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    color: #fcd34d !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    color: #fcd34d !important;
    fill: #fcd34d !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #ffffff !important;
}

span.flatpickr-weekday {
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
}

.flatpickr-day {
    border-radius: 6px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.flatpickr-day.today {
    border-color: #fcd34d !important;
    background: #fef3c7 !important;
    color: #78350f !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange {
    background: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

.flatpickr-day.inRange {
    background: #ffedd5 !important;
    border-color: #fed7aa !important;
    color: #9a3412 !important;
    box-shadow: -5px 0 0 #ffedd5, 5px 0 0 #ffedd5 !important;
}

.flatpickr-day:hover {
    background: #fed7aa !important;
    border-color: #ea580c !important;
    color: #000000 !important;
}

/* Brand & Model Popover Component (Matching Image 2) */
.brand-model-filter-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.btn-brand-model-trigger {
    box-sizing: border-box !important;
    width: 100%;
    min-width: 110px;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: all 0.15s;
}

.btn-brand-model-trigger:hover, .btn-brand-model-trigger.active {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.btn-brand-model-trigger .trigger-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.brand-model-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    min-width: 250px;
    background: #ffffff;
    border: 1.5px solid #fed7aa;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.18), 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

.brand-model-popover.show {
    display: block;
    animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.popover-field-group {
    margin-bottom: 10px;
}

.popover-field-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 4px;
}

.popover-select {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #ffffff;
    font-size: 12.5px;
    color: #1f2937;
    outline: none;
    cursor: pointer;
}

.popover-select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.popover-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #ffedd5;
}

.btn-popover-clear {
    background: none;
    border: none;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 6px;
}

.btn-popover-clear:hover {
    color: #ea580c;
}

.btn-popover-apply {
    background: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-popover-apply:hover {
    background: #c2410c;
}

@media print {
    .sidebar, .top-navbar, .no-print {
        display: none !important;
    }
    .app-container {
        display: block !important;
    }
    .content-body {
        padding: 0 !important;
    }
    .report-container {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
    }
}

/* Report Viewer Layout (Matching User Uploaded UI) */
.report-screen-wrapper {
    max-width: 1100px;
    margin: 0 auto 30px;
}

.report-car-title-bar {
    background-color: #1a1a1a;
    color: #fde047;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.report-split-grid {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 20px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 20px;
}

.pdf-viewer-frame {
    background-color: #333a42;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.pdf-toolbar {
    background-color: #2b313a;
    color: #cbd5e1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    font-size: 11.5px;
    border-bottom: 1px solid #1e2329;
}

.pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-toolbar-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}

.pdf-toolbar-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.pdf-content-sheet {
    background-color: #ffffff;
    margin: 12px;
    border-radius: 4px;
    padding: 20px 24px;
    color: #111827;
    min-height: 440px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Certificate Layout Inside PDF Sheet */
.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.cert-logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #111827;
}

.cert-logo span {
    color: #facc15;
}

.cert-logo-sub {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    color: #4b5563;
    margin-top: -2px;
}

.cert-banner {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
    padding: 10px 24px;
    border-radius: 20px 0 0 20px;
    text-align: right;
    box-shadow: -2px 2px 4px rgba(0,0,0,0.05);
}

.cert-banner-th {
    font-size: 15px;
    font-weight: 900;
    color: #000000;
}

.cert-banner-en {
    font-size: 11px;
    font-weight: 700;
    color: #1f2937;
}

.cert-body-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 18px;
    align-items: center;
}

.cert-car-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.cert-info-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-id-tag {
    background: #fde047;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 13px;
    color: #000000;
    border-radius: 4px;
    text-align: center;
}

.cert-score-section {
    text-align: center;
}

.cert-score-label {
    font-size: 12px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 2px;
}

.cert-stars {
    color: #f59e0b;
    font-size: 20px;
    letter-spacing: 2px;
}

.cert-check-item {
    font-size: 11.5px;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.cert-check-title {
    font-weight: 700;
    font-size: 12px;
}

.cert-check-options {
    display: flex;
    gap: 14px;
    font-size: 11px;
    font-weight: 600;
}

/* Sidebar Details */
.report-details-box {
    border: 1px solid #18181b;
    border-radius: 6px;
    overflow: hidden;
    height: fit-content;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.report-details-header {
    background-color: #18181b;
    color: #fde047;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 700;
}

.report-details-content {
    background-color: #ffffff;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 13.5px;
}

.report-details-row {
    display: flex;
    align-items: baseline;
    font-size: 13.5px;
    line-height: 1.4;
}

.report-details-label {
    color: #111827;
    font-weight: 500;
    min-width: 125px;
}

.report-details-val {
    color: #000000;
    font-weight: 500;
    flex: 1;
}

