/* Responsive dashboard styling for AmazonFlexPortal */

.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-title-wrap h1 {
    margin: 0;
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 700;
    color: #111827;
}

.dashboard-subtitle {
    margin: 0.4rem 0 0;
    color: #6b7280;
    font-size: 0.98rem;
}

.dashboard-subnav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-subnav a {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-card,
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dashboard-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.dashboard-card-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
}

.dashboard-kpi-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-kpi-value {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 700;
    color: #111827;
}

.dashboard-kpi-meta {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.dashboard-detail-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.dashboard-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-detail-label {
    color: #6b7280;
    font-size: 0.94rem;
}

.dashboard-detail-value {
    color: #111827;
    font-weight: 600;
    text-align: right;
}

.dashboard-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.85rem;
}

.dashboard-pill {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem;
    background: #f9fafb;
}

.dashboard-pill-label {
    display: block;
    font-size: 0.82rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.dashboard-pill-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
}

.dashboard-empty {
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    padding: 1rem;
    color: #6b7280;
    background: #f9fafb;
}

.day-group + .day-group {
    margin-top: 1.25rem;
}

.day-group-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

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

.table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.table th,
.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.table th {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f9fafb;
}

.table td {
    color: #111827;
    font-size: 0.95rem;
}

.table tbody tr:hover td {
    background: #fafcff;
}

.table th:last-child,
.table td:last-child {
    text-align: right;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #eef2ff;
    color: #3730a3;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-mobile-list {
    display: none;
    gap: 0.9rem;
}

.mobile-record {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
}

.mobile-record-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.mobile-record-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
}

.mobile-record-label {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.mobile-record-value {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .status-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 768px) {
    .dashboard-page {
        gap: 1rem;
    }

    .dashboard-title-wrap h1 {
        font-size: 1.55rem;
    }

    .dashboard-kpi-grid,
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-card,
    .dashboard-card {
        padding: 1rem;
        border-radius: 14px;
    }

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

@media (max-width: 576px) {
    .dashboard-kpi-grid,
    .status-grid,
    .dashboard-pill-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-subnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .dashboard-subnav a {
        text-align: center;
    }

    .table-container {
        display: none;
    }

    .dashboard-mobile-list {
        display: grid;
    }

    .mobile-record-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-table-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

    .dashboard-table-link:hover {
        text-decoration: underline;
    }

.dashboard-two-thirds-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
    gap: 1.5rem;
    align-items: start;
}

.dashboard-card-wide .table {
    min-width: 820px;
}

@media (max-width: 1200px) {
    .dashboard-two-thirds-grid {
        grid-template-columns: 1fr;
    }
}