:root {
    --ink: #1e1b2e;
    --muted: #6e6880;
    --line: #e5e1ef;
    --bg: #f3f1f8;
    --card: #ffffff;
    --sidebar: #151222;
    --sidebar-text: #e4dff4;
    --sidebar-muted: #a39bbd;
    --accent: #5b4dff;
    --accent-dark: #3f32d6;
    --accent-soft: #eeebff;
    --gold: #e7b15a;
    --danger: #c2354d;
    --success: #0d7a56;
    --warning: #9a6200;
    --shadow: 0 1px 2px rgba(21, 18, 34, 0.04), 0 18px 40px rgba(30, 27, 46, 0.06);
    --bs-body-font-family: "Segoe UI", system-ui, sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-primary: var(--accent);
    --bs-primary-rgb: 91, 77, 255;
    --bs-link-color: var(--accent-dark);
    --bs-link-hover-color: #2e22b8;
    --bs-border-color: var(--line);
    --bs-border-radius: 0.85rem;
    --bs-heading-color: var(--ink);
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(91, 77, 255, 0.08), transparent 60%),
        radial-gradient(700px 380px at -10% 0%, rgba(231, 177, 90, 0.14), transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
.brand-name,
.stat-value,
.guest-hero-title,
.empty-panel h2 {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    background: #fff;
    color: var(--ink);
    padding: 8px 12px;
    z-index: 2000;
    border-radius: 10px;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 3px solid #7c70ff;
    outline-offset: 2px;
}

.btn {
    --bs-btn-font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 12px;
    padding: 0.58rem 1.05rem;
    letter-spacing: -0.015em;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    border-radius: 10px;
    padding: 0.38rem 0.7rem;
    font-size: 0.82rem;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #5346f0;
    --bs-btn-border-color: #5346f0;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4338ca;
    --bs-btn-hover-border-color: #4338ca;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #372eb8;
    --bs-btn-active-border-color: #372eb8;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #5346f0;
    --bs-btn-disabled-border-color: #5346f0;
    background-image: linear-gradient(180deg, #6d62ff 0%, #4f42ea 100%);
    border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 18px rgba(79, 66, 234, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background-image: linear-gradient(180deg, #7a70ff 0%, #4338ca 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 22px rgba(79, 66, 234, 0.34);
}

.btn-outline-secondary {
    --bs-btn-color: #322c4a;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #ddd7ea;
    --bs-btn-hover-color: #1e1b2e;
    --bs-btn-hover-bg: #f7f5ff;
    --bs-btn-hover-border-color: #c9c0e4;
    --bs-btn-active-bg: #eeebff;
    --bs-btn-active-border-color: #c9c0e4;
    --bs-btn-active-color: #1e1b2e;
    box-shadow: 0 1px 2px rgba(30, 27, 46, 0.04);
}

.btn-outline-danger {
    --bs-btn-color: var(--danger);
    --bs-btn-border-color: #f0c5ce;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--danger);
    --bs-btn-hover-border-color: var(--danger);
    --bs-btn-active-bg: #a1253c;
    --bs-btn-active-border-color: #a1253c;
    --bs-btn-active-color: #fff;
    background: #fff;
}

.btn-danger {
    --bs-btn-bg: var(--danger);
    --bs-btn-border-color: var(--danger);
    --bs-btn-hover-bg: #a1253c;
    --bs-btn-hover-border-color: #a1253c;
    box-shadow: 0 8px 16px rgba(194, 53, 77, 0.22);
}

.btn-link {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.btn-link:hover {
    color: #2e22b8;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #514b63;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    border-color: #ddd6ea;
    border-radius: 12px;
    min-height: 44px;
    background-color: #fff;
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.form-control::placeholder {
    color: #a39cb4;
}

.form-control:focus,
.form-select:focus {
    border-color: #8d82ff;
    box-shadow: 0 0 0 4px rgba(91, 77, 255, 0.14);
}

textarea.form-control {
    min-height: 108px;
}

.form-control-color {
    min-height: 44px;
    width: 72px;
    padding: 6px;
}

.req {
    color: var(--danger);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 272px;
    background:
        radial-gradient(420px 220px at 0% 0%, rgba(91, 77, 255, 0.35), transparent 60%),
        var(--sidebar);
    color: var(--sidebar-text);
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    padding: 22px 16px 18px;
    overflow: auto;
}

.brand,
.guest-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    margin: 4px 8px 26px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #8d84ff, #4f42ea 55%, #e7b15a);
    color: #fff;
    font-size: 1.2rem;
    flex: 0 0 auto;
    box-shadow: 0 8px 16px rgba(79, 66, 234, 0.35);
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    flex: 0 0 auto;
}

.brand-kicker,
.brand-name {
    display: block;
}

.brand-kicker {
    color: var(--sidebar-muted);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.brand-name {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    font-size: 1.15rem;
    color: #fff;
}

.nav-label {
    margin: 0 12px 8px;
    color: var(--sidebar-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 12px;
    padding: 8px 10px;
    font-weight: 600;
}

.side-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #d9d3ef;
    flex: 0 0 auto;
}

.side-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.side-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.side-link.is-active .side-icon {
    background: linear-gradient(180deg, #7a70ff, #4f42ea);
    color: #fff;
    box-shadow: 0 6px 14px rgba(79, 66, 234, 0.4);
}

.side-user {
    margin-top: auto;
    padding: 16px 8px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f3d392, #e7b15a);
    color: #3a2a08;
    font-weight: 800;
    flex: 0 0 auto;
}

.side-user-copy {
    min-width: 0;
    flex: 1;
}

.side-user-name {
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-user-email {
    color: var(--sidebar-muted);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-signout {
    color: #efeaff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    flex: 0 0 auto;
}

.side-signout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.app-main {
    min-width: 0;
    flex: 1;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 241, 248, 0.82);
    backdrop-filter: blur(16px);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-topbar h1 {
    font-size: 1.85rem;
    letter-spacing: -0.04em;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.topbar-date {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
}

.nav-toggle {
    border: 1px solid var(--line);
    background: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--ink);
    box-shadow: var(--shadow);
}

.app-content {
    padding: 6px 32px 56px;
    max-width: 1280px;
}

#mobileNav {
    background: var(--sidebar);
    color: var(--sidebar-text);
    width: min(320px, 88vw);
}

#mobileNav .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#mobileNav .offcanvas-title {
    color: #fff;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1.35rem;
}

#mobileNav .btn-close {
    filter: invert(1) grayscale(1);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    min-height: calc(100% - 8px);
}

.panel,
.filter-panel {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 20px 22px;
}

.profile-card {
    background: linear-gradient(#e7e4ff, #ffffff 92px);
    border-top: 5px solid #4f42ea;
}

.filter-panel {
    padding: 16px 16px 14px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.filter-panel .row > .d-flex {
    margin-left: auto;
    justify-content: flex-end;
}

.hero-band {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
    padding: 8px 4px 4px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-band h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero-band p {
    margin: 6px 0 0;
    color: var(--muted);
    max-width: 460px;
}

.hero-actions,
.page-actions,
.preview-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.page-actions,
.preview-toolbar {
    margin-bottom: 16px;
}

.page-actions form,
.preview-toolbar form {
    margin: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 16px 16px 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    min-height: 138px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -28px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--tint, var(--accent-soft));
    opacity: 0.9;
}

.stat-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(30, 27, 46, 0.1);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tint, var(--accent-soft));
    color: var(--tone, var(--accent-dark));
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.stat-invoices { --tint: #eeebff; --tone: #4338ca; }
.stat-invoiced { --tint: #e7f0ff; --tone: #1d4ed8; }
.stat-paid { --tint: #e5f6ee; --tone: #0d7a56; }
.stat-outstanding { --tint: #fff4df; --tone: #9a6200; }
.stat-overdue { --tint: #fdecef; --tone: #c2354d; }

.stat-label {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.stat-value {
    margin-top: 6px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
}

.stat-card.stat-overdue .stat-value {
    color: var(--danger);
}

.stat-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
}

.section-title {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 14px;
}

.month-table {
    width: 100%;
}

.month-table th,
.month-table td {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.month-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
    background: #3f32d6;
    padding: 8px;
}

.bar-track {
    height: 7px;
    background: #efeaf8;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #8d84ff, #4f42ea);
    border-radius: 99px;
}

.bar-track.paid span {
    background: linear-gradient(90deg, #34d399, #0d7a56);
}

.data-table {
    margin: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: #f7f5ff;
    --bs-table-border-color: var(--line);
}

.data-table th,
.data-table td {
    vertical-align: middle;
    padding: 13px 10px;
}

.data-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    background: #3f32d6;
    border-bottom: 0;
}

.data-table thead th:first-child {
    border-radius: 10px 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 10px 0 0;
}

.data-table tbody tr:nth-child(even) {
    background: #eef2ff;
}

.data-table tbody tr:nth-child(odd) {
    background: #fff;
}

.data-table tbody tr:hover {
    background: #e0e7ff;
}

.data-table thead .sort-link,
.data-table thead .sort-link:hover {
    color: #fff;
}

.data-table a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.data-table a:hover {
    color: var(--accent-dark);
}

.text-end {
    font-variant-numeric: tabular-nums;
}

.sort-link {
    color: inherit;
    text-decoration: none;
}

.sort-link:hover {
    color: var(--accent-dark);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.28rem 0.65rem 0.28rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-draft { background: #eceaf1; color: #3d3650; }
.status-sent { background: #e7efff; color: #1e3a8a; }
.status-partial { background: #fff3dd; color: #8a5308; }
.status-paid { background: #e5f6ee; color: #0d5c3d; }
.status-overdue { background: #fdecef; color: #9f1239; }

.list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.result-count {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 10px !important;
    border-color: var(--line);
    color: var(--ink);
    font-weight: 700;
    min-width: 36px;
    text-align: center;
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
}

.page-link:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: #d9d3f5;
}

.empty-panel {
    text-align: center;
    background:
        radial-gradient(320px 120px at 50% 0%, rgba(91, 77, 255, 0.08), transparent 70%),
        #fff;
    border: 1px dashed #d5cee8;
    border-radius: 22px;
    padding: 48px 22px;
}

.empty-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f4f1ff, #e4defe);
    color: var(--accent-dark);
    font-size: 1.5rem;
}

.empty-panel h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.empty-panel p {
    color: var(--muted);
    max-width: 440px;
    margin: 0 auto 16px;
}

.empty-panel .btn {
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-right: 0;
}

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.row-actions form {
    margin: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fff;
    color: #3d3650;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(30, 27, 46, 0.04);
}

.icon-btn:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: #d5cef5;
}

.icon-btn.danger:hover {
    color: var(--danger);
    background: #fff1f3;
    border-color: #f3c5ce;
}

.line-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #fcfbff, #f7f5fb);
}

.line-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}

.line-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.line-grid > :nth-child(1) { grid-column: span 2; }
.line-grid > :nth-child(2) { grid-column: span 2; }
.line-grid > :nth-child(3) { grid-column: span 3; }
.line-grid > :nth-child(4) { grid-column: span 2; }
.line-grid > :nth-child(5) { grid-column: span 3; }
.line-grid > :nth-child(6) { grid-column: 1 / -1; }

.line-total-wrap {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.totals-card {
    background: linear-gradient(180deg, #f7f5ff, #fff);
    border: 1px solid #e3def4;
    border-radius: 16px;
    padding: 16px 18px;
}

.totals-card div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-variant-numeric: tabular-nums;
}

.totals-card .grand {
    border-top: 1px solid #e3def4;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: 8px;
}

.preview-stage {
    background:
        radial-gradient(500px 180px at 50% 0%, rgba(91, 77, 255, 0.08), transparent 70%),
        #e7e3f2;
    border-radius: 22px;
    padding: 28px 16px 40px;
    overflow-x: auto;
    border: 1px solid #ddd6ec;
}

.preview-stage .doc {
    width: 8.5in;
    min-height: 11in;
    margin: 0 auto;
    box-shadow: 0 24px 50px rgba(21, 18, 34, 0.16);
}

.guest-body {
    min-height: 100vh;
    background: #f3f1f8;
}

.guest-stage {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.guest-hero {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: #f6f3ff;
    background:
        radial-gradient(520px 320px at 90% -10%, rgba(231, 177, 90, 0.45), transparent 60%),
        radial-gradient(480px 360px at -10% 110%, rgba(91, 77, 255, 0.55), transparent 55%),
        #151222;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.guest-hero-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #8d84ff, #4f42ea 60%, #e7b15a);
    color: #fff;
    font-size: 1.45rem;
    margin-bottom: 28px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}

.guest-hero-kicker {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    color: #e7b15a;
}

.guest-hero-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4.15rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
    font-weight: 700;
    max-width: 7.2em;
    color: #fff;
}

.guest-hero-copy {
    position: relative;
    z-index: 1;
    margin: 16px 0 0;
    max-width: 36ch;
    color: #d9d3ef;
    font-size: 1.05rem;
}

.guest-points {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 10px;
}

.guest-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #efeaff;
    font-weight: 600;
}

.guest-points i {
    color: #e7b15a;
}

.guest-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 40px 28px;
}

.guest-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 28px 26px 24px;
}

.guest-card h1 {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-size: 2rem;
}

.guest-card .btn-primary {
    display: flex;
    width: fit-content;
    min-height: 46px;
    margin-top: 4px;
    margin-left: auto;
}

.guest-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 14px 0 0;
    text-align: center;
    width: 100%;
    max-width: 440px;
}

.setup-list {
    margin: 0 0 16px;
    padding-left: 18px;
    color: var(--muted);
}

.logo-preview {
    max-width: 180px;
    max-height: 72px;
    object-fit: contain;
    background: #f6f4fb;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
}

.help {
    color: var(--muted);
    font-size: 0.84rem;
    margin-top: 4px;
}

.alert {
    border: 0;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 0.85rem 1rem;
}

.alert-success {
    background: #e8f8f1;
    color: #0b5c40;
}

.alert-danger {
    background: #fdecef;
    color: #8f1234;
}

.alert-warning {
    background: #fff6e4;
    color: #7a4e00;
}

.alert-info {
    background: #eef0ff;
    color: #312e81;
}

.modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(21, 18, 34, 0.2);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

.modal-title {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
}

code {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-radius: 6px;
    padding: 0.1rem 0.35rem;
}

@media (max-width: 1199.98px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dashboard-grid,
    .line-grid {
        grid-template-columns: 1fr 1fr;
    }

    .app-topbar,
    .app-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-band {
        flex-direction: column;
        align-items: stretch;
    }

    .guest-stage {
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
    }

    .guest-hero {
        width: 100%;
        box-sizing: border-box;
        min-height: 0;
        padding: 36px 22px 28px;
        justify-content: center;
    }

    .guest-hero-copy {
        max-width: 17rem;
    }

    .guest-hero-title {
        font-size: 2.35rem;
    }

    .guest-panel {
        width: 100%;
        box-sizing: border-box;
        padding: 24px 16px 32px;
    }

    .guest-card,
    .guest-note {
        width: auto;
        max-width: 100%;
    }

    .line-grid > * {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .stat-grid,
    .dashboard-grid,
    .line-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .app-topbar h1 {
        font-size: 1.45rem;
    }

    .topbar-date {
        display: none;
    }

    .hero-band h2 {
        font-size: 1.6rem;
    }
}
