:root {
    --soft-bg: #f4f7fb;
    --card-radius: 1.25rem;
}

body {
    background: var(--soft-bg);
}

.page-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}

.stat-card {
    position: relative;
    background: #fff;
    border-radius: var(--card-radius);
    padding: 1.35rem;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.08);
    min-height: 9rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: clamp(2rem, 8vw, 3.25rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-top: 1rem;
}

.card {
    border-radius: var(--card-radius);
}

.progress,
.progress-stacked {
    height: 0.75rem;
    border-radius: 999px;
}

.progress-lg {
    height: 1rem;
}

.search-input {
    max-width: 24rem;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: radial-gradient(circle at top left, #dbeafe, transparent 30%), #f8fafc;
}

.login-card {
    width: min(100%, 28rem);
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem;
}

.brand-mark {
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    display: inline-grid;
    place-items: center;
    background: #0d6efd;
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
}

.survey-dashboard {
    max-width: 1440px;
    margin: 0 auto;
}

.survey-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.75rem 2rem;
    border-radius: var(--card-radius);
    color: #fff;
    background: radial-gradient(circle at 90% 20%, rgba(255, 196, 32, .28), transparent 24rem), linear-gradient(125deg, #16202a, #263746);
}

.survey-dashboard-header h1 {
    margin: .15rem 0;
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    font-weight: 850;
    letter-spacing: -.045em;
}

.survey-dashboard-header p { margin: 0; color: rgba(255, 255, 255, .72); }
.survey-dashboard-kicker, .survey-metric-label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.survey-dashboard-kicker { color: #ffd056; }

.survey-metric-card {
    height: 100%;
    padding: 1.2rem;
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 .75rem 2rem rgba(15, 23, 42, .08);
}

.survey-metric-icon, .survey-action-icon {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .85rem;
    font-size: 1.2rem;
}

.survey-metric-label { margin-top: 1rem; color: #64748b; }
.survey-metric-value { margin-top: .15rem; color: #16202a; font-size: 2.25rem; font-weight: 850; letter-spacing: -.06em; line-height: 1; }

.survey-activity-chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; height: 14rem; gap: .75rem; }
.survey-activity-day { display: grid; grid-template-rows: auto 1fr auto; gap: .5rem; height: 100%; text-align: center; }
.survey-activity-count { color: #334155; font-size: .85rem; font-weight: 800; }
.survey-activity-bar-wrap { display: flex; align-items: end; height: 100%; padding: 0 .2rem; background: #edf2f7; border-radius: .8rem; overflow: hidden; }
.survey-activity-bar { width: 100%; min-height: .25rem; border-radius: .65rem; background: linear-gradient(180deg, #ffd056, #efaa00); }
.survey-activity-label { color: #64748b; font-size: .75rem; font-weight: 750; text-transform: capitalize; }

.survey-action-list { display: grid; gap: .75rem; }
.survey-action-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .75rem; color: inherit; text-decoration: none; border: 1px solid #e2e8f0; border-radius: 1rem; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.survey-action-item:hover { color: inherit; border-color: #cbd5e1; box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08); transform: translateY(-1px); }
.survey-action-item strong, .survey-action-item small { display: block; }
.survey-action-item small { margin-top: .1rem; color: #64748b; }

@media (max-width: 767.98px) {
    .survey-dashboard-header { align-items: flex-start; flex-direction: column; padding: 1.35rem; }
    .survey-activity-chart { gap: .4rem; height: 11rem; }
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive tr {
        border-bottom: 1px solid #e2e8f0;
        padding: 0.75rem 0;
    }

    .table-responsive td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: 0.45rem 1rem;
        text-align: right !important;
    }

    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        text-align: left;
    }
}

.country-order-list {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.06);
}

.country-order-header,
.country-order-row {
    grid-template-columns: minmax(0, 1fr) 7rem 5rem 5rem;
    align-items: center;
    column-gap: 1rem;
}

.country-order-header {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.country-order-row {
    display: grid;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.country-order-row:last-child {
    border-bottom: 0;
}

.country-name {
    font-weight: 750;
    font-size: 1rem;
    min-width: 0;
}

.country-metric {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

.country-metric .metric-label {
    display: none;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.country-metric .metric-value {
    font-weight: 750;
}

.country-metric.primary .metric-value {
    font-size: 1.25rem;
    font-weight: 850;
}

@media (max-width: 767.98px) {
    .country-order-list {
        border-radius: 0.9rem;
    }

    .country-order-row {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
        gap: 0.75rem;
        padding: 0.8rem 0.9rem;
    }

    .country-name {
        font-size: 1rem;
    }

    .country-metric {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.05rem;
    }

    .country-metric .metric-label {
        display: inline;
        font-size: 0.65rem;
        line-height: 1;
    }

    .country-metric .metric-value {
        line-height: 1.1;
    }

    .country-metric.primary .metric-value {
        font-size: 1.15rem;
    }
}

/* Order charts and totals */
.order-chart {
    display: grid;
    gap: 0.8rem;
}

.order-chart-row {
    display: grid;
    grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr) 3.5rem;
    align-items: center;
    gap: 0.75rem;
}

.order-chart-label {
    font-weight: 700;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-chart-track {
    height: 1rem;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.order-chart-bar {
    height: 100%;
    min-width: 0.25rem;
    background: linear-gradient(90deg, #0d6efd, #60a5fa);
    border-radius: 999px;
}

.order-chart-value {
    text-align: right;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-chart .order-chart-row {
    grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr) 3rem;
}

.country-order-header,
.country-order-row {
    grid-template-columns: minmax(0, 1fr) 6rem 4.5rem 4.5rem 6rem;
}

.country-order-total {
    background: #f8fafc;
    font-weight: 850;
}

.country-order-total .country-name,
.country-order-total .metric-value {
    font-weight: 850;
}

@media (max-width: 767.98px) {
    .order-chart-row,
    .dashboard-chart .order-chart-row {
        grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr) 2.75rem;
        gap: 0.55rem;
    }

    .order-chart-label {
        font-size: 0.9rem;
    }

    .country-order-row {
        grid-template-columns: minmax(0, 1fr) auto auto auto auto;
        gap: 0.65rem;
    }
}
