/* Theme-independent system maintenance page - Phase 25 */
:root {
    --nc-maintenance-bg: #0f172a;
    --nc-maintenance-surface: rgba(255, 255, 255, .94);
    --nc-maintenance-surface-strong: rgba(255, 255, 255, .98);
    --nc-maintenance-text: #111827;
    --nc-maintenance-muted: #64748b;
    --nc-maintenance-line: rgba(148, 163, 184, .28);
    --nc-maintenance-shadow: 0 1.75rem 5rem rgba(15, 23, 42, .30);
    --nc-maintenance-orb-one: rgba(13, 110, 253, .30);
    --nc-maintenance-orb-two: rgba(20, 184, 166, .25);
}

* { box-sizing: border-box; }

html,
body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
}

body.nc-maintenance-page {
    min-height: 100svh;
    color: var(--nc-maintenance-text);
    background: var(--nc-maintenance-bg);
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

.nc-maintenance-shell {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100svh;
    padding: clamp(1rem, 4vw, 4rem);
    background-color: var(--nc-maintenance-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.nc-maintenance-shell::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
}

/* Template: Default - dark photo/glass style */
.nc-maintenance-shell-default {
    --nc-maintenance-text: #111827;
    --nc-maintenance-muted: #64748b;
    background:
        radial-gradient(circle at 18% 20%, rgba(59, 130, 246, .36), transparent 26rem),
        radial-gradient(circle at 82% 84%, rgba(20, 184, 166, .28), transparent 25rem),
        linear-gradient(135deg, rgba(2, 6, 23, .78), rgba(15, 23, 42, .60)),
        var(--nc-maintenance-bg-image, none),
        #0f172a;
}

.nc-maintenance-shell-default::after {
    background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, .08));
}

/* Template: Centered - aurora style */
.nc-maintenance-shell-centered {
    --nc-maintenance-text: #ffffff;
    --nc-maintenance-muted: rgba(255, 255, 255, .78);
    background:
        radial-gradient(circle at 20% 18%, rgba(56, 189, 248, .55), transparent 22rem),
        radial-gradient(circle at 78% 74%, rgba(168, 85, 247, .42), transparent 24rem),
        radial-gradient(circle at 50% 105%, rgba(20, 184, 166, .28), transparent 22rem),
        linear-gradient(135deg, rgba(2, 6, 23, .72), rgba(23, 37, 84, .62) 48%, rgba(49, 46, 129, .68)),
        var(--nc-maintenance-bg-image, none),
        linear-gradient(135deg, #020617, #172554 48%, #312e81);
}

.nc-maintenance-shell-centered::after {
    background: radial-gradient(circle at center, transparent 0 36%, rgba(2, 6, 23, .34) 72% 100%);
}

/* Template: Card - bright soft editorial style */
.nc-maintenance-shell-card {
    --nc-maintenance-bg: #f8fafc;
    --nc-maintenance-text: #0f172a;
    --nc-maintenance-muted: #475569;
    --nc-maintenance-surface: rgba(255, 255, 255, .92);
    --nc-maintenance-surface-strong: rgba(255, 255, 255, .98);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, .18), transparent 21rem),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, .16), transparent 24rem),
        linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(241, 245, 249, .74) 52%, rgba(224, 242, 254, .70)),
        var(--nc-maintenance-bg-image, none),
        linear-gradient(135deg, #ffffff, #f1f5f9 52%, #e0f2fe);
}

.nc-maintenance-shell-card::after {
    background-image: radial-gradient(rgba(15, 23, 42, .10) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .48;
}

/* Template: Split - text and visual stage */
.nc-maintenance-shell-split {
    --nc-maintenance-text: #0f172a;
    --nc-maintenance-muted: #475569;
    background:
        linear-gradient(90deg, rgba(248, 250, 252, .98) 0 52%, rgba(15, 118, 110, .86) 52% 100%),
        var(--nc-maintenance-bg-image, none),
        #f8fafc;
}

.nc-maintenance-shell-split::after {
    background: linear-gradient(120deg, rgba(255, 255, 255, .72), transparent 45%, rgba(15, 23, 42, .18));
}

/* Template: Minimal - clean system notice */
.nc-maintenance-shell-minimal {
    --nc-maintenance-bg: #ffffff;
    --nc-maintenance-text: #0f172a;
    --nc-maintenance-muted: #64748b;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .055) 1px, transparent 1px),
        linear-gradient(rgba(15, 23, 42, .055) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(248, 250, 252, .82)),
        var(--nc-maintenance-bg-image, none),
        linear-gradient(135deg, #ffffff, #f8fafc);
    background-size: 56px 56px, 56px 56px, cover, cover, cover;
}

.nc-maintenance-card,
.nc-maintenance-panel,
.nc-maintenance-split,
.nc-maintenance-minimal {
    position: relative;
    width: min(100%, 58rem);
    overflow: hidden;
    color: var(--nc-maintenance-text);
    background: linear-gradient(145deg, var(--nc-maintenance-surface-strong), var(--nc-maintenance-surface));
    border: 1px solid var(--nc-maintenance-line);
    border-radius: clamp(1.25rem, 3vw, 2.5rem);
    box-shadow: var(--nc-maintenance-shadow);
    backdrop-filter: blur(18px);
}

.nc-maintenance-card-hero { min-height: clamp(28rem, 58svh, 40rem); }
.nc-maintenance-card-compact { width: min(100%, 42rem); min-height: auto; }

.nc-maintenance-panel-centered {
    width: min(100%, 48rem);
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .26);
    box-shadow: 0 1.8rem 5rem rgba(2, 6, 23, .42);
}

.nc-maintenance-minimal {
    width: min(100%, 42rem);
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
    background: rgba(255, 255, 255, .84);
}

.nc-maintenance-card__media,
.nc-maintenance-split__visual {
    pointer-events: none;
    overflow: hidden;
}

.nc-maintenance-card__media { position: absolute; inset: 0; }
.nc-maintenance-split__visual {
    position: relative;
    min-height: 24rem;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .20), rgba(15, 23, 42, .26)),
        rgba(255, 255, 255, .16);
}

.nc-maintenance-split__photo {
    position: absolute;
    inset: clamp(1rem, 3vw, 2rem);
    border-radius: clamp(1rem, 2.5vw, 2rem);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .14), rgba(20, 184, 166, .18)),
        var(--nc-maintenance-bg-image, none),
        linear-gradient(135deg, #0f766e, #0f172a);
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 1rem 2.5rem rgba(15, 23, 42, .18);
}

.nc-maintenance-orb {
    position: absolute;
    display: block;
    width: clamp(12rem, 32vw, 24rem);
    aspect-ratio: 1;
    border-radius: 999px;
    filter: blur(6px);
}

.nc-maintenance-orb-one { top: -9rem; right: -7rem; background: var(--nc-maintenance-orb-one); }
.nc-maintenance-orb-two { bottom: -10rem; left: -8rem; background: var(--nc-maintenance-orb-two); }

.nc-maintenance-card__content,
.nc-maintenance-panel,
.nc-maintenance-split__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(2rem, 6vw, 5rem);
    text-align: center;
}

.nc-maintenance-card__content { min-height: inherit; }
.nc-maintenance-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(18rem, .95fr); width: min(100%, 74rem); }
.nc-maintenance-split__content { align-items: flex-start; text-align: left; background: rgba(255, 255, 255, .90); }

.nc-maintenance-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(72vw, 18rem);
    min-height: clamp(4.25rem, 11vw, 7rem);
    margin: 0 auto clamp(1.25rem, 3vw, 2rem);
    padding: clamp(.7rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1.25rem;
}

.nc-maintenance-logo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: clamp(3rem, 9vw, 5.25rem);
    object-fit: contain;
}

.nc-maintenance-kicker {
    max-width: min(100%, 34rem);
    margin: 0 0 .75rem;
    color: var(--nc-maintenance-muted);
    font-size: clamp(.78rem, 1.8vw, .95rem);
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.35;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.nc-maintenance-panel-centered .nc-maintenance-kicker { color: rgba(255,255,255,.76); }

.nc-maintenance-title {
    max-width: 16ch;
    margin: 0 auto clamp(1rem, 3vw, 1.5rem);
    color: inherit;
    font-size: clamp(2.25rem, 8vw, 5.75rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: .98;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.nc-maintenance-description {
    max-width: 44rem;
    margin: 0 auto;
    color: var(--nc-maintenance-muted);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 450;
    line-height: 1.72;
    text-wrap: pretty;
    overflow-wrap: anywhere;
}

.nc-maintenance-panel-centered .nc-maintenance-description { color: rgba(255,255,255,.84); }


.nc-maintenance-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    width: min(100%, 28rem);
    margin: clamp(1.25rem, 4vw, 2rem) auto 0;
}

.nc-maintenance-countdown-item {
    min-width: 0;
    padding: .7rem .5rem;
    color: var(--nc-maintenance-text);
    background: rgba(255, 255, 255, .62);
    border: 1px solid var(--nc-maintenance-line);
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 .45rem 1.2rem rgba(15, 23, 42, .10);
}

.nc-maintenance-countdown-item strong,
.nc-maintenance-countdown-item span {
    display: block;
}

.nc-maintenance-countdown-item strong {
    font-size: clamp(1.15rem, 4vw, 1.8rem);
    line-height: 1;
}

.nc-maintenance-countdown-item span {
    margin-top: .3rem;
    color: var(--nc-maintenance-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.nc-maintenance-panel-centered .nc-maintenance-countdown-item {
    color: #fff;
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .24);
}

.nc-maintenance-panel-centered .nc-maintenance-countdown-item span {
    color: rgba(255, 255, 255, .78);
}
.nc-maintenance-split__content .nc-maintenance-title,
.nc-maintenance-split__content .nc-maintenance-description,
.nc-maintenance-split__content .nc-maintenance-kicker { margin-left: 0; }

.nc-maintenance-page-dark,
[data-bs-theme="dark"] {
    --nc-maintenance-bg: #020617;
    --nc-maintenance-surface: rgba(15, 23, 42, .90);
    --nc-maintenance-surface-strong: rgba(15, 23, 42, .96);
    --nc-maintenance-text: #f8fafc;
    --nc-maintenance-muted: #cbd5e1;
    --nc-maintenance-line: rgba(148, 163, 184, .24);
    --nc-maintenance-shadow: 0 1.75rem 5rem rgba(0, 0, 0, .52);
    --nc-maintenance-orb-one: rgba(37, 99, 235, .28);
    --nc-maintenance-orb-two: rgba(45, 212, 191, .18);
}

.nc-maintenance-page-dark .nc-maintenance-shell-card,
[data-bs-theme="dark"] .nc-maintenance-shell-card,
.nc-maintenance-page-dark .nc-maintenance-shell-minimal,
[data-bs-theme="dark"] .nc-maintenance-shell-minimal {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, .18), transparent 22rem),
        linear-gradient(135deg, rgba(2, 6, 23, .86), rgba(15, 23, 42, .78)),
        var(--nc-maintenance-bg-image, none),
        linear-gradient(135deg, #020617, #0f172a);
}

.nc-maintenance-page-dark .nc-maintenance-split__content,
[data-bs-theme="dark"] .nc-maintenance-split__content {
    background: rgba(15, 23, 42, .88);
}

.nc-maintenance-page-dark .nc-maintenance-logo-wrap,
[data-bs-theme="dark"] .nc-maintenance-logo-wrap {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(148, 163, 184, .22);
}

@media (prefers-color-scheme: dark) {
    body.nc-maintenance-page:not(.nc-maintenance-page-light) {
        --nc-maintenance-bg: #020617;
        --nc-maintenance-surface: rgba(15, 23, 42, .90);
        --nc-maintenance-surface-strong: rgba(15, 23, 42, .96);
        --nc-maintenance-text: #f8fafc;
        --nc-maintenance-muted: #cbd5e1;
        --nc-maintenance-line: rgba(148, 163, 184, .24);
        --nc-maintenance-shadow: 0 1.75rem 5rem rgba(0, 0, 0, .52);
        --nc-maintenance-orb-one: rgba(37, 99, 235, .28);
        --nc-maintenance-orb-two: rgba(45, 212, 191, .18);
    }
}

@media (max-width: 767.98px) {
    .nc-maintenance-shell { align-items: stretch; padding: .875rem; }
    .nc-maintenance-card-hero { min-height: calc(100svh - 1.75rem); border-radius: 1.25rem; }
    .nc-maintenance-card__content,
    .nc-maintenance-panel,
    .nc-maintenance-split__content { padding: clamp(1.5rem, 9vw, 2.25rem); }
    .nc-maintenance-logo-wrap { max-width: min(78vw, 15rem); border-radius: 1rem; }
    .nc-maintenance-split { grid-template-columns: 1fr; }
    .nc-maintenance-split__content { align-items: center; text-align: center; }
    .nc-maintenance-split__visual { display: none; }
    .nc-maintenance-split__content .nc-maintenance-title,
    .nc-maintenance-split__content .nc-maintenance-description,
    .nc-maintenance-split__content .nc-maintenance-kicker { margin-left: auto; }
    .nc-maintenance-countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@supports not (height: 100svh) {
    body.nc-maintenance-page,
    .nc-maintenance-shell { min-height: 100vh; }
    @media (max-width: 767.98px) {
        .nc-maintenance-card-hero { min-height: calc(100vh - 1.75rem); }
    }
}
