.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-icon.purple {
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent-purple);
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-info h3 span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.mt-32 {
    margin-top: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
}

.timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
    gap: 12px;
}

.timeline-empty i {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Dashboard Premium UI */
.dashboard-shell {
    width: min(970px, calc(100% - 360px));
    min-width: 720px;
    position: relative;
    z-index: 1;
    color: #eef5ff;
}

.dashboard-intro {
    margin-bottom: 26px;
}

.dashboard-intro h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1.72rem;
    line-height: 1.2;
    font-weight: 760;
    letter-spacing: 0;
}

.dashboard-intro p {
    margin: 0;
    color: rgba(221, 231, 246, 0.82);
    font-size: 0.96rem;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dash-stat-card {
    min-height: 112px;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1px solid rgba(145, 170, 210, 0.18);
    background:
        linear-gradient(145deg, rgba(23, 43, 76, 0.76), rgba(12, 29, 56, 0.58)),
        rgba(9, 23, 45, 0.56);
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dash-stat-card.is-clickable {
    cursor: pointer;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(178, 200, 236, 0.28);
    background:
        linear-gradient(145deg, rgba(28, 51, 89, 0.8), rgba(15, 35, 65, 0.64)),
        rgba(12, 29, 56, 0.62);
    box-shadow:
        0 28px 58px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    font-size: 1.25rem;
    flex: 0 0 auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dash-stat-card .stat-icon.blue {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.7));
    color: #dceaff;
}

.dash-stat-card .stat-icon.green {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.82), rgba(5, 132, 96, 0.72));
    color: #dffcf0;
}

.dash-stat-card .stat-icon.purple {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.82), rgba(91, 33, 182, 0.7));
    color: #eee7ff;
}

.dash-stat-card .stat-info {
    min-width: 0;
}

.dash-stat-card .stat-info p {
    margin: 0 0 6px;
    color: rgba(218, 229, 244, 0.82);
    font-size: 0.88rem;
    font-weight: 600;
}

.dash-stat-card .stat-info h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.78rem;
    line-height: 1;
    font-weight: 760;
}

.dash-stat-card .stat-info h3 span {
    color: rgba(225, 235, 248, 0.76);
    font-size: 0.9rem;
    font-weight: 500;
}

.dash-card-arrow {
    margin-left: auto;
    color: rgba(218, 229, 244, 0.66);
    font-size: 1rem;
}

.dash-history-card {
    margin-top: 28px;
    border-radius: 16px;
    border: 1px solid rgba(145, 170, 210, 0.18);
    background:
        linear-gradient(145deg, rgba(12, 30, 58, 0.72), rgba(7, 20, 40, 0.58)),
        rgba(8, 22, 43, 0.58);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 22px 22px 20px;
}

.dash-section-header {
    margin-bottom: 18px;
}

.dash-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-section-title h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.28rem;
    font-weight: 760;
    letter-spacing: 0;
}

.dash-section-title span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #e4efff;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.94), rgba(37, 99, 235, 0.72));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.dash-section-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.dash-section-actions .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: rgba(180, 205, 239, 0.86);
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.dash-section-actions .btn-text:hover {
    color: #ffffff;
}

.dash-section-actions .dash-danger-action {
    color: rgba(248, 113, 113, 0.92);
}

.dash-section-actions .dash-danger-action:hover {
    color: #fca5a5;
}

.dash-history-scroll {
    max-height: calc(100vh - 382px);
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: none;
}
.dash-history-scroll::-webkit-scrollbar {
    display: none;
}

.dash-timeline-loading,
.dash-timeline-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(205, 218, 237, 0.74);
    text-align: center;
}

.dash-timeline-empty i {
    font-size: 2rem;
    opacity: 0.5;
}

.dash-timeline-table {
    min-width: 0;
}

.dash-timeline-head,
.dash-timeline-row {
    display: grid;
    grid-template-columns: 170px 150px 100px minmax(0, 1fr);
    column-gap: 22px;
    align-items: center;
}

.dash-timeline-head {
    padding: 0 14px 12px;
    border-bottom: 1px solid rgba(151, 172, 204, 0.14);
    color: rgba(205, 220, 242, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
}

.dash-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-timeline-row {
    min-height: 48px;
    margin-top: 8px;
    padding: 11px 14px;
    border-radius: 9px;
    background: rgba(28, 47, 78, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.dash-timeline-row:hover {
    transform: translateY(-1px);
    background: rgba(35, 58, 94, 0.76);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dash-timeline-date,
.dash-timeline-recipient,
.dash-timeline-doc {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-timeline-date {
    color: rgba(222, 233, 247, 0.86);
    font-size: 0.88rem;
}

.dash-timeline-recipient {
    color: #f6f9ff;
    font-size: 0.9rem;
    font-weight: 680;
}

.dash-timeline-send {
    min-width: 0;
}

.dash-send-badge {
    max-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 7px;
    color: rgba(235, 244, 255, 0.94);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-send-badge.is-send {
    background: rgba(37, 99, 235, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-send-badge.is-receive {
    background: rgba(16, 185, 129, 0.32);
    color: rgba(219, 252, 239, 0.95);
}

.dash-send-badge.is-fail {
    background: rgba(220, 38, 38, 0.45);
    color: rgba(255, 210, 210, 0.96);
}

.dash-timeline-doc {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(224, 233, 247, 0.86);
    font-size: 0.87rem;
}

.dash-timeline-doc i {
    flex: 0 0 auto;
    color: rgba(147, 197, 253, 0.8);
    font-size: 0.78rem;
}

.dash-timeline-doc span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding-top: 18px;
    color: rgba(205, 220, 242, 0.78);
    font-size: 0.86rem;
}

.dash-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 9px;
    color: rgba(216, 229, 248, 0.82);
    background: rgba(29, 47, 78, 0.7);
}

.dash-page-btn:not(:disabled):hover {
    color: #ffffff;
    background: rgba(40, 64, 104, 0.86);
}

.dash-page-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.dash-timeline-error {
    padding: 24px;
    margin: 0;
    color: #fca5a5;
    text-align: center;
}

@media (max-width: 1280px) {
    .dashboard-shell {
        width: min(100%, 940px);
        min-width: 0;
    }
}

@media (max-width: 1024px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
    .dash-timeline-head,
    .dash-timeline-row {
        grid-template-columns: 145px 130px 92px minmax(0, 1fr);
        column-gap: 14px;
    }
}

@media (max-width: 760px) {
    .dashboard-shell {
        width: 100%;
    }
    .dashboard-intro h2 {
        font-size: 1.42rem;
    }
    .dash-history-card {
        padding: 16px;
    }
    .dash-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .dash-timeline-head {
        display: none;
    }
    .dash-timeline-row {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 8px;
    }
    .dash-timeline-date,
    .dash-timeline-recipient,
    .dash-timeline-send,
    .dash-timeline-doc {
        grid-column: auto;
    }
    .dash-timeline-doc {
        grid-column: 1 / -1;
    }
}

