﻿:root {
    --page-bg: #f4f6f5;
    --surface: #ffffff;
    --surface-soft: #f8faf9;
    --border: #dfe6e2;
    --text-primary: #26332f;
    --text-secondary: #6f7d77;
    --text-muted: #94a09b;
    --primary: #466a60;
    --primary-soft: #e7efec;
    --accent: #b68a58;
    --accent-soft: #f3ebe1;
    --success: #4f7d66;
    --success-soft: #e7f1eb;
    --warning: #b1813f;
    --warning-soft: #f8efdf;
    --danger: #ad625d;
    --danger-soft: #f7e8e7;
    --info: #5d768c;
    --info-soft: #e8eef3;
    --shadow-sm: 0 2px 8px rgba(38, 51, 47, 0.05);
    --shadow-md: 0 10px 28px rgba(38, 51, 47, 0.08);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text-primary);
}

button,
input,
select {
    font: inherit;
}

.dashboard-shell {
    width: min(1600px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 45px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-title h1 {
    margin: 0 0 7px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.4px;
}

.dashboard-title p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
}

    .btn-primary:hover {
        background: #38574f;
        transform: translateY(-1px);
    }

.btn-secondary {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border);
}

    .btn-secondary:hover {
        border-color: #c6d0cb;
        background: var(--surface-soft);
    }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.info-row, 
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 9px 0;
}
.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

    .dashboard-card:hover {
        box-shadow: var(--shadow-md);
    }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 18px 13px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 1rem;
}

.card-title h2 {
    margin: 0;
    font-size: 0.98rem;
}

.card-title span {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.card-link {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.78rem;
}

.mini-table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 11px 14px;
    text-align: left;
    color: var(--text-secondary);
    background: var(--surface-soft);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

td {
    padding: 12px 14px;
    border-top: 1px solid #edf1ef;
    font-size: 0.79rem;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fafcfb;
}

.mini-table td,
.mini-table th {
    padding-right: 12px;
    padding-left: 12px;
}

.cell-main {
    font-weight: 700;
    color: var(--text-primary);
}

.cell-sub {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
}

.status-success {
    color: var(--success);
    background: var(--success-soft);
}

.status-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.status-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-info {
    color: var(--info);
    background: var(--info-soft);
}

.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.large-card .card-header {
    padding: 19px 20px;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 100%);
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

    .search-box input {
        width: 100%;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text-primary);
    }

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-select {
    min-width: 125px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    background: var(--surface);
    outline: none;
}

.data-table-wrapper {
    overflow-x: auto;
}

.data-table th,
.data-table td {
    padding: 14px 17px;
}

.order-code {
    color: var(--primary);
    font-weight: 800;
}

.amount {
    font-weight: 800;
    color: var(--text-primary);
}

.side-stack {
    display: grid;
    gap: 22px;
}

.stat-list {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.stat-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.stat-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.stat-item-title {
    font-size: 0.82rem;
    font-weight: 700;
}

.stat-item-value {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
}

.progress {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #e3e9e6;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #6f9087);
}

.activity-list {
    margin: 0;
    padding: 18px;
    list-style: none;
}

.activity-item {
    position: relative;
    padding: 0 0 18px 25px;
}

    .activity-item:last-child {
        padding-bottom: 0;
    }

    .activity-item::before {
        content: "";
        position: absolute;
        top: 5px;
        left: 0;
        width: 10px;
        height: 10px;
        border: 3px solid var(--surface);
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-soft);
    }

    .activity-item::after {
        content: "";
        position: absolute;
        top: 18px;
        left: 5px;
        width: 1px;
        height: calc(100% - 11px);
        background: var(--border);
    }

    .activity-item:last-child::after {
        display: none;
    }

    .activity-item strong {
        display: block;
        margin-bottom: 5px;
        font-size: 0.79rem;
    }

    .activity-item span {
        color: var(--text-secondary);
        font-size: 0.72rem;
        line-height: 1.8;
    }

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.pagination {
    display: flex;
    gap: 6px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    background: var(--surface);
    cursor: pointer;
}

    .page-btn.active {
        color: #fff;
        background: var(--primary);
        border-color: var(--primary);
    }

@media (max-width: 1250px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-shell {
        width: min(100% - 22px, 1600px);
        padding-top: 18px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-grid,
    .side-stack {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
    }

        .header-actions .btn {
            flex: 1;
        }

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        flex: 1;
        min-width: 0;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
