.admin-sidebar {
    height: 100dvh;
}

.sidebar-menu {
    overflow-y: auto;
    min-height: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.admin-header-menu {
    display: none;
}

.admin-hamburger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 14px;
    border: none;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(23, 107, 77, 0.28);
    flex-shrink: 0;
}

.admin-hamburger span {
    width: 20px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.sidebar-toggle {
    display: none;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.request-table {
    min-width: 760px;
}

.table-panel {
    border: 1px solid rgba(23, 107, 77, 0.22);
    box-shadow: 0 14px 30px rgba(9, 34, 24, 0.08);
}

.request-table th,
.request-table td {
    border-bottom: 1px solid rgba(23, 107, 77, 0.14);
    white-space: nowrap;
    text-align: center;
}

.request-table td:first-child,
.request-table td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.request-table td:last-child {
    white-space: nowrap;
}

.request-table td:last-child .btn {
    min-height: 40px;
}

.request-table tbody tr {
    cursor: pointer;
}

.request-table tbody tr:hover {
    background: rgba(23, 107, 77, 0.06);
}

.request-table tbody td[colspan] {
    color: var(--gray-600);
    font-weight: 500;
    padding: 24px 16px;
}

.stats-grid .stat-card:first-child .stat-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.request-preview-modal {
    max-height: min(88vh, 720px);
    overflow-y: auto;
}

.preview-actions .btn {
    min-height: 46px;
}

.admin-overview-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
    padding: 28px 30px;
    background:
        radial-gradient(circle at top right, rgba(197, 150, 45, 0.14), transparent 24%),
        linear-gradient(135deg, #edf6ef 0%, #ffffff 100%);
    border: 1px solid rgba(23, 107, 77, 0.16);
    border-radius: 22px;
    box-shadow: 0 20px 38px rgba(9, 34, 24, 0.07);
    position: relative;
    overflow: hidden;
}

.admin-overview-hero::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(197, 150, 45, 0.84) 100%);
}

.admin-overview-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(23, 107, 77, 0.09);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-overview-copy h1 {
    font-size: 32px;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.admin-overview-copy p {
    max-width: 58ch;
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.admin-overview-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
}

.admin-view {
    display: none;
}

.admin-view.admin-view-active {
    display: block;
}

.admin-requests-hero {
    margin-bottom: 20px;
}

.admin-dashboard-panels {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-dashboard-panel {
    position: relative;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(197, 150, 45, 0.08), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    border: 1px solid rgba(23, 107, 77, 0.16);
    border-radius: 22px;
    box-shadow: 0 16px 34px rgba(9, 34, 24, 0.06);
    overflow: hidden;
}

.admin-dashboard-panel::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(197, 150, 45, 0.7) 100%);
    opacity: 0.85;
}

.admin-dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(23, 107, 77, 0.1);
}

.admin-dashboard-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-dashboard-panel-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 12px 22px rgba(23, 107, 77, 0.2);
    flex-shrink: 0;
}

.admin-dashboard-panel-icon i,
.admin-dashboard-note-icon i {
    color: var(--white);
}

.admin-dashboard-panel-header h3 {
    font-size: 18px;
    color: var(--gray-900);
}

.admin-dashboard-panel-header span {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 600;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.admin-summary-item {
    position: relative;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(23, 107, 77, 0.1);
    box-shadow: 0 10px 24px rgba(9, 34, 24, 0.04);
}

.admin-summary-item::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(23, 107, 77, 0.9) 0%, rgba(197, 150, 45, 0.6) 100%);
    opacity: 0.85;
}

.admin-summary-label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.admin-summary-item strong {
    display: block;
    color: var(--gray-900);
    line-height: 1.55;
    font-size: 16px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.admin-dashboard-note-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-dashboard-note-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 107, 77, 0.08);
    color: var(--gray-700);
}

.admin-dashboard-note-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    flex-shrink: 0;
}

.admin-dashboard-note-list li div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-dashboard-note-list li strong {
    color: var(--gray-900);
    font-size: 15px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.admin-dashboard-note-list li span {
    color: var(--gray-600);
    line-height: 1.6;
}

.reports-stats-grid {
    margin-bottom: 24px;
}

.reports-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 248, 0.98) 100%);
    border: 1px solid rgba(23, 107, 77, 0.12);
    box-shadow: 0 12px 26px rgba(9, 34, 24, 0.05);
    position: relative;
    overflow: hidden;
}

.report-breakdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(197, 150, 45, 0.82) 100%);
}

.report-breakdown-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-left: 6px;
}

.report-breakdown-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.report-breakdown-label {
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.report-breakdown-meta {
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.report-breakdown-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 52px;
    padding: 8px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 12px 22px rgba(23, 107, 77, 0.2);
}

.report-breakdown-empty {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 107, 77, 0.08);
    color: var(--gray-600);
    font-weight: 500;
}

.admin-header {
    min-height: 0;
    display: none;
}

.header-content {
    width: min(820px, 100%);
    margin: 0 auto;
    text-align: center;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.admin-header-mobile {
    display: none;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.admin-header-mobile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-header-mobile-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.1;
}

.admin-header-mobile-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: #5f766b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
}

@media (max-width: 1024px) {
    html.menu-open,
    body.menu-open {
        overflow: hidden;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 500;
        box-shadow: 12px 0 32px rgba(15, 23, 42, 0.14);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 16px 20px;
        gap: 18px;
        min-height: 0;
        align-items: center;
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
    }

    .admin-header-menu {
        display: inline-flex;
        position: static;
    }

    .admin-header-mobile {
        display: flex;
        justify-content: flex-start;
    }

    .admin-header-mobile-text {
        align-items: flex-start;
    }

    .header-content {
        text-align: left;
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .admin-overview-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-overview-actions {
        width: 100%;
        min-width: 0;
    }

    .admin-dashboard-panels {
        grid-template-columns: 1fr;
    }

    .reports-panels {
        grid-template-columns: 1fr;
    }

    .stats-grid .stat-card {
        min-height: 104px;
    }

    .admin-content {
        padding: 100px 24px 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        align-items: stretch;
    }

    .filter-select {
        min-width: 0;
        flex: 1 1 220px;
    }

    .filter-spacer {
        display: none;
    }

    .preview-actions {
        gap: 8px;
    }

    .insights-grid,
    .quick-insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-overview-hero {
        gap: 14px;
        margin-bottom: 18px;
        padding: 18px 18px 16px;
        border-radius: 18px;
    }

    .admin-overview-eyebrow {
        margin-bottom: 10px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .admin-overview-copy h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .admin-overview-copy p {
        font-size: 14px;
        line-height: 1.6;
    }

    .admin-header {
        padding: 12px 14px;
        align-items: flex-start;
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
    }

    .admin-header-mobile {
        display: flex;
        justify-content: flex-start;
    }

    .admin-header-mobile-text {
        align-items: flex-start;
    }

    .header-content {
        text-align: left;
    }

    .header-title {
        width: 100%;
    }

    .header-title h1 {
        font-size: 22px;
        line-height: 1.2;
    }

    .header-title p {
        max-width: none;
        font-size: 13px;
    }

    .header-search {
        width: 100%;
        min-height: 52px;
        padding-left: 46px;
        border-radius: 16px;
    }

    .header-search input {
        height: 52px;
    }

    .admin-header-menu {
        margin-right: 4px;
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .admin-hamburger {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .admin-content {
        padding: 116px 16px 16px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-menu {
        padding: 14px;
    }

    .sidebar-link {
        min-height: 48px;
        padding: 14px;
    }

    .stats-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stats-grid .stat-card {
        flex: 0 0 240px;
        padding: 18px 16px;
        min-height: 100px;
        scroll-snap-align: start;
    }

    .admin-dashboard-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
        flex: none;
    }

    .filter-bar .btn {
        width: 100%;
        grid-column: 1 / -1;
        flex: none;
    }

    .filter-select {
        min-width: 0;
    }

    .filter-spacer {
        display: none;
    }

    .table-panel .panel-header,
    .table-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .request-table {
        min-width: 680px;
    }

    .request-table th,
    .request-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .preview-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-actions .btn {
        width: 100%;
    }

    .request-preview-modal {
        width: calc(100vw - 24px);
        max-width: none;
        padding: 20px;
    }

    .request-preview-modal .modal-header h3 {
        font-size: 19px;
    }

    .preview-row {
        padding: 13px 14px;
        border-radius: 14px;
    }
}
