:root {
    --bg: #f3f5f9;
    --panel: #ffffff;
    --text: #17212f;
    --muted: #66758a;
    --border: #dde3ed;
    --navy: #16324f;
    --teal: #1d8f8d;
    --gold: #f4b942;
    --success: #198754;
}

body {
    font-family: "Manrope", sans-serif;
    background: radial-gradient(circle at top left, rgba(244, 185, 66, 0.18), transparent 28%), linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #14314c 0%, #1d4a63 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), #ffd77d);
    color: var(--navy);
    font-size: 1.4rem;
}

.brand-title {
    font-weight: 800;
    font-size: 1.05rem;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 1.5rem;
    margin-right: 0.4rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.page-subtitle {
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(221, 227, 237, 0.8);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(22, 50, 79, 0.08);
}

.card-stat {
    padding: 1.4rem;
    height: 100%;
}

.card-stat .icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 143, 141, 0.12);
    color: var(--teal);
    margin-bottom: 1rem;
}

.metric {
    font-size: 1.65rem;
    font-weight: 800;
}

.section-card {
    padding: 1.5rem;
}

.table thead th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.invoice-doc {
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    color: #1f2937;
}

.invoice-doc .invoice-shell {
    border: 1px solid #d9e1ea;
    border-radius: 22px;
    overflow: hidden;
}

.invoice-doc .invoice-topbar {
    background: linear-gradient(135deg, #14314c 0%, #1d4a63 100%);
    color: #fff;
    padding: 2.2rem;
}

.invoice-doc .invoice-topbar table,
.invoice-doc .invoice-grid,
.invoice-doc .invoice-items,
.invoice-doc .invoice-summary,
.invoice-doc .invoice-footer {
    width: 100%;
    border-collapse: collapse;
}

.invoice-doc .invoice-topbar .eyebrow,
.invoice-doc .invoice-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
}

.invoice-doc .invoice-topbar .eyebrow {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.35rem;
}

.invoice-doc .invoice-topbar .title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.invoice-doc .invoice-topbar .meta {
    font-size: 0.95rem;
    line-height: 1.7;
}

.invoice-doc .invoice-body {
    padding: 2rem 2.2rem 2.2rem;
}

.invoice-doc .invoice-grid td {
    width: 50%;
    vertical-align: top;
    padding-bottom: 1.25rem;
}

.invoice-doc .invoice-card {
    background: #f7fafc;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    height: 100%;
}

.invoice-doc .invoice-card .name {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0.45rem 0;
}

.invoice-doc .invoice-card .line {
    color: #334155;
    line-height: 1.7;
}

.invoice-doc .invoice-items {
    border: 1px solid #d9e1ea;
    border-radius: 16px;
    overflow: hidden;
}

.invoice-doc .invoice-items thead th {
    background: #ecf2f8;
    color: #486176;
    padding: 0.95rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    border-bottom: 1px solid #d9e1ea;
}

.invoice-doc .invoice-items tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e6edf4;
}

.invoice-doc .invoice-items tbody tr:last-child td {
    border-bottom: none;
}

.invoice-doc .invoice-items .amount,
.invoice-doc .text-right {
    text-align: right;
}

.invoice-doc .invoice-items .amount {
    width: 180px;
    white-space: nowrap;
    font-weight: 800;
}

.invoice-doc .invoice-footer {
    margin-top: 1.4rem;
}

.invoice-doc .invoice-footer td {
    vertical-align: top;
}

.invoice-doc .invoice-notes {
    padding-right: 1.5rem;
}

.invoice-doc .invoice-summary-wrap {
    width: 280px;
}

.invoice-doc .invoice-summary {
    border: 1px solid #d9e1ea;
    border-radius: 16px;
    overflow: hidden;
}

.invoice-doc .invoice-summary td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #e6edf4;
}

.invoice-doc .invoice-summary tr:last-child td {
    border-bottom: none;
    background: #14314c;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.guest-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.guest-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 26px;
    padding: 2rem;
    box-shadow: 0 22px 50px rgba(22, 50, 79, 0.12);
}

@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }
}
