:root {
    --ink: #1f2937;
    --muted: #667085;
    --line: #e5e7eb;
    --panel: #ffffff;
    --surface: #f6f8fb;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #2563eb;
    --warning: #b45309;
    --danger: #b42318;
    --success: #067647;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
}

.customer-portal {
    background: #f7fafc;
}

a {
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 278px;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 18px 16px;
    z-index: 1030;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--ink);
    padding: 6px 6px 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
    font-weight: 700;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 1px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    color: #344054;
    border-radius: 8px;
    padding: 9px 10px;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: var(--brand-dark);
    background: #eaf7f4;
}

.nav-section {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 18px 10px 7px;
}

.app-main {
    margin-left: 278px;
    min-width: 0;
    width: calc(100% - 278px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 520px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    background: #fff;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-weight: 600;
}

.user-chip span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: #4f46e5;
    border-radius: 50%;
    font-size: 12px;
}

.page-content {
    padding: 28px;
}

.app-footer {
    padding: 18px 28px 26px;
    color: var(--muted);
    font-size: 13px;
}

.customer-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
    padding: 12px 34px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
}

.customer-brand {
    border: 0;
    margin: 0;
    padding: 0;
}

.customer-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-nav a {
    color: #344054;
    font-weight: 650;
    padding: 9px 12px;
    border-radius: 8px;
}

.customer-nav a:hover,
.customer-nav a.active {
    color: var(--brand-dark);
    background: #eaf7f4;
}

.customer-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 10px;
}

.customer-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.customer-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: center;
    padding: 28px;
    color: #073b3a;
    background: linear-gradient(135deg, #ecfdf3, #eff8ff);
    border: 1px solid #c7eee4;
    border-radius: 8px;
}

.customer-hero h1 {
    max-width: 720px;
    margin: 14px 0 10px;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 760;
}

.customer-hero p {
    max-width: 620px;
    color: #475467;
    font-size: 16px;
}

.customer-location-panel {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.page-heading h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 750;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.breadcrumb-wrap {
    margin-bottom: 14px;
    font-size: 13px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric-card,
.panel,
.table-panel,
.empty-state,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-card {
    padding: 18px;
}

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.metric-value {
    font-size: 28px;
    font-weight: 750;
    margin-top: 10px;
}

.metric-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.panel {
    padding: 20px;
    margin-bottom: 18px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.form-label {
    font-weight: 600;
    color: #344054;
}

.form-hint,
.validation-placeholder {
    color: var(--muted);
    font-size: 12px;
}

.validation-placeholder {
    min-height: 18px;
}

.table-panel {
    overflow: hidden;
}

.table-panel .table {
    margin: 0;
}

.table thead th {
    color: #475467;
    background: #f9fafb;
    border-bottom-color: var(--line);
    font-size: 12px;
    text-transform: uppercase;
}

.table td,
.table th {
    padding: 14px 16px;
    vertical-align: middle;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status.success { color: var(--success); background: #ecfdf3; }
.status.warning { color: var(--warning); background: #fffaeb; }
.status.info { color: #175cd3; background: #eff8ff; }
.status.danger { color: var(--danger); background: #fef3f2; }
.status.neutral { color: #475467; background: #f2f4f7; }

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.notice.success { color: var(--success); background: #ecfdf3; border-color: #abefc6; }
.notice.warning { color: var(--warning); background: #fffaeb; border-color: #fedf89; }
.notice.info { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }

.progress-line {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.progress-step {
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.progress-step.done {
    border-color: #7cd4bd;
    background: #f0fdf9;
}

.empty-state {
    padding: 34px;
    text-align: center;
    color: var(--muted);
}

.empty-state i {
    display: block;
    color: #98a2b3;
    font-size: 32px;
    margin-bottom: 8px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 480px;
    background: #f7fafc;
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 58px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.login-hero h1 {
    max-width: 680px;
    font-size: 44px;
    line-height: 1.08;
    font-weight: 760;
}

.login-hero p {
    max-width: 620px;
    color: rgba(255, 255, 255, .86);
    font-size: 17px;
}

.login-card {
    align-self: center;
    margin: 32px;
    padding: 30px;
}

.rating-stars {
    color: #f59e0b;
    font-size: 22px;
    letter-spacing: 2px;
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    align-items: end;
    height: 180px;
    padding-top: 12px;
}

.chart-bars span {
    display: block;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #0f766e, #38bdf8);
    min-height: 28px;
}

.pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        padding: 12px 16px;
    }

    .page-content {
        padding: 20px 16px;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 36px 24px;
    }

    .login-hero h1 {
        font-size: 34px;
    }

    .customer-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .customer-header .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .customer-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .metric-grid,
    .progress-line {
        grid-template-columns: 1fr;
    }

    .page-heading {
        flex-direction: column;
    }

    .topbar-actions .badge,
    .search-box {
        display: none;
    }

    .customer-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .customer-hero h1 {
        font-size: 30px;
    }
}
