﻿:root {
    --bg: #0b1220;
    --bg2: #0f1a33;
    --card: #0f1a33;
    --stroke: rgba(255,255,255,.10);
    --text: #eaf0ff;
    --muted: rgba(234,240,255,.72);
    --brand: #6ea8fe;
    --brand2: #7cf2c2;
    --danger: #ff6b6b;
    --warning: #ffd166;
    --shadow: 0 18px 45px rgba(0,0,0,.35);
    --radius: 18px;
    /* opcjonalnie pod fixed navbar */
    --nav-h: 72px;
}
html, body {
    height: 100%;
    background: #060a14; /* solid base */
}

body {
    color: var(--text);
    background: #060a14;
}




/* ===== Typography / links ===== */
a {
    color: var(--brand);
}

    a:hover {
        color: #9cc3ff;
    }

.text-muted {
    color: var(--muted) !important;
}

h1, h2, h3 {
    letter-spacing: -.3px;
}

/* ===== Bootstrap container ===== */
.container {
    max-width: 1080px;
}

/* ===== Navbar ===== */
.navbar {
    background: rgba(15,26,51,.78) !important;
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(10px);
}

    .navbar .navbar-brand {
        font-weight: 800;
        letter-spacing: .2px;
    }

    .navbar .nav-link {
        color: rgba(234,240,255,.86) !important;
        font-weight: 700;
        white-space: nowrap;
    }

        .navbar .nav-link:hover {
            color: var(--text) !important;
        }

    .navbar .navbar-toggler {
        border-color: rgba(234,240,255,.20);
    }

    .navbar .navbar-toggler-icon {
        filter: invert(1);
        opacity: .9;
    }

    /* collapse hardening */
    .navbar .navbar-collapse {
        min-width: 0;
    }

.nav-right {
    min-width: 0;
}

/* ===== Cards ===== */
.card {
    background: rgba(15,26,51,.75);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

    .card .card-body {
        padding: 1.25rem;
    }

/* ===== Buttons ===== */
.btn {
    border-radius: 14px;
    padding: .7rem 1rem;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #9a7bff);
    border: none;
}

    .btn-primary:hover {
        filter: brightness(1.05);
    }

.btn-outline-secondary {
    border-color: rgba(234,240,255,.25);
    color: var(--text);
}

    .btn-outline-secondary:hover {
        background: rgba(234,240,255,.08);
        border-color: rgba(234,240,255,.35);
        color: var(--text);
    }

/* navbar pills/buttons (konto/logout jeśli masz takie klasy) */
.btn-nav {
    border-radius: 999px;
    padding: .55rem .85rem;
    border: 1px solid rgba(234,240,255,.20);
    background: rgba(234,240,255,.06);
    color: rgba(234,240,255,.92);
    font-weight: 800;
}

    .btn-nav:hover {
        background: rgba(234,240,255,.10);
        border-color: rgba(234,240,255,.28);
        color: rgba(234,240,255,1);
    }

/* ===== Badges ===== */
.badge {
    border-radius: 999px;
    font-weight: 800;
}

    .badge.bg-success {
        background: rgba(124,242,194,.18) !important;
        color: var(--brand2);
    }

    .badge.bg-warning {
        background: rgba(255,209,102,.18) !important;
        color: var(--warning);
    }

    .badge.bg-danger {
        background: rgba(255,107,107,.18) !important;
        color: var(--danger);
    }

    .badge.bg-info,
    .badge.bg-primary {
        background: rgba(110,168,254,.18) !important;
        color: var(--brand);
    }

/* ===== HR ===== */
hr {
    border-color: rgba(234,240,255,.12);
    opacity: 1;
}

/* ===== Alerts ===== */
.alert {
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: rgba(15,26,51,.80);
    color: var(--text);
}

.alert-info {
    border-left: 4px solid var(--brand);
}

.alert-warning {
    border-left: 4px solid var(--warning);
}

/* ===== Forms (dark) ===== */
.form-control, .form-select, textarea.form-control {
    background: rgba(6,10,20,.62) !important;
    border: 1px solid rgba(234,240,255,.14);
    color: var(--text) !important;
    border-radius: 14px;
    caret-color: var(--text);
}

    .form-control::placeholder,
    textarea.form-control::placeholder {
        color: rgba(234,240,255,.55) !important;
        opacity: 1;
    }

    .form-control:focus, .form-select:focus {
        border-color: rgba(110,168,254,.6);
        box-shadow: 0 0 0 .25rem rgba(110,168,254,.18);
        background: rgba(6,10,20,.72) !important;
    }

    .form-control:disabled,
    .form-control[readonly],
    .form-select:disabled,
    .form-select[readonly],
    textarea.form-control:disabled,
    textarea.form-control[readonly] {
        background: rgba(234,240,255,.06) !important;
        color: rgba(234,240,255,.85) !important;
        border-color: rgba(234,240,255,.14) !important;
        opacity: 1;
    }

    /* Chrome autofill fix */
    input.form-control:-webkit-autofill,
    input.form-control:-webkit-autofill:hover,
    input.form-control:-webkit-autofill:focus,
    textarea.form-control:-webkit-autofill,
    textarea.form-control:-webkit-autofill:hover,
    textarea.form-control:-webkit-autofill:focus,
    select.form-select:-webkit-autofill,
    select.form-select:-webkit-autofill:hover,
    select.form-select:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--text) !important;
        transition: background-color 9999s ease-out 0s;
        box-shadow: 0 0 0px 1000px rgba(6,10,20,.62) inset !important;
        border: 1px solid rgba(234,240,255,.14) !important;
    }

/* form-floating */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.25rem + 2px);
    padding: 1.0rem .9rem .55rem;
}

.form-floating > label {
    color: rgba(234,240,255,.72) !important;
    padding: 1.0rem .9rem;
    opacity: 1;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: rgba(234,240,255,.85) !important;
    transform: scale(.85) translateY(-.55rem) translateX(.15rem);
}

.form-floating > label::after {
    background: transparent !important;
}

.form-floating > .form-control::placeholder {
    color: transparent !important;
}

/* ===== Accordion ===== */
.accordion-item {
    background: rgba(15,26,51,.55);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    overflow: hidden;
}

.accordion-button {
    background: transparent;
    color: var(--text);
    font-weight: 800;
}

    .accordion-button:not(.collapsed) {
        background: rgba(234,240,255,.06);
        color: var(--text);
    }

    .accordion-button:focus {
        box-shadow: 0 0 0 .25rem rgba(110,168,254,.18);
    }

.accordion-body {
    background: transparent;
}

.accordion-button::after {
    filter: invert(1);
    opacity: .85;
}

/* ===== Tables (dark) ===== */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--stroke);
    margin-bottom: 0;
}

    .table thead {
        background: rgba(234,240,255,.06);
    }

        .table thead th {
            color: rgba(234,240,255,.95);
            font-weight: 800;
            border-bottom: 1px solid var(--stroke);
        }

    .table td {
        color: rgba(234,240,255,.92);
    }

    .table tbody tr:hover {
        background: rgba(234,240,255,.04);
    }

.table-responsive {
    background: linear-gradient(180deg, rgba(15,26,51,.85), rgba(15,26,51,.65));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .25rem;
}

/* ===== Dropdown ===== */
.dropdown-menu {
    background: rgba(15,26,51,.98);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--text);
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: rgba(234,240,255,.08);
        color: var(--text);
    }

/* ===== Pagination ===== */
.page-link {
    background: rgba(15,26,51,.75);
    border: 1px solid var(--stroke);
    color: var(--text);
}

    .page-link:hover {
        background: rgba(234,240,255,.08);
        color: var(--text);
    }

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--brand), #9a7bff);
    border: none;
    color: #fff;
}

/* ===== Small UI blocks you had ===== */
.hero {
    padding: 2.25rem 1.25rem;
    border: 1px solid var(--stroke);
    border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(180deg, rgba(15,26,51,.78), rgba(15,26,51,.55));
    box-shadow: var(--shadow);
}

.kpi {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

    .kpi .pill {
        border: 1px solid var(--stroke);
        background: rgba(234,240,255,.08);
        border-radius: 999px;
        padding: .35rem .65rem;
        font-size: .92rem;
    }

.small-note {
    font-size: .95rem;
    color: var(--muted);
}

/* ===== Footer (single source of truth) ===== */
.footer {
    background: rgba(15,26,51,.72);
    border-top: 1px solid var(--stroke);
    backdrop-filter: blur(6px);
}

.footer-title {
    font-weight: 900;
    color: rgba(234,240,255,.92);
    margin-bottom: .5rem;
}

.footer-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: .35rem;
}

    .footer-links a {
        color: rgba(234,240,255,.78);
        text-decoration: none;
        font-weight: 800;
    }

        .footer-links a:hover {
            color: rgba(234,240,255,.95);
            text-decoration: underline;
        }


/* Background ma być globalny (html/body). Content ma być przezroczysty. */
.page-content,
.app-header,
main {
    background: transparent !important;
}



/* ================================
   STATUS PAGE (polling / steps UI)
   ================================ */

/* kontener statusu (jeśli używasz card) */
.status-card,
.status-panel,
.status-wrap .card {
    background: rgba(15,26,51,.78);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* nagłówki / meta */
.status-kicker {
    color: rgba(234,240,255,.72);
    font-weight: 700;
    font-size: .95rem;
}

.status-title {
    font-weight: 900;
    letter-spacing: -.3px;
    margin: .15rem 0 .25rem;
}

.status-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: rgba(234,240,255,.85);
    word-break: break-all;
}

    .status-id .hl {
        color: var(--brand2);
    }

/* ===== Spinner ===== */
.spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 4px solid rgba(234,240,255,.18);
    border-top-color: rgba(110,168,254,.95);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Steps ===== */
.steps {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

    .steps .bar {
        flex: 1 1 40px;
        height: 2px;
        background: rgba(234,240,255,.12);
        border-radius: 999px;
        min-width: 24px;
    }

    .steps .step {
        display: flex;
        align-items: center;
        gap: .5rem;
    }

    .steps .dot {
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: rgba(234,240,255,.18);
        border: 1px solid rgba(234,240,255,.18);
    }

    .steps .lbl {
        font-size: .92rem;
        color: rgba(234,240,255,.75);
        font-weight: 700;
    }

    /* states */
    .steps .step.active .dot {
        background: rgba(110,168,254,.95);
        border-color: rgba(110,168,254,.95);
        box-shadow: 0 0 0 4px rgba(110,168,254,.16);
    }

    .steps .step.active .lbl {
        color: rgba(234,240,255,.92);
    }

    .steps .step.done .dot {
        background: rgba(124,242,194,.95);
        border-color: rgba(124,242,194,.95);
    }

    .steps .step.done .lbl {
        color: rgba(234,240,255,.92);
    }

    .steps .step.error .dot {
        background: rgba(255,107,107,.95);
        border-color: rgba(255,107,107,.95);
    }

    .steps .step.error .lbl {
        color: rgba(255,107,107,.92);
    }

/* ===== Progress bar ===== */
.progress {
    background: rgba(234,240,255,.10);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--brand), #9a7bff);
}

/* ===== Status badges (Pending/Queued etc.) ===== */
.status-badges {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 800;
    border: 1px solid var(--stroke);
    background: rgba(234,240,255,.06);
    color: rgba(234,240,255,.92);
    font-size: .9rem;
}

    .status-pill .ic {
        opacity: .9;
    }

/* ===== Copy text under progress ===== */
.polling-note {
    color: rgba(234,240,255,.65);
    font-size: .92rem;
    margin-top: .35rem;
}

/* Mobile tightening */
@media (max-width: 576px) {
    .steps {
        gap: .55rem;
    }

        .steps .lbl {
            font-size: .88rem;
        }
}

/* ===== Navbar stacking: dropdown zawsze nad contentem ===== */
.app-header {
    position: relative;
    z-index: 1030;
}

.navbar {
    position: relative;
    z-index: 1030;
}

/* jeśli gdzieś masz overflow hidden na nav/header — zabija dropdown */
.app-header, .navbar {
    overflow: visible;
}

    .navbar .container {
        overflow: visible;
    }
/* ważne przy glass/layoutach */

/* ===== Dropdown menu (Konto) ===== */
.dropdown-menu.nav-dd {
    min-width: 280px;
    padding: .45rem;
    border-radius: 16px;
    border: 1px solid rgba(234,240,255,.12);
    background: rgba(15,26,51,.98);
    box-shadow: 0 18px 45px rgba(0,0,0,.45);
}

/* poprawa “dziwnego” pozycjonowania przy flex-row w navbarze */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-menu {
    margin-top: .5rem; /* odsuwa od przycisku */
}

/* head w dropdownie */
.nav-dd-head {
    border-radius: 14px;
    background: rgba(234,240,255,.06);
    border: 1px solid rgba(234,240,255,.10);
}

.nav-dd-kicker {
    font-size: .82rem;
    color: rgba(234,240,255,.70);
    font-weight: 800;
}

.nav-dd-user {
    margin-top: .15rem;
    font-weight: 900;
    color: rgba(234,240,255,.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* items */
.dropdown-item.nav-dd-item {
    border-radius: 12px;
    padding: .65rem .75rem;
    font-weight: 800;
    color: rgba(234,240,255,.92);
}

    .dropdown-item.nav-dd-item:hover,
    .dropdown-item.nav-dd-item:focus {
        background: rgba(234,240,255,.08);
        color: rgba(234,240,255,1);
    }

.dropdown-menu.nav-dd .dropdown-divider {
    border-top-color: rgba(234,240,255,.12);
    opacity: 1;
}

/* ===== Button look (Konto/Logout) ===== */
.btn-nav {
    border-radius: 999px;
    padding: .55rem .85rem;
    border: 1px solid rgba(234,240,255,.20);
    background: rgba(234,240,255,.06);
    color: rgba(234,240,255,.92);
    font-weight: 800;
}

    .btn-nav:hover {
        background: rgba(234,240,255,.10);
        border-color: rgba(234,240,255,.28);
        color: rgba(234,240,255,1);
    }


/* ===== Stacking order: header/topnav above everything ===== */
.app-header {
    position: relative;
    z-index: 2000;
}

.navbar {
    position: relative;
    z-index: 2000;
}

    /* dropdown jeszcze wyżej */
    .navbar .dropdown-menu {
        z-index: 2100;
    }

/* content poniżej */
.page-content {
    position: relative;
    z-index: 1;
}

.footer {
    position: relative;
    z-index: 1;
}

.app-header,
.navbar,
.navbar .container,
.navbar .navbar-collapse,
.nav-right {
    overflow: visible !important;
}

/* ===== Global background layer (ONE source of truth) ===== */
html, body {
    height: 100%;
    background: #060a14;
}

body {
    background: #060a14;
    color: var(--text);
}

    /* Jedna stabilna warstwa gradientu */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        background: radial-gradient(1200px 600px at 20% 0%, rgba(110,168,254,.18), transparent 60%), radial-gradient(900px 500px at 80% 20%, rgba(124,242,194,.14), transparent 60%), linear-gradient(180deg, var(--bg), #060a14);
        transform: translateZ(0);
    }

/* Content normalnie, bez z-index na WSZYSTKO */
.page-content, .footer {
    position: relative;
    z-index: 1;
}

/* ===== Header + dropdown ALWAYS on top ===== */
.app-header, .navbar {
    position: relative;
    z-index: 5000;
    overflow: visible !important;
}

    .navbar .container,
    .navbar .navbar-collapse,
    .nav-right {
        overflow: visible !important;
    }

    /* Menu dropdown musi wygrać */
    .navbar .dropdown-menu {
        z-index: 6000 !important;
    }

/* ===== Tables hard override (force) ===== */
.table-responsive {
    background: linear-gradient(180deg, rgba(15,26,51,.85), rgba(15,26,51,.65)) !important;
    border: 1px solid var(--stroke) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    padding: .25rem !important;
}

.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text) !important;
    --bs-table-border-color: var(--stroke) !important;
    color: var(--text) !important;
    margin-bottom: 0 !important;
}

    .table thead {
        background: rgba(234,240,255,.06) !important;
    }

        .table thead th {
            color: rgba(234,240,255,.95) !important;
            font-weight: 800 !important;
            border-bottom: 1px solid var(--stroke) !important;
        }

    .table td {
        color: rgba(234,240,255,.90) !important;
    }

    .table tbody tr:hover {
        background: rgba(234,240,255,.04) !important;
    }


.page-title {
    font-weight: 900;
    letter-spacing: -.4px;
}

.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}
