:root {
    --glass-bg: rgba(15, 23, 42, 0.68);
    --glass-bg-strong: rgba(15, 23, 42, 0.86);
    --glass-border: rgba(148, 163, 184, 0.20);
    --glass-border-blue: rgba(96, 165, 250, 0.38);
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f59e0b;
    --radius: 20px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #050816;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main) !important;
    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(37, 99, 235, 0.30),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 8%,
            rgba(124, 58, 237, 0.24),
            transparent 32%
        ),
        radial-gradient(
            circle at 74% 90%,
            rgba(14, 165, 233, 0.17),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #050816 0%,
            #071122 48%,
            #0c1228 100%
        ) !important;
    background-attachment: fixed !important;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body::before,
body::after {
    position: fixed;
    z-index: -1;
    display: block;
    content: "";
    pointer-events: none;
    border-radius: 999px;
    filter: blur(75px);
    opacity: 0.36;
    animation: hblinkFloat 18s ease-in-out infinite alternate;
}

body::before {
    top: -130px;
    left: -110px;
    width: 390px;
    height: 390px;
    background: rgba(37, 99, 235, 0.62);
}

body::after {
    right: -140px;
    bottom: -150px;
    width: 440px;
    height: 440px;
    background: rgba(124, 58, 237, 0.50);
    animation-delay: -8s;
}

@keyframes hblinkFloat {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(42px, 26px, 0) scale(1.12);
    }
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    color: #dbeafe;
}

/* Horná lišta */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 68px;
    padding: 12px 0 !important;
    background: rgba(5, 8, 22, 0.72) !important;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.08rem;
    font-weight: 820;
    letter-spacing: -0.025em;
}

.navbar-brand::before {
    display: inline-flex;
    width: 38px;
    height: 38px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    content: "📡";
    background:
        linear-gradient(
            145deg,
            rgba(59, 130, 246, 0.98),
            rgba(124, 58, 237, 0.94)
        );
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 13px;
    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    vertical-align: middle;
}

/* Hlavný obsah */
.container.py-4,
.container {
    width: min(1450px, calc(100% - 28px));
    max-width: 1450px;
}

/* Glass panely */
.card,
.modal-content,
.dropdown-menu {
    color: var(--text-main) !important;
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.73),
            rgba(15, 23, 42, 0.67)
        ) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.card {
    overflow: hidden;
}

.card-header {
    padding: 16px 20px !important;
    color: #f8fafc !important;
    background: rgba(15, 23, 42, 0.47) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    font-weight: 780;
}

.card-body,
.card.p-4 {
    padding: 22px !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #f8fafc;
    font-weight: 820;
    letter-spacing: -0.025em;
}

p {
    color: var(--text-soft);
}

/* Login */
.row.justify-content-center {
    min-height: calc(100vh - 145px);
    align-items: center;
}

.row.justify-content-center > [class*="col-"] {
    max-width: 440px;
}

.row.justify-content-center .card {
    position: relative;
    padding: 30px !important;
}

.row.justify-content-center .card::before {
    display: flex;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    align-items: center;
    justify-content: center;
    content: "📡";
    background:
        linear-gradient(
            145deg,
            #3b82f6,
            #6d28d9
        );
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 21px;
    box-shadow:
        0 18px 45px rgba(37, 99, 235, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.27);
    font-size: 2rem;
}

.row.justify-content-center .card h3,
.row.justify-content-center .card h4 {
    margin-bottom: 22px;
    text-align: center;
}

/* Formuláre */
.form-label {
    margin-bottom: 7px;
    color: #cbd5e1 !important;
    font-size: 0.8rem;
    font-weight: 730;
}

.form-control,
.form-select,
textarea.form-control {
    min-height: 44px;
    color: #f8fafc !important;
    background: rgba(2, 6, 23, 0.52) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 12px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.form-control::placeholder {
    color: #64748b !important;
}

.form-control:focus,
.form-select:focus {
    color: white !important;
    background: rgba(2, 6, 23, 0.68) !important;
    border-color: rgba(96, 165, 250, 0.78) !important;
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 12px 28px rgba(0, 0, 0, 0.16) !important;
}

.form-check-input {
    background-color: rgba(2, 6, 23, 0.56);
    border-color: rgba(148, 163, 184, 0.36);
}

.form-check-input:checked {
    background-color: var(--blue);
    border-color: var(--blue);
}

/* Tlačidlá */
.btn {
    min-height: 39px;
    padding: 8px 14px;
    border-radius: 11px !important;
    font-size: 0.84rem;
    font-weight: 750;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff !important;
    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        ) !important;
    border-color: rgba(96, 165, 250, 0.70) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.30);
}

.btn-primary:hover {
    background:
        linear-gradient(
            135deg,
            #60a5fa,
            #2563eb
        ) !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.40);
}

.btn-outline-light {
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(226, 232, 240, 0.20) !important;
}

.btn-outline-light:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(226, 232, 240, 0.40) !important;
}

.btn-outline-danger {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.04) !important;
    border-color: rgba(239, 68, 68, 0.44) !important;
}

.btn-outline-danger:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.88) !important;
    border-color: rgba(239, 68, 68, 0.88) !important;
}

.btn-secondary {
    color: #e2e8f0 !important;
    background: rgba(71, 85, 105, 0.60) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

/* Tabuľky */
.table-responsive {
    overflow: hidden;
    border-radius: var(--radius);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: rgba(148, 163, 184, 0.035);
    --bs-table-hover-bg: rgba(59, 130, 246, 0.09);
    --bs-table-color: var(--text-soft);
    --bs-table-border-color: rgba(148, 163, 184, 0.11);

    margin-bottom: 0 !important;
    color: var(--text-soft) !important;
}

.table > :not(caption) > * > * {
    padding: 13px 15px !important;
    color: inherit !important;
    background: transparent !important;
    border-bottom-color: rgba(148, 163, 184, 0.11) !important;
    box-shadow: none !important;
    vertical-align: middle;
}

.table thead th {
    color: #bfdbfe !important;
    background: rgba(15, 23, 42, 0.47) !important;
    border-bottom: 1px solid var(--glass-border-blue) !important;
    font-size: 0.72rem;
    font-weight: 810;
    letter-spacing: 0.065em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.18s ease;
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* Hlásenia */
.alert {
    color: var(--text-main) !important;
    background: rgba(15, 23, 42, 0.80) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.alert-success {
    background: rgba(22, 101, 52, 0.34) !important;
    border-color: rgba(34, 197, 94, 0.38) !important;
}

.alert-danger {
    background: rgba(127, 29, 29, 0.36) !important;
    border-color: rgba(239, 68, 68, 0.40) !important;
}

.alert-warning {
    background: rgba(120, 53, 15, 0.34) !important;
    border-color: rgba(245, 158, 11, 0.38) !important;
}

.badge {
    padding: 6px 9px;
    border-radius: 999px !important;
    font-size: 0.71rem;
    font-weight: 760;
}

.text-muted,
.text-secondary,
small,
.small {
    color: var(--text-muted) !important;
}

code,
pre {
    color: #bfdbfe !important;
    background: rgba(2, 6, 23, 0.56) !important;
    border-radius: 9px;
}

pre {
    padding: 15px;
    overflow: auto;
}

.modal-backdrop.show {
    opacity: 0.74 !important;
}

.modal-backdrop {
    background: #020617 !important;
}

.modal-header,
.modal-footer {
    border-color: var(--glass-border) !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.55);
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.63);
    border: 2px solid rgba(2, 6, 23, 0.60);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.76);
}

@media (max-width: 768px) {
    .container.py-4,
    .container {
        width: calc(100% - 18px);
    }

    .navbar {
        position: relative;
    }

    .navbar .container-fluid {
        gap: 10px;
        flex-wrap: wrap;
    }

    .navbar-brand::before {
        width: 35px;
        height: 35px;
    }

    .row.justify-content-center .card {
        padding: 23px !important;
    }

    .table > :not(caption) > * > * {
        padding: 11px 10px !important;
    }
}


/* =========================================================
   HBLink login – transparent glass
   ========================================================= */

.hblink-login-page {
    display: flex;
    min-height: calc(100vh - 92px);
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.hblink-login-shell {
    width: min(100%, 390px);
}

.hblink-login-card {
    position: relative;
    overflow: visible !important;

    width: 100%;
    padding: 28px 27px 24px !important;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.105),
            rgba(255, 255, 255, 0.035)
        ) !important;

    border:
        1px solid rgba(255, 255, 255, 0.24) !important;

    border-radius: 22px !important;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;

    backdrop-filter:
        blur(16px)
        saturate(135%) !important;

    -webkit-backdrop-filter:
        blur(16px)
        saturate(135%) !important;

    isolation: isolate;
}

.hblink-login-card::before {
    position: absolute;
    inset: 0;
    z-index: -1;

    content: "";

    border-radius: inherit;

    background:
        radial-gradient(
            circle at 22% 0%,
            rgba(255, 255, 255, 0.13),
            transparent 42%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(20, 65, 78, 0.13),
            transparent 52%
        );

    pointer-events: none;
}

/* Logo a nadpis sa už neprekrývajú */

.hblink-login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;

    margin-bottom: 24px;

    text-align: center;
}

.hblink-login-logo {
    display: flex;
    flex: 0 0 auto;

    width: 54px;
    height: 54px;

    align-items: center;
    justify-content: center;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.21),
            rgba(255, 255, 255, 0.07)
        );

    border:
        1px solid rgba(255, 255, 255, 0.29);

    border-radius: 50%;

    box-shadow:
        0 13px 32px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);

    font-size: 0.88rem;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hblink-login-title {
    display: block;
    width: 100%;
}

.hblink-login-title h3 {
    margin: 0;

    color: #fff;

    font-size: 1.42rem;
    font-weight: 850;
    line-height: 1.18;
}

.hblink-login-title p {
    margin: 5px 0 0;

    color: rgba(235, 243, 249, 0.65);

    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

/* Formulár */

.hblink-login-form {
    position: relative;
    z-index: 2;
}

.hblink-login-field {
    position: relative;
    z-index: 2;

    margin-bottom: 15px;
}

.hblink-login-field .form-label {
    margin: 0 0 7px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 0.73rem;
    font-weight: 750;
}

.hblink-login-field .form-control {
    position: relative;
    z-index: 3;

    height: 48px;

    padding: 0 14px;

    color: #fff !important;

    background:
        rgba(4, 9, 14, 0.27) !important;

    border:
        1px solid rgba(255, 255, 255, 0.20) !important;

    border-radius: 12px !important;

    outline: none;

    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.04) !important;

    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease;
}

.hblink-login-field .form-control:hover {
    background:
        rgba(4, 9, 14, 0.34) !important;

    border-color:
        rgba(255, 255, 255, 0.28) !important;
}

.hblink-login-field .form-control:focus {
    background:
        rgba(3, 8, 13, 0.39) !important;

    border-color:
        rgba(142, 196, 239, 0.72) !important;

    box-shadow:
        0 0 0 3px rgba(92, 164, 220, 0.17),
        inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

/* Chrome / Brave / Safari autofill */

.hblink-login-field input:-webkit-autofill,
.hblink-login-field input:-webkit-autofill:hover,
.hblink-login-field input:-webkit-autofill:focus,
.hblink-login-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;

    caret-color: #fff;

    -webkit-box-shadow:
        0 0 0 1000px rgba(8, 13, 19, 0.88) inset !important;

    transition:
        background-color 999999s ease-out 0s;
}

/* Tlačidlo */

.hblink-login-submit {
    height: 46px;
    margin-top: 3px;

    color: #fff !important;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.075)
        ) !important;

    border:
        1px solid rgba(255, 255, 255, 0.24) !important;

    border-radius: 12px !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.17),
        0 12px 25px rgba(0, 0, 0, 0.15) !important;

    font-size: 0.78rem;
    font-weight: 800;
}

.hblink-login-submit:hover {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.25),
            rgba(255, 255, 255, 0.11)
        ) !important;

    border-color:
        rgba(255, 255, 255, 0.35) !important;
}

.hblink-login-status {
    display: flex;

    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-top: 17px;

    color: rgba(231, 241, 247, 0.58);

    font-size: 0.67rem;
    font-weight: 650;
}

.hblink-login-status span {
    width: 7px;
    height: 7px;

    background: #34d27c;

    border-radius: 50%;

    box-shadow:
        0 0 11px rgba(52, 210, 124, 0.72);
}

/*
 * Browserové okno iCloud Heslá vytvára samotný Brave/macOS.
 * Jeho polohu CSS stránky nevie riadiť.
 * Väčšie medzery medzi inputmi však zabránia tomu,
 * aby vizuálne zakrývalo druhé pole a tlačidlo.
 */
.hblink-login-field + .hblink-login-field {
    margin-top: 6px;
}

@media (max-width: 520px) {
    .hblink-login-page {
        min-height: calc(100vh - 70px);
        padding: 20px 13px;
    }

    .hblink-login-card {
        padding: 24px 20px 21px !important;
    }
}
