﻿* {
    box-sizing: border-box;
}

:root {
    --color-suzuki-blue: #00368f;
    --color-suzuki-red: #de0039;
    --color-light-blue: #0098d9;
    --color-navy-blue: #001151;
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-text: #000622;
    --color-muted: #6c757d;
    --color-border: #e9ecef;
    --color-input-bg: #ffffff;
    --color-primary: #000622;
    --color-primary-hover: #0e1929;
    --color-primary-pressed: #001133;
    --color-primary-disabled: #8a97b6;
    --color-focus: #0098d9;
    --color-accent: #de0039;
    --font-family-body: "Lexend Deca", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --dashboard-scroll-max-height: clamp(260px, 34vh, 320px);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family-body);
}

.app-body {
    background: var(--color-bg);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.app-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.app-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--color-border);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, width 0.2s ease;
    z-index: 40;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.app-sidebar.collapsed {
    width: 64px;
}

.app-sidebar.collapsed .sidebar-profile-meta,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-link span {
    display: none;
}

.app-sidebar.collapsed .sidebar-profile-button {
    justify-content: center;
    padding: 14px 0;
}

.app-sidebar.collapsed .sidebar-chevron {
    display: none;
}

.app-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

.app-sidebar.hidden {
    transform: translateX(-100%);
}

.app-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-sidebar.collapsed + .app-main {
    margin-left: 64px;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0;
}

.topbar-logo {
    height: 28px;
}

.icon-button {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: var(--color-text);
    transition: background 0.2s ease;
}

.icon-button:hover {
    background: #f1f3f5;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: inline-flex;
}

.app-content {
    flex: 1;
    padding: 24px;
    background: var(--color-bg);
}

.sidebar-profile {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    position: relative;
}

.sidebar-profile-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-profile-button:hover {
    background: #e9ecef;
}

.sidebar-avatar {
    height: 32px;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    flex: 0 0 32px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.sidebar-profile-meta {
    text-align: left;
    flex: 1 1 0;
    min-width: 0;
}

.sidebar-name {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.sidebar-role {
    font-size: 10px;
    color: var(--color-muted);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.sidebar-chevron {
    font-size: 18px;
    color: var(--color-muted);
    transition: transform 0.2s ease;
}

.sidebar-profile.open .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 8px;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-12px);
    transition: all 0.2s ease;
    z-index: 50;
}

.sidebar-profile.open .sidebar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sidebar-dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-dropdown-link.logout {
    border-bottom: none;
    color: #dc3545;
}

.sidebar-nav {
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-section-title {
    padding: 0 20px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-right: 3px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: var(--color-text);
}

.sidebar-link.active {
    border-right-color: var(--color-primary);
    background: #e3f2fd;
    color: var(--color-text);
}

.login-body {
    background: var(--color-bg);
    min-height: 100vh;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    padding: 24px;
    overflow: hidden;
}

.login-appbar {
    display: flex;
    align-items: center;
    padding: 10px 16px;
}

.login-logo {
    height: 40px;
}

.login-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.glow-primary {
    width: 240px;
    height: 240px;
    background: rgba(0, 6, 34, 0.14);
    top: -60px;
    left: -40px;
}

.glow-accent {
    width: 200px;
    height: 200px;
    background: rgba(222, 0, 57, 0.18);
    top: 40px;
    right: 40px;
}

.glow-muted {
    width: 280px;
    height: 280px;
    background: rgba(0, 6, 34, 0.1);
    bottom: -120px;
    right: 0;
}

.login-card {
    position: relative;
    margin: 60px auto 0;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 24px 70px -30px rgba(15, 118, 110, 0.5);
}

.login-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--color-text);
}

.login-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--color-muted);
}

.label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-input-bg);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--color-text);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(0, 152, 217, 0.15);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-muted);
}

.primary-button {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.primary-button:hover {
    background: var(--color-primary-hover);
}

.primary-button:disabled {
    background: var(--color-primary-disabled);
    cursor: not-allowed;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
}

.card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.1fr 1.1fr 1.1fr;
    grid-template-rows: minmax(260px, auto) minmax(320px, auto);
}

.dashboard-panel {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.kpi-panel {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.chart-panel {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.list-panel {
    grid-column: 3;
    grid-row: 1;
}

.table-panel {
    grid-column: 3;
    grid-row: 2;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.panel-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.panel-title {
    font-size: 18px;
    margin: 0;
    color: var(--color-text);
}

.panel-title-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-navy-blue);
    background: rgba(0, 152, 217, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.panel-chip {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-navy-blue);
    background: rgba(0, 152, 217, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.panel-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-muted);
}

.dashboard-select {
    min-width: 180px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    color: var(--color-text);
}

.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-card {
    border: 1px solid rgba(0, 17, 81, 0.08);
    border-radius: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 152, 217, 0.08), rgba(255, 255, 255, 0.6));
}

.kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
}

.kpi-meta {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 6px;
}

.chart-wrap {
    flex: 1;
    min-height: 240px;
    position: relative;
}

.chart-wrap--pie {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(200px, 280px);
    gap: 16px;
    align-items: stretch;
}

.chart-pie-shell {
    min-height: 260px;
    
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-legend {
    background: rgba(0, 6, 34, 0.04);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.chart-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-muted);
}

.chart-legend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: var(--dashboard-scroll-max-height);
    padding-right: 4px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
    animation: legendSlideIn 0.4s ease;
}

.chart-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.chart-legend-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chart-legend-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}

.chart-legend-values {
    font-size: 11px;
    color: var(--color-muted);
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    z-index: 2;
}

@keyframes legendSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .chart-wrap--pie {
        grid-template-columns: 1fr;
    }
}

.ranked-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: clamp(220px, 34vh, 360px);
    overflow-y: auto;
    padding-right: 4px;
}

.ranked-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(0, 17, 81, 0.04);
    cursor: pointer;
    transition: background 0.2s ease;
}

.ranked-item:hover {
    background: rgba(0, 17, 81, 0.08);
}

.ranked-badge {
    height: 28px;
    width: 28px;
    border-radius: 999px;
    background: var(--color-navy-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.ranked-meta {
    flex: 1;
}

.ranked-name {
    font-weight: 600;
    font-size: 14px;
}

.ranked-sub {
    font-size: 12px;
    color: var(--color-muted);
}

.ranked-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.ranked-list-empty {
    font-size: 13px;
    color: var(--color-muted);
    text-align: center;
    padding: 12px 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 60;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #fff;
    border-radius: 18px;
    width: min(520px, 92vw);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 18px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}

.modal-title {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-muted);
}

.modal-body {
    padding-top: 14px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-field {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: rgba(0, 17, 81, 0.03);
}

.modal-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.modal-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

@media (max-width: 640px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

.table-scroll {
    max-height: var(--dashboard-scroll-max-height);
    overflow: auto;
    padding-right: 4px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dashboard-table thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-table tbody td {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.table-empty {
    text-align: center;
    color: var(--color-muted);
    padding: 18px 0;
}

.value-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.value-card-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.value-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.loader-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lucide-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.spinner {
    height: 24px;
    width: 24px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .kpi-panel,
    .chart-panel {
        grid-column: 1 / span 2;
    }

    .list-panel,
    .table-panel {
        grid-column: 1 / span 2;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .kpi-panel,
    .chart-panel,
    .list-panel,
    .table-panel {
        grid-column: 1;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
    .mobile-only {
        display: inline-flex;
    }

    .desktop-only {
        display: none;
    }
}

@media (max-width: 640px) {
    .app-content {
        padding: 16px;
    }

    .topbar-title {
        font-size: 14px;
        letter-spacing: 1px;
    }
}

.map-shell {
    position: relative;
    height: calc(100vh - 80px);
    margin: -16px;
    background: #fff;
    overflow: hidden;
}

.map-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.map-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 30;
}

.map-control-button {
    height: 40px;
    width: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    font-size: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-selected {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-muted);
}

.chip-close {
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.details-toggle {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 30;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.panel {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
    z-index: 28;
}

.panel-activity {
    right: 16px;
    top: 72px;
    bottom: 16px;
    width: 360px;
    max-width: 92vw;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    min-height: 0;
}

.panel-search {
    right: 16px;
    top: 72px;
    width: 360px;
    max-width: 92vw;
    height: 50vh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.panel-details {
    left: 16px;
    bottom: 64px;
    width: 320px;
    max-width: 92vw;
    padding: 14px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
}

.ghost-button {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.panel-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.panel-meta {
    font-size: 11px;
    color: var(--color-muted);
    display: flex;
    justify-content: space-between;
}

.panel-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.list-item {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    text-align: left;
    cursor: pointer;
}

.list-item.active {
    border-color: rgba(0, 6, 34, 0.4);
    background: rgba(0, 6, 34, 0.06);
}

.list-item-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.list-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.list-subtitle {
    font-size: 12px;
    color: var(--color-muted);
}

.list-meta {
    font-size: 10px;
    color: var(--color-muted);
}

.list-footer {
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-muted);
}

.empty-state {
    padding: 14px;
    border: 1px dashed var(--color-border);
    border-radius: 12px;
    text-align: center;
    color: var(--color-muted);
    font-size: 12px;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.details-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
}

.details-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.details-area {
    font-size: 12px;
    color: var(--color-muted);
}

.details-card {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
}

.details-label {
    font-size: 12px;
    font-weight: 600;
}

.details-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 10px;
    color: var(--color-muted);
}

.details-tags span {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #f1f3f5;
}

.details-caption {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 0.4px;
}

.details-value {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.details-muted {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 4px;
}

.text-danger {
    color: var(--color-accent);
    font-size: 12px;
    margin-top: 8px;
}

.report-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.report-panel {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.report-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.report-filters .floating-field,
.report-filters .report-date-range {
    flex: 1 1 0;
    min-width: 0;
}

.floating-field {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.floating-field .input {
    width: 100%;
    padding-top: 22px;
    padding-bottom: 8px;
}

.floating-field label {
    position: absolute;
    left: 12px;
    top: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-muted);
    pointer-events: none;
}

.floating-field.compact {
    flex: 0 0 170px;
}

.report-date-range {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    flex: 2 1 0;
}

.report-date-range .floating-field {
    flex: 1 1 0;
    min-width: 0;
}

.report-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.report-filter-actions .icon-button {
    height: 40px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.report-filter-actions .search-button {
    background: rgba(14, 116, 144, 0.12);
    border-color: rgba(14, 116, 144, 0.4);
    color: #0e7490;
}

.report-filter-actions .search-button:hover {
    background: rgba(14, 116, 144, 0.18);
}

.report-filter-actions .clear-button {
    background: rgba(185, 28, 28, 0.12);
    border-color: rgba(185, 28, 28, 0.4);
    color: #b91c1c;
}

.report-filter-actions .clear-button:hover {
    background: rgba(185, 28, 28, 0.18);
}

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

.report-actions .export-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: #15803d;
}

.report-actions .export-button:hover {
    background: rgba(22, 163, 74, 0.18);
}

.report-actions .comment-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: rgba(43, 22, 163, 0.12);
    border-color: rgba(43, 22, 163, 0.4);
    color: #2b16a3;
}

.report-actions .comment-button:hover {
    background: rgba(43, 22, 163, 0.18);
}

.report-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.report-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.report-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.report-page-button.is-active {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.35);
}

.report-pagination-ellipsis {
    font-size: 12px;
    color: var(--color-muted);
    padding: 0 4px;
}

.report-pagination-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.report-page-size {
    min-width: 120px;
}

.report-page-info {
    font-size: 12px;
    color: var(--color-muted);
}

.report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.report-row {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    text-align: left;
}

.report-row-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.report-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 3px 8px;
    background: #f8f9fa;
}

.report-row-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 180px;
}

.report-row-employee {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
}

.report-row:hover {
    border-color: rgba(0, 6, 34, 0.4);
    background: #f8f9fa;
}

.report-row.active {
    border-color: rgba(0, 6, 34, 0.6);
    background: rgba(0, 6, 34, 0.06);
}

.report-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.report-row-subtitle {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 4px;
}

.report-row-meta {
    font-size: 10px;
    color: var(--color-muted);
    text-align: right;
    white-space: nowrap;
}

.report-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-modal-card {
    background: #ffffff;
    border-radius: 18px;
    width: min(960px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.3);
}

.report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(14, 55, 144, 0.12);
    border-color: rgba(14, 55, 144, 0.4);
}

.report-modal-body {
    padding: 18px 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.report-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.report-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-muted);
}

.report-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.report-detail-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-details-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
}

.report-details-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
}

.report-details-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 6px;
}

.report-media {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.report-media-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
}

.report-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    min-height: 160px;
}

.report-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #f1f3f5;
    cursor: pointer;
}

.report-signature {
    min-height: 160px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #f1f3f5;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-signature img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    max-width: 320px;
}

.report-image-modal {
    z-index: 70;
}

.report-image-modal-card {
    width: min(980px, 94vw);
    max-height: 92vh;
}

.report-image-modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.report-image-modal-body img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: #f8f9fa;
}

        .green-btn {
            background: #15803d;
            border-color: #15803d;
            color: #ffffff;
        }
        .red-btn {
            background: #b91c1c;
            border-color: #b91c1c;
            color: #ffffff;
        }

.max-width-col {
    max-width: 300px !important;   /* Force the maximum width limit */
    white-space: normal !important; /* Overrides DataTables defaults to allow wrapping */
    word-break: break-word;        /* Prevents long un-broken strings from stretching the layout */
}
.max-xs-width-col {
    width: 100px !important;   /* Force the maximum width limit */
    white-space: normal !important; /* Overrides DataTables defaults to allow wrapping */
    word-break: break-word;        /* Prevents long un-broken strings from stretching the layout */
}

@media (max-width: 900px) {
    .map-shell {
        margin: -24px;
    }

    .panel-activity,
    .panel-search {
        width: 90vw;
    }

    .panel-activity {
        top: auto;
        bottom: 16px;
        height: 55vh;
    }

    .report-list {
        max-height: none;
    }

    .report-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-row-aside {
        align-items: flex-start;
        min-width: 0;
    }

    .report-media {
        grid-template-columns: 1fr;
    }

    .report-section {
        grid-template-columns: 1fr;
    }

    .report-filters {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .report-filters .floating-field,
    .report-filters .report-date-range {
        flex: 1 1 220px;
        min-width: 180px;
    }

    .report-date-range {
        flex-wrap: wrap;
    }

    .report-date-range .floating-field {
        flex: 1 1 140px;
        min-width: 140px;
    }

    .report-filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
