/*
 * Aurora for Nuvabill. A glass client area with a left menu and soft aurora light.
 * Loaded after Nova's styles, so every page of the client area keeps working and looks like Aurora.
 * Copyright RapidNet Ltd. Sold on the Nuvabill Marketplace; one license per site.
 */

:root {
    --au-bg: #f4f5fa;
    --au-glass: rgb(255 255 255 / 0.74);
    --au-glass-strong: rgb(255 255 255 / 0.9);
    --au-glass-line: rgb(255 255 255 / 0.95);
    --au-ink: #10132a;
    --au-muted: #5c6080;
    --au-faint: #686d8e;
    --au-line: #e9ebf3;
    --au-shadow: 0 1px 1px rgb(16 19 42 / 0.03), 0 16px 40px -20px rgb(16 19 42 / 0.2);
    --au-shadow-lg: 0 1px 1px rgb(16 19 42 / 0.04), 0 30px 60px -28px rgb(16 19 42 / 0.32);
    --au-glow-1: color-mix(in srgb, var(--nb-accent) 55%, transparent);
    --au-glow-2: rgb(45 212 191 / 0.4);
    --au-glow-3: rgb(244 114 182 / 0.3);
    --nb-bg: var(--au-bg);
    --nb-ink: var(--au-ink);
    --nb-muted: var(--au-muted);
    --nb-faint: var(--au-faint);
    --nb-line: var(--au-line);
    --nb-radius: 14px;
    --nb-radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        --au-bg: #0b0d1a;
        --au-glass: rgb(20 23 44 / 0.72);
        --au-glass-strong: rgb(24 28 52 / 0.92);
        --au-glass-line: rgb(255 255 255 / 0.08);
        --au-ink: #eceefb;
        --au-muted: #a3a8c7;
        --au-faint: #8d92b3;
        --au-line: #252a48;
        --au-shadow: 0 1px 1px rgb(0 0 0 / 0.2), 0 16px 40px -20px rgb(0 0 0 / 0.6);
        --au-shadow-lg: 0 30px 60px -28px rgb(0 0 0 / 0.7);
        --nb-surface: #14172c;
        --nb-surface-2: #191d36;
    }
}

:root[data-theme='dark'] {
    --au-bg: #0b0d1a;
    --au-glass: rgb(20 23 44 / 0.72);
    --au-glass-strong: rgb(24 28 52 / 0.92);
    --au-glass-line: rgb(255 255 255 / 0.08);
    --au-ink: #eceefb;
    --au-muted: #a3a8c7;
    --au-faint: #8d92b3;
    --au-line: #252a48;
    --au-shadow: 0 1px 1px rgb(0 0 0 / 0.2), 0 16px 40px -20px rgb(0 0 0 / 0.6);
    --au-shadow-lg: 0 30px 60px -28px rgb(0 0 0 / 0.7);
    --nb-surface: #14172c;
    --nb-surface-2: #191d36;
}

/* The aurora: soft coloured light behind the top of every page. */
.au-body {
    background: var(--au-bg);
    color: var(--au-ink);
}

.au-body::before {
    content: '';
    position: fixed;
    z-index: 0;
    top: -260px;
    left: 8%;
    width: min(1500px, 110vw);
    height: 640px;
    background:
        radial-gradient(38% 55% at 22% 55%, var(--au-glow-1), transparent 72%),
        radial-gradient(32% 50% at 55% 45%, var(--au-glow-2), transparent 72%),
        radial-gradient(30% 48% at 84% 58%, var(--au-glow-3), transparent 72%);
    filter: blur(48px);
    opacity: 0.8;
    pointer-events: none;
}

.au-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

/* Left menu */
.au-side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 16px 18px;
    background: var(--au-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-inline-end: 1px solid var(--au-glass-line);
    box-shadow: 1px 0 0 rgb(16 19 42 / 0.05);
}

.au-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px 18px;
    color: var(--au-ink);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.au-brand-mark {
    width: 34px;
    height: 34px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(140deg, var(--nb-accent), color-mix(in srgb, var(--nb-accent) 55%, #2dd4bf));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 6px 14px -4px color-mix(in srgb, var(--nb-accent) 60%, transparent);
}

.au-brand-mark svg {
    width: 18px;
    height: 18px;
}

/* The company's own icon (Nuvabill 0.6.3+ with a White-label License). */
.au-brand-image {
    display: block;
    background: none;
    object-fit: cover;
}

.au-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    margin: 0 2px 16px;
    border-radius: 12px;
    background: var(--au-ink);
    color: var(--au-bg);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 8px 18px -8px rgb(16 19 42 / 0.6);
}

.au-order svg {
    width: 16px;
    height: 16px;
}

.au-label {
    padding: 14px 12px 6px;
    color: var(--au-faint);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.au-nav {
    display: grid;
    gap: 2px;
}

.au-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--au-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.au-nav a svg {
    width: 19px;
    height: 19px;
    flex: none;
}

.au-nav a:hover {
    color: var(--au-ink);
    background: color-mix(in srgb, var(--au-glass-strong) 60%, transparent);
}

.au-nav a[aria-current='page'] {
    color: var(--au-ink);
    background: var(--au-glass-strong);
    box-shadow: 0 1px 2px rgb(16 19 42 / 0.08), 0 6px 16px -8px rgb(16 19 42 / 0.2);
}

.au-badge {
    min-width: 20px;
    height: 20px;
    margin-inline-start: auto;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fee4e2;
    color: #b42318;
    font-size: 0.72rem;
    font-weight: 800;
}

.au-help {
    position: relative;
    overflow: hidden;
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 16px;
    background: #10132a;
    color: #fff;
}

.au-help::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--nb-accent) 70%, transparent), transparent 70%);
}

.au-help > * {
    position: relative;
}

.au-help span {
    color: #c7c9e0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.au-help a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    margin-top: 4px;
    border-radius: 10px;
    background: #fff;
    color: #10132a;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

/* Top bar */
.au-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.au-top {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 76px;
    padding: 0 32px;
}

.au-icon-btn,
.au-pill-btn,
.au-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border: 1px solid var(--au-glass-line);
    border-radius: 12px;
    background: var(--au-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--au-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.au-icon-btn {
    width: 44px;
}

.au-pill-btn {
    padding: 0 14px;
}

.au-icon-btn svg,
.au-pill-btn svg {
    width: 18px;
    height: 18px;
}

.au-menu-btn {
    display: none;
}

.au-account {
    position: relative;
}

.au-account-btn {
    height: 50px;
    padding: 0 12px 0 5px;
    border-radius: 14px;
}

.au-account-btn > svg {
    width: 16px;
    height: 16px;
    color: var(--au-muted);
}

.au-avatar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(140deg, var(--nb-accent), color-mix(in srgb, var(--nb-accent) 50%, #f472b6));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
}

.au-account-name {
    display: grid;
    text-align: start;
    line-height: 1.25;
}

.au-account-name span {
    color: var(--au-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.au-dropdown {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    z-index: 30;
    min-width: 220px;
    display: grid;
    padding: 6px;
    border: 1px solid var(--au-line);
    border-radius: 14px;
    background: var(--au-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--au-shadow-lg);
}

.au-dropdown a,
.au-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--au-ink);
    font: inherit;
    font-size: 0.9rem;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.au-dropdown svg {
    width: 17px;
    height: 17px;
    color: var(--au-muted);
}

.au-dropdown a:hover,
.au-dropdown button:hover {
    background: var(--nb-surface-2);
}

.au-content {
    flex: 1;
    width: 100%;
    max-width: 1320px;
    padding: 8px 36px 32px;
    display: grid;
    gap: 22px;
    align-content: start;
}

.au-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 36px 26px;
    color: var(--au-faint);
    font-size: 0.82rem;
}

.au-footer a {
    color: var(--au-muted);
}

/* Nova's building blocks, restyled. */
.au-body .card {
    border: 1px solid var(--au-glass-line);
    border-radius: 18px;
    background: var(--au-glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--au-shadow);
}

.au-body .btn {
    border-radius: 12px;
    font-weight: 700;
}

.au-body .btn-primary {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 10px 22px -10px var(--nb-accent);
}

.au-body .input,
.au-body .select,
.au-body .textarea {
    border-radius: 12px;
}

.au-body .page-title h1 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.au-body .table th {
    background: transparent;
    color: var(--au-faint);
}

.au-body .flash {
    border-radius: 14px;
}

.au-body .demo-banner {
    position: relative;
    z-index: 2;
}

/* Dashboard */
.au-hello {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.au-hello h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.au-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0;
    color: var(--au-muted);
    font-size: 0.95rem;
}

.au-dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: #12b76a;
    box-shadow: 0 0 0 4px rgb(18 183 106 / 0.18);
}

.au-dot[data-tone='warn'] {
    background: #f79009;
    box-shadow: 0 0 0 4px rgb(247 144 9 / 0.18);
}

.au-dot[data-tone='info'] {
    background: #2e90fa;
    box-shadow: 0 0 0 4px rgb(46 144 250 / 0.18);
}

.au-hello-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.au-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.au-stat {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--au-glass-line);
    border-radius: 18px;
    background: var(--au-glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--au-shadow);
    color: var(--au-ink);
    text-decoration: none;
    transition: transform 0.15s ease;
}

.au-stat:hover {
    transform: translateY(-2px);
}

.au-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.au-stat b {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.au-stat > span:last-child {
    color: var(--au-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.au-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.au-stat-icon svg {
    width: 20px;
    height: 20px;
}

.au-stat-icon[data-tone='indigo'] {
    background: #eef0ff;
    color: #4338ca;
}

.au-stat-icon[data-tone='teal'] {
    background: #e6faf6;
    color: #0f766e;
}

.au-stat-icon[data-tone='rose'] {
    background: #fef0f2;
    color: #c01048;
}

.au-stat-icon[data-tone='amber'] {
    background: #fff6e5;
    color: #b54708;
}

.au-tag {
    padding: 3px 9px;
    border-radius: 999px;
    background: #dcfae6;
    color: #067647;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.au-tag[data-tone='warn'] {
    background: #fef0c7;
    color: #93370d;
}

.au-tag[data-tone='info'] {
    background: #e0f2fe;
    color: #075985;
}

.au-tag[data-tone='dark'] {
    background: var(--au-ink);
    color: var(--au-bg);
}

.au-tag[data-tone='muted'] {
    background: var(--nb-surface-2);
    color: var(--au-muted);
}

.au-callout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--nb-accent) 9%, var(--au-glass-strong));
    border: 1px solid color-mix(in srgb, var(--nb-accent) 24%, transparent);
}

.au-callout > svg {
    width: 22px;
    height: 22px;
    color: var(--nb-accent);
    flex: none;
}

.au-callout > span {
    flex: 1;
}

.au-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.au-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 8px;
}

.au-card-head h2,
.au-h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.au-card-head a {
    color: var(--nb-accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.au-service {
    display: grid;
    grid-template-columns: 46px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--au-line);
    color: var(--au-ink);
    text-decoration: none;
}

.au-service:hover {
    background: color-mix(in srgb, var(--au-glass-strong) 50%, transparent);
}

.au-service-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--nb-accent) 12%, var(--au-glass-strong));
    color: var(--nb-accent);
}

.au-service-icon svg {
    width: 22px;
    height: 22px;
}

.au-service-name {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.au-service-name > span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--au-muted);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-service-name .au-dot {
    width: 7px;
    height: 7px;
    box-shadow: none;
}

.au-service-meta {
    display: grid;
    font-size: 0.9rem;
    font-weight: 600;
}

.au-service-meta small {
    color: var(--au-faint);
    font-size: 0.75rem;
    font-weight: 600;
}

.au-side-stack {
    display: grid;
    gap: 20px;
}

.au-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.au-actions a {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--au-line);
    border-radius: 14px;
    background: var(--nb-surface-2);
    color: var(--au-ink);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.au-actions a span {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--nb-surface);
    color: var(--nb-accent);
    box-shadow: 0 1px 2px rgb(16 19 42 / 0.08);
}

.au-actions svg {
    width: 17px;
    height: 17px;
}

.au-promo {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(145deg, var(--nb-accent), color-mix(in srgb, var(--nb-accent) 45%, #0ea5e9));
    box-shadow: 0 18px 40px -18px var(--nb-accent);
}

.au-promo::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 30px solid rgb(255 255 255 / 0.1);
}

.au-promo b {
    font-size: 1.2rem;
    line-height: 1.3;
}

.au-promo span {
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.5;
}

.au-promo-tag {
    justify-self: start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.2);
    font-size: 0.72rem !important;
    font-weight: 800;
    opacity: 1 !important;
}

.au-promo a {
    position: relative;
    z-index: 1;
    justify-self: start;
    margin-top: 6px;
    padding: 10px 16px;
    border-radius: 11px;
    background: #fff;
    color: #10132a;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.au-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid var(--au-line);
    color: var(--au-ink);
    font-size: 0.9rem;
    text-decoration: none;
}

.au-money {
    color: var(--au-muted);
    font-weight: 700;
    white-space: nowrap;
}

.au-money.is-due {
    color: #c01048;
}

.au-overlay {
    display: none;
}

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

    .au-grid,
    .au-pair {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .au-shell {
        grid-template-columns: 1fr;
    }

    .au-side {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        z-index: 50;
        width: 280px;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        background: var(--au-glass-strong);
    }

    [dir='rtl'] .au-side {
        transform: translateX(105%);
    }

    .au-side.is-open {
        transform: none;
    }

    .au-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgb(8 10 22 / 0.45);
    }

    .au-menu-btn {
        display: inline-flex;
    }

    .au-top {
        padding: 0 16px;
        height: 64px;
    }

    .au-content {
        padding: 4px 16px 24px;
    }

    .au-footer {
        padding: 16px;
    }

    /* Out of sight on phones, but still read out, so the buttons keep their names. */
    .au-account-name,
    .au-pill-btn span:not(.au-badge) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .au-service {
        grid-template-columns: 46px minmax(0, 1fr) auto;
    }

    .au-service-meta {
        display: none;
    }
}

/* Softer colour tiles and a lifted help card in dark mode. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .au-stat-icon {
        background: rgb(255 255 255 / 0.06) !important;
    }

    :root:not([data-theme='light']) .au-help {
        background: color-mix(in srgb, var(--nb-accent) 22%, #10132a);
    }
}

:root[data-theme='dark'] .au-stat-icon {
    background: rgb(255 255 255 / 0.06) !important;
}

:root[data-theme='dark'] .au-help {
    background: color-mix(in srgb, var(--nb-accent) 22%, #10132a);
}
