﻿/* ═══════════════════════════════════════════════════════════════
   Documents & Statements — Corporate Portal
   Static colors & fonts (matches existing dashboard theme)
═══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ──────────────────────────────────────────── */
.ds-page {
    padding: 0;
    background: #f4f7fb;
    min-height: 100vh;
    font-family: var(--DashboardBodyFont) !important;
    color: #2e77f2;
}

/* ── Page header ───────────────────────────────────────────── */
.ds-page-header {
    background: #ffffff;
    border-bottom: 1px solid #dce5f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 1px 6px rgba(15, 39, 68, 0.06);
}

.ds-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: radial-gradient(circle, #2e77f2, #59c7fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgb(89 199 250 / 34%);
}

    .ds-header-icon .rzi-root {
        font-size: 22px !important;
        color: rgba(255, 255, 255, 0.92) !important;
    }

/* Header action buttons */
.ds-page-header .rz-button {
    font-size: 12px !important;
    font-family: var(--DashboardBodyFont) !important;
    border-radius: 5px !important;
    border-color: #d0dcea !important;
    color: rgb(46 119 242) !important;
    background: #ffffff !important;
}

    .ds-page-header .rz-button:hover {
        background: #eef3fa !important;
        border-color: #b5d4f4 !important;
        color: rgb(46 119 242) !important;
    }

/* ── Stat cards ────────────────────────────────────────────── */
.ds-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 24px 0;
}

.ds-stat-card {
    background: #ffffff;
    border: 1px solid #dce5f0;
    border-radius: 9px;
    padding: 14px 16px;
    transition: box-shadow 0.15s;
}

    .ds-stat-card:hover {
        box-shadow: 0 3px 12px rgba(15, 39, 68, 0.09);
    }

.ds-stat-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7a8d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
    font-family: var(--DashboardBodyFont) !important;
}

.ds-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f2744;
    line-height: 1;
    display: block;
}

    .ds-stat-value.ds-stat-red {
        color: #e24b4a;
    }

.ds-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ds-stat-icon .rzi-root {
        font-size: 18px !important;
    }

    .ds-stat-icon.navy {
        background: #eef3fa;
    }

        .ds-stat-icon.navy .rzi-root {
            color: #0f2744 !important;
        }

    .ds-stat-icon.red {
        background: #fcebeb;
    }

        .ds-stat-icon.red .rzi-root {
            color: #e24b4a !important;
        }

    .ds-stat-icon.blue {
        background: #e6f1fb;
    }

        .ds-stat-icon.blue .rzi-root {
            color: #185fa5 !important;
        }

/* ── Search bar ────────────────────────────────────────────── */
.ds-search-wrap {
    padding: 12px 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ds-search-input .rz-inputtext {
    border-radius: 6px !important;
    border: 1px solid #d0dcea !important;
    font-size: 12.5px !important;
    font-family: var(--DashboardBodyFont) !important;
    padding: 7px 12px !important;
    background: #ffffff !important;
    color: #2e77f2 !important;
}

    .ds-search-input .rz-inputtext:focus {
        border-color: #185fa5 !important;
        box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12) !important;
        outline: none !important;
    }

/* ── Accordion list ────────────────────────────────────────── */
.ds-accordion-list {
    padding: 12px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* RadzenCard as accordion container */
.ds-accordion {
    padding: 0 !important;
    border-radius: 9px !important;
    border: 1px solid #dce5f0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: box-shadow 0.15s !important;
    background: #ffffff !important;
}

.ds-acc-expanded {
    box-shadow: 0 3px 14px rgba(15, 39, 68, 0.1) !important;
}

/* Accordion header */
.ds-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #eef3fa;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
    gap: 8px;
}

    .ds-acc-header:hover {
        background: #e0ecf7;
    }

    .ds-acc-header.open {
        background: #1f60c0;
        color: #ffffff;
    }

/* Category icon wrap */
.ds-cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    transition: background 0.12s;
}

.ds-acc-header:not(.open) .ds-cat-icon {
    background: rgba(15, 39, 68, 0.08);
}

.ds-acc-header.open .ds-cat-icon .rzi-root {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 15px !important;
}

.ds-acc-header:not(.open) .ds-cat-icon .rzi-root {
    color: #0f2744 !important;
    font-size: 15px !important;
}

/* Accordion title */
.ds-acc-title {
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--DashboardBodyFont) !important;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-acc-header.open .ds-acc-title {
    color: rgba(255, 255, 255, 0.95);
}

.ds-acc-header:not(.open) .ds-acc-title {
    color: #212121;
}

/* Badges inside dark header */
.ds-acc-header.open .rz-badge {
    background: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
}

.ds-acc-header.open .rz-badge-danger {
    background: #e24b4a !important;
    color: #ffffff !important;
    border: none !important;
}

/* Icons inside dark header */
.ds-acc-header.open .rzi-root {
    color: rgba(255, 255, 255, 0.72) !important;
}

.ds-acc-header:not(.open) .rzi-root {
    color: #6b7a8d !important;
}

/* Accordion body */
.ds-acc-body {
    border-top: 1px solid #e8eef7;
    background: #ffffff;
    animation: dsSlideDown 0.18s ease-out both;
}

@keyframes dsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty state */
.ds-empty-state {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

    .ds-empty-state .rzi-root {
        font-size: 28px !important;
        color: #c5d0dc !important;
    }

    .ds-empty-state span {
        font-family: var(--DashboardBodyFont) !important;
        color: #6b7a8d;
    }

/* ── RadzenDataGrid ────────────────────────────────────────── */
.ds-grid.rz-datagrid {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Column headers */
.ds-grid .rz-datagrid-thead .rz-datagrid-column-header {
    background: #1e3d62 !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    font-family: var(--DashboardBodyFont) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 9px 14px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-bottom: none !important;
}

.ds-grid .rz-datagrid-thead .rz-sortable-column-header-content .rzi-root {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 14px !important;
}

/* Body rows */
.ds-grid .rz-datagrid-tbody .rz-datatable-row td {
    padding: 10px 14px !important;
    font-size: 12px !important;
    font-family: var(--DashboardBodyFont) !important;
    color: #2e77f2 !important;
    border-bottom: 1px solid #eef2f7 !important;
    vertical-align: middle !important;
    border-right: none !important;
}

.ds-grid .rz-datagrid-tbody .rz-datatable-row:last-child td {
    border-bottom: none !important;
}
.ds-stat-icon.red i {
    color: #f44336;
}
.ds-grid .rz-datagrid-tbody .rz-datatable-row:hover td {
    background: #f6f9fd !important;
}

.ds-grid .rz-datagrid-empty-message {
    font-size: 12px !important;
    font-family: var(--DashboardBodyFont) !important;
    color: #9aa5b4 !important;
    font-style: italic !important;
    padding: 18px 14px !important;
}

/* ── Document name cell ────────────────────────────────────── */
.ds-doc-title {
    font-family: var(--DashboardBodyFont) !important;
    font-size: 11.5px;
    color: #1a3a5c;
    font-weight: 500;
}

.ds-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .ds-status-dot.unread {
        background: #e24b4a;
    }

    .ds-status-dot.read {
        background: #639922;
    }

.ds-date-cell {
    font-size: 11.5px;
    color: #6b7a8d;
    font-family: var(--DashboardBodyFont) !important;
}

.ds-not-viewed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9aa5b4;
    font-style: italic;
    font-family: var(--DashboardBodyFont) !important;
}

    .ds-not-viewed .rzi-root {
        font-size: 12px !important;
        color: #9aa5b4 !important;
    }

/* ── Action buttons ─────────────────────────────────────────── */
.ds-view-btn.rz-button {
    font-size: 11px !important;
    font-family: var(--DashboardBodyFont) !important;
    border: 1px solid #185fa5 !important;
    color: #185fa5 !important;
    background: transparent !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: all 0.12s !important;
}

    .ds-view-btn.rz-button:hover {
        background: #185fa5 !important;
        color: #ffffff !important;
    }

    .ds-view-btn.rz-button .rzi-root {
        font-size: 13px !important;
        color: inherit !important;
    }

.ds-icon-btn.rz-button {
    width: 28px !important;
    height: 28px !important;
    min-width: unset !important;
    padding: 0 !important;
    border-radius: 4px !important;
    border: 1px solid #d0dcea !important;
    background: #ffffff !important;
    color: #6b7a8d !important;
    transition: all 0.12s !important;
}

    .ds-icon-btn.rz-button:hover {
        background: #e6f1fb !important;
        color: #185fa5 !important;
        border-color: #b5d4f4 !important;
    }

    .ds-icon-btn.rz-button .rzi-root {
        font-size: 13px !important;
        color: inherit !important;
    }


/* Add to your existing CSS */
.ds-grid .rz-datagrid-thead .rz-datagrid-column-header:last-child,
.ds-grid .rz-datagrid-tbody td:last-child {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
}

/* Also ensure the grid doesn't overflow its container */
.ds-grid {
    width: 100% !important;
    table-layout: fixed !important;
}


/* ── Responsive ─────────────────────────────────────────────── */
@@media (max-width: 680px) {
    .ds-page-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ds-stats-row {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px 16px 0;
    }

    .ds-accordion-list {
        padding: 10px 16px 24px;
    }

    .ds-search-wrap {
        padding: 10px 16px 0;
    }

    .ds-grid .rz-datagrid-thead .rz-datagrid-column-header:nth-child(3),
    .ds-grid .rz-datagrid-tbody td:nth-child(3) {
        display: none !important;
    }
}
