:root {
    --brand-blue: #1565c0;
    --brand-blue-deep: #0d3f8f;
    --brand-teal: #00b894;
    --brand-teal-deep: #008b71;
    --ink-strong: #0f2857;
    --ink-soft: #4b5f84;
    --paper: rgba(255, 255, 255, 0.92);
    --line: rgba(21, 101, 192, 0.16);
    --shadow: 0 24px 60px rgba(14, 63, 132, 0.16);
}

* {
    box-sizing: border-box;
}

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

body {
    color: var(--ink-strong);
    font-family: Aptos, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(21, 101, 192, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(0, 184, 148, 0.18), transparent 30%),
        linear-gradient(135deg, #f4f9ff 0%, #f7fcfb 48%, #eef9ff 100%);
}

a {
    color: inherit;
}

.landing-body,
.dashboard-body {
    position: relative;
    overflow-x: hidden;
}

.ambient {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.35;
    pointer-events: none;
}

.ambient-left {
    top: -8rem;
    left: -10rem;
    background: rgba(21, 101, 192, 0.42);
}

.ambient-right {
    right: -12rem;
    bottom: -8rem;
    background: rgba(0, 184, 148, 0.38);
}

.shell,
.dashboard-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.shell {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 420px);
    gap: 1.5rem;
    align-items: stretch;
    min-height: 100vh;
}

.hero-panel,
.auth-panel,
.panel-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 252, 255, 0.84));
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: rise 700ms ease-out both;
}

.auth-panel {
    padding: 2rem;
    align-self: center;
    animation: rise 820ms ease-out both;
}

.eyebrow,
.panel-kicker,
.panel-badge,
.callout-title {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--brand-teal-deep);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-lockup.compact {
    margin-bottom: 0.35rem;
}

.brand-mark {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(21, 101, 192, 0.18));
}

.brand-mark.small {
    width: 54px;
    height: 54px;
}

.brand-subtitle {
    margin: 0.3rem 0 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.company-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
}

.company-banner.inline {
    margin-top: 0.9rem;
}

.company-banner-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

h1,
h2 {
    font-family: Cambria, Georgia, serif;
    margin: 0;
}

h1 {
    margin-top: 0.8rem;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.96;
}

h2 {
    font-size: 1.45rem;
}

.hero-copy,
.panel-copy {
    color: var(--ink-soft);
    line-height: 1.7;
}

.hero-copy {
    max-width: 56ch;
    margin: 1.4rem 0 2rem;
    font-size: 1.05rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card,
.mini-callout,
.summary-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem 1.1rem;
}

.feature-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p,
.mini-callout code {
    color: var(--ink-soft);
}

.auth-brand-line {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.8rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-teal) 100%);
    box-shadow: 0 0 0 6px rgba(21, 101, 192, 0.08);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-form label {
    display: grid;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    border: 1px solid rgba(75, 95, 132, 0.18);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.82);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(21, 101, 192, 0.45);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.1);
    transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.secondary-link {
    appearance: none;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    text-decoration: none;
}

.primary-button {
    padding: 0.95rem 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-teal) 100%);
    box-shadow: 0 14px 28px rgba(21, 101, 192, 0.24);
}

.secondary-button,
.secondary-link {
    padding: 0.82rem 1.15rem;
    color: var(--ink-strong);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.secondary-link:hover,
.summary-card:hover,
.feature-card:hover {
    transform: translateY(-2px);
}

.form-message {
    min-height: 1.3rem;
    margin: 0;
    font-size: 0.92rem;
    color: var(--brand-blue-deep);
}

.mini-callout {
    display: grid;
    gap: 0.45rem;
    margin-top: 1.5rem;
}

.mini-callout code {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    font-family: Consolas, monospace;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.4rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-bar {
    margin-bottom: 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 180px 180px minmax(0, 1fr);
    gap: 1rem;
    align-items: end;
}

.filter-grid label {
    display: grid;
    gap: 0.45rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.filter-grid input {
    width: 100%;
    border: 1px solid rgba(75, 95, 132, 0.18);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.82);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.panel-copy.compact {
    margin: 0.75rem 0 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-card {
    animation: rise 640ms ease-out both;
}

.summary-label {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.summary-value {
    margin-top: 0.45rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.summary-note {
    margin-top: 0.4rem;
    color: var(--brand-teal-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-card {
    padding: 1.25rem;
    animation: rise 720ms ease-out both;
}

.detail-panel {
    min-height: 340px;
}

.panel-head.secondary {
    margin-top: 1.75rem;
}

.detail-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.detail-chip {
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.chart-list {
    display: grid;
    gap: 0.85rem;
}

.chart-row {
    display: grid;
    gap: 0.45rem;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

.chart-track {
    overflow: hidden;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(21, 101, 192, 0.08);
}

.chart-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-teal) 100%);
}

.table-wrapper {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.invoices-table {
    min-width: 1040px;
}

.data-table th,
.data-table td {
    padding: 0.8rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table th {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.data-table tbody tr {
    cursor: pointer;
    transition: background-color 140ms ease;
}

.data-table tbody tr:hover,
.data-table tbody tr.selected-row {
    background: rgba(21, 101, 192, 0.08);
}

.detail-panel .data-table tbody tr {
    cursor: default;
}

.detail-panel .data-table tbody tr.selected-row,
.detail-panel .data-table tbody tr:hover {
    background: transparent;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pill.ready {
    background: rgba(0, 184, 148, 0.12);
    color: var(--brand-teal-deep);
}

.status-pill.pending {
    background: rgba(21, 101, 192, 0.1);
    color: var(--brand-blue-deep);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .shell,
    .dashboard-grid,
    .summary-grid,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .shell,
    .dashboard-shell {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

    .hero-panel,
    .auth-panel,
    .panel-card {
        padding: 1.2rem;
        border-radius: 20px;
    }

    .brand-lockup {
        align-items: flex-start;
    }

    .brand-mark {
        width: 64px;
        height: 64px;
    }

    h1 {
        font-size: 2.4rem;
    }

    .summary-value {
        font-size: 1.45rem;
    }
}
