/**
 * A-MIS dashboard interface — shared across all role dashboards.
 */

.dashboard-page .section-body > .row {
    margin-bottom: 0.35rem;
}

.dashboard-page .section-body > .row > [class*="col-"] {
    margin-bottom: 0.65rem;
}

/*
 * Keep statistics cards in a maximum of 2 rows.
 * These rows are rendered as Bootstrap flex rows; when there are "too many"
 * cards for the given breakpoint, Bootstrap wraps them onto a new line.
 * For stat rows we prefer horizontal overflow (scroll) instead of vertical
 * wrapping, so the layout stays capped at 2 lines.
 */
.dashboard-page .stats-cards-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: 0.35rem;
}

.dashboard-page .card.card-statistic-1 {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    margin-bottom: 0 !important;
    background: #fff;
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    min-height: 0;
    width: 100%;
}

.dashboard-page .card.card-statistic-1:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    transform: none;
}

.dashboard-page .card.card-statistic-1 .card-icon {
    float: none !important;
    flex-shrink: 0;
    border-radius: 0 !important;
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    margin: 0 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.dashboard-page .card.card-statistic-1 .card-icon .fas,
.dashboard-page .card.card-statistic-1 .card-icon .far {
    font-size: 1rem !important;
}

.dashboard-page .card.card-statistic-1 .card-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
}

.dashboard-page .card.card-statistic-1 .card-header {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    flex: none;
    min-width: 0;
    width: 100%;
    text-align: center;
}

.dashboard-page .card.card-statistic-1 .card-header h4 {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.dashboard-page .card.card-statistic-1 .card-body {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 0 !important;
    flex: none;
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

.dashboard-page .card.card-statistic-1 .card-body .text-small {
    font-size: 0.65rem !important;
    font-weight: 500;
    display: block;
}

.dashboard-page .card:not(.card-statistic-1):not(.card-hero) {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.25rem;
}

.dashboard-page .card .card-header {
    border-bottom: 1px solid #e2e8f0 !important;
    background: #fff !important;
    padding: 0.95rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-page .card .card-header h4 {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-page .card .card-header h4 i {
    color: #ca8a04;
    font-size: 1rem !important;
}

.dashboard-page .card .card-header h4 .fa-2x {
    font-size: 1rem !important;
}

.dashboard-page .card-header-action .btn {
    border-radius: 0 !important;
    font-size: 0.8rem;
    font-weight: 600;
}

.dashboard-chart-card .card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.dashboard-page .card.card-hero {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    overflow: hidden;
}

.dashboard-page .card.card-hero .card-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #fff;
    border-bottom: 3px solid #ffc107 !important;
    padding: 1.25rem 1.35rem;
}

.dashboard-page .card.card-hero .card-header h4,
.dashboard-page .card.card-hero .card-description {
    color: #fff !important;
}

.dashboard-page .card.card-hero .card-header .card-icon {
    float: none !important;
    margin: 0 0 0.75rem !important;
    color: #ffc107 !important;
    line-height: 1;
}

.dashboard-page .card.card-hero .card-header .card-icon i {
    font-size: 2rem !important;
}

.dashboard-page .table-invoice .table {
    margin-bottom: 0;
}

.dashboard-page .badge {
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 0.72rem;
}

.dashboard-page .btn-icon-split .btn-icon {
    border-radius: 0 !important;
}

.dashboard-page .list-unstyled-border li {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
}

.dashboard-page .list-unstyled-border li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dashboard-page .ticket-item {
    border-radius: 0 !important;
}

.dashboard-page .status-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-page .status-pending { background: #ffc107; color: #000; }
.dashboard-page .status-approved { background: #28a745; color: #fff; }
.dashboard-page .status-rejected { background: #dc3545; color: #fff; }
.dashboard-page .status-review { background: #17a2b8; color: #fff; }
.dashboard-page .status-high { background: #dc3545; color: #fff; }
.dashboard-page .status-medium { background: #ffc107; color: #000; }
.dashboard-page .status-low { background: #17a2b8; color: #fff; }

.dashboard-quick-actions .btn {
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 767px) {
    .dashboard-page .section-header,
    .dashboard-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-page .section-header-breadcrumb {
        margin-left: 0 !important;
    }

    .dashboard-page .card.card-statistic-1 .card-header h4 {
        white-space: normal;
    }
}
