/* ==========================================================================
   Base - resets, typography, layout primitives shared by every page
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Asnjë imazh nuk e kalon kontejnerin e vet */
img {
    max-width: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-900);
    background: var(--paper-50);
    font-size: var(--fs-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.font-serif {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--heading);
    text-wrap: balance;
}

h1 {
    font-size: var(--fs-h1);
    line-height: 1.1;
}

h2 {
    font-size: var(--fs-h2);
    line-height: 1.18;
}

h3 {
    font-size: var(--fs-h3);
    line-height: 1.3;
}

h4 {
    font-size: var(--fs-h4);
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--heading);
    letter-spacing: -0.005em;
}

p {
    color: var(--text-700);
    text-wrap: pretty;
}

.lead,
.section-lead {
    font-size: 1.075rem;
    line-height: 1.65;
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

a:hover {
    color: var(--brand-500);
}

.container-xl {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Inline content links get an animated underline */
main p a,
.prose a {
    background-image: linear-gradient(var(--brand-400), var(--brand-400));
    background-size: 0% 1.5px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}

main p a:hover,
.prose a:hover {
    background-size: 100% 1.5px;
}

/* Focus visibility - accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ==========================================================================
   Themed browser chrome - brand-tinted scrollbars, text selection and caret
   on every page (public + admin). `scrollbar-*` are inherited, so :root covers
   every scroll container; ::-webkit-scrollbar handles Chrome/Safari/Edge.
   ========================================================================== */
:root {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-700) transparent;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--ink-700);
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--ink-800);
}

::-webkit-scrollbar-thumb:active {
    background-color: var(--ink-900);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Kontejnerët me sfond të errët → thumb i çelët që të mbetet i dukshëm. */
.admin-sidebar,
.log-console {
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb,
.log-console::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
}

.admin-sidebar::-webkit-scrollbar-thumb:hover,
.log-console::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

::selection {
    background: rgba(198, 64, 132, 0.26);
    color: var(--ink-900);
}

input,
textarea,
[contenteditable] {
    caret-color: var(--brand-500);
}

/* ---- Skip link (keyboard accessibility) ---- */
.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    z-index: 1100;
    background: var(--brand-500);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: var(--r-sm);
    transform: translateY(-150%);
    transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

/* ---- Buttons (override Bootstrap defaults with brand identity) ---- */
.btn {
    --btn-lift: -1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 600;
    border-radius: var(--r-sm);
    padding: 0.3rem 1rem;
    font-size: 0.9375rem;
    letter-spacing: 0.005em;
    border-width: 1.5px;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn:hover {
    transform: translateY(var(--btn-lift));
}

.btn:active {
    transform: translateY(0);
    transition-duration: 60ms;
}

.btn:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

.btn-brand,
.btn-gold {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-brand:hover,
.btn-gold:hover {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.btn-ink {
    background: var(--ink-800);
    border-color: var(--ink-800);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-ink:hover {
    background: var(--ink-900);
    border-color: var(--ink-900);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* Veprime shkatërruese - paleta e projektit, jo e kuqja e ndezur e Bootstrap-it */
.btn-danger {
    background: var(--danger-600);
    border-color: var(--danger-600);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: #9c3831;
    border-color: #9c3831;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-danger:disabled {
    background: var(--danger-600);
    border-color: var(--danger-600);
}

.btn-outline-brand {
    background: var(--paper-0);
    border-color: var(--line-300);
    color: var(--ink-800);
    padding: 0.3rem 1rem;
}

.btn-outline-brand:hover {
    background: var(--brand-100);
    border-color: var(--brand-500);
    color: var(--brand-600);
    box-shadow: var(--shadow-sm);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--r-md);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
}

/* icon nudge on hover */
.btn .bi {
    transition: transform var(--dur) var(--ease);
}

.btn:hover .bi-arrow-right {
    transform: translateX(3px);
}

.btn:hover .bi-arrow-up-right,
.btn:hover .bi-box-arrow-up-right {
    transform: translate(2px, -2px);
}

/* ---- Top strip (echoes the umb.edu.al magenta utility bar) ---- */
.top-strip {
    background: var(--brand-500);
    color: #fff;
    font-size: var(--fs-small);
    line-height: var(--topstrip-h);
    height: var(--topstrip-h);
    overflow: hidden;
}

.top-strip .container-xl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top-strip a {
    color: #fff;
    opacity: .9;
}

.top-strip a:hover {
    opacity: 1;
    text-decoration: underline;
}

.top-strip .strip-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Çelësi i gjuhës SQ / EN në shiritin e sipërm */
.lang-switch {
    display: inline-flex;
    align-items: stretch;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    overflow: hidden;
    line-height: 1;
}
.lang-switch button {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.32rem 0.6rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-switch button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.45);
}
.lang-switch button.active {
    background: #fff;
    color: var(--brand-600);
}
.lang-switch button:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
}
.lang-switch button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

/* Variant i lehtë - sfonde të çelëta (karta login/reset, jo shiriti i sipërm i errët) */
.lang-switch.lang-switch-light {
    border-color: var(--line-300);
}
.lang-switch.lang-switch-light button {
    color: var(--text-500);
}
.lang-switch.lang-switch-light button + button {
    border-left-color: var(--line-300);
}
.lang-switch.lang-switch-light button.active {
    background: var(--brand-600);
    color: #fff;
}
.lang-switch.lang-switch-light button:not(.active):hover {
    background: var(--brand-100);
    color: var(--brand-600);
}
.lang-switch.lang-switch-light button:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 1px;
}

@media (max-width: 575.98px) {
    /* Shiriti i sipërm: mbaj vetëm identitetin + çelësin e gjuhës, jepu hapësirë */
    .top-strip {
        height: auto;
        line-height: 1.35;
        overflow: hidden;
        padding: 0.45rem 0;
    }
    .top-strip .container-xl {
        gap: 0.6rem;
    }
    .top-strip .container-xl > span {
        font-size: 0.78rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* email + linku umb.edu.al janë te footer-i - hiqi nga shiriti i ngushtë */
    .top-strip .strip-meta span,
    .top-strip .strip-meta > a {
        display: none;
    }
    .lang-switch button {
        padding: 0.42rem 0.75rem;
        font-size: 0.74rem;
    }
}

/* ==========================================================================
   Navbar - sticky glass header + right-side slide-in drawer on mobile
   ========================================================================== */
.site-header {
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line-200);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow .28s var(--ease), border-color .28s var(--ease),
    height .28s var(--ease), background-color .28s var(--ease),
    transform .38s var(--ease);
}

.site-header .navbar {
    flex-wrap: nowrap;
}

.site-header .container-xl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header.is-stuck {
    height: calc(var(--header-h) - 10px);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 6px 24px rgba(22, 16, 22, 0.09);
    border-color: transparent;
}

.site-header.is-hidden {
    transform: translateY(-115%);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--heading);
    padding: 13px 10px;
}

.brand-logo {
    display: block;
    height: 32px;
    width: auto;
    transform-origin: left center;
    transition: transform .3s var(--ease-out);
}

.is-stuck .brand-logo {
    transform: scale(0.92);
}

.brand-mark:hover .brand-logo {
    transform: scale(1.04) rotate(-1.5deg);
}

.brand-suffix {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1;
    color: var(--brand-500);
    padding-left: 0.55rem;
    border-left: 1px solid var(--line-300);
}

@media (max-width: 399.98px) {
    .brand-suffix {
        display: none;
    }
}

/* ---- Desktop nav links ---- */
.nav-link-custom {
    color: var(--text-700);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--r-sm);
    position: relative;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-link-custom:hover {
    color: var(--brand-600);
}

.nav-link-custom.active {
    color: var(--brand-600);
    font-weight: 600;
}

.nav-link-custom::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--brand-500);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .28s var(--ease-out);
}

.nav-link-custom:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link-custom.active::after {
    transform: scaleX(1);
}

/* ---- Hamburger toggle (animated) ---- */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    border: 0;
    background: transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    position: relative;
    z-index: 1046;
    transition: background var(--dur) var(--ease);
}

.nav-toggle:hover {
    background: var(--brand-100);
}

.nav-toggle-box {
    position: relative;
    width: 22px;
    height: 14px;
}

.nav-toggle-inner,
.nav-toggle-inner::before,
.nav-toggle-inner::after {
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink-800);
    transition: transform .3s var(--ease-out), background-color .2s var(--ease), width .3s var(--ease-out);
}

.nav-toggle-inner {
    top: 6px;
}

.nav-toggle-inner::before {
    content: "";
    top: -6px;
}

.nav-toggle-inner::after {
    content: "";
    top: 6px;
    width: 15px;
}

.nav-toggle:hover .nav-toggle-inner::after {
    width: 22px;
}

.nav-toggle.is-open .nav-toggle-inner {
    background: transparent;
}

.nav-toggle.is-open .nav-toggle-inner::before {
    transform: translateY(6px) rotate(45deg);
    background: #fff;
}

.nav-toggle.is-open .nav-toggle-inner::after {
    transform: translateY(-6px) rotate(-45deg);
    width: 22px;
    background: #fff;
}

@media (min-width: 992px) {
    .nav-toggle {
        display: none;
    }
}

/* ---- Desktop inline nav list ---- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
}

.main-nav > li {
    display: flex;
}

@media (min-width: 992px) {
    html.js .main-nav > li {
        animation: nav-item-in .45s var(--ease-out) both;
        animation-delay: calc(var(--i, 0) * 55ms + 120ms);
    }
}

@keyframes nav-item-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Slide-in drawer (mobile) - lives at <body> level, hidden on lg+ ---- */
.offcanvas-backdrop.show {
    opacity: .55;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.nav-drawer {
    width: min(340px, 84vw);
    background: linear-gradient(180deg, var(--ink-900), #1b1320);
    color: #fff;
    border-left: 1px solid var(--ink-700);
}

.nav-drawer .offcanvas-header {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-drawer-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

.nav-drawer-title .bi {
    color: var(--brand-300);
}

.nav-drawer .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: .7;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

.nav-drawer .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.nav-drawer .offcanvas-body {
    padding: 1rem 1rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.nav-drawer .navbar-nav {
    gap: 0.2rem;
    width: 100%;
}

.nav-drawer .nav-link-custom {
    display: block;
    color: rgba(255, 255, 255, .82);
    font-size: 1.02rem;
    font-weight: 500;
    padding: 0.9rem 1rem !important;
    border-radius: var(--r-md);
    overflow: hidden;
}

.nav-drawer .nav-link-custom::after {
    display: none;
}

.nav-drawer .nav-link-custom::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-400);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .25s var(--ease-out);
}

.nav-drawer .nav-link-custom:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-drawer .nav-link-custom:hover::before,
.nav-drawer .nav-link-custom.active::before {
    transform: scaleY(1);
}

.nav-drawer .nav-link-custom.active {
    color: #fff;
    background: rgba(177, 0, 93, .20);
}

.nav-drawer .nav-cta {
    margin-top: 0.85rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.nav-drawer .nav-cta .btn-brand {
    padding: 0.78rem 1rem;
}

.nav-drawer .nav-item {
    opacity: 0;
    transform: translateX(28px);
}

.nav-drawer.show .nav-item {
    animation: drawer-item .5s var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 55ms + 90ms);
}

@keyframes drawer-item {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Cards ---- */
.card-plain {
    background: var(--paper-0);
    border: 1px solid var(--line-200);
    border-radius: var(--r-md);
    transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card-plain:hover {
    border-color: var(--brand-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* ---- Source chip / reference footnote style (not a glossy pill) ---- */
.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--line-200);
    border-radius: var(--r-sm);
    padding: 0.4rem 0.7rem;
    background: var(--paper-0);
    font-size: var(--fs-small);
    color: var(--text-700);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.source-chip:hover {
    border-color: var(--brand-500);
    color: var(--ink-900);
    transform: translateY(-1px);
}

.source-chip .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ink-800);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Badges ---- */
.badge-status-active {
    background: var(--success-100);
    color: var(--success-600);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.75rem;
}

.badge-status-off {
    background: var(--paper-100);
    color: var(--text-500);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.75rem;
}

.badge-status-warn {
    background: var(--warn-100);
    color: var(--warn-600);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.75rem;
}

.badge-status-error {
    background: var(--danger-100);
    color: var(--danger-600);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.75rem;
}

/* ---- Sections ---- */
section {
    padding: 5rem 0;
}

.section-tight {
    padding: 3rem 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--brand-600);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    background: var(--brand-500);
    border-radius: 2px;
}

.section-lead {
    color: var(--text-500);
    max-width: 640px;
}

/* ---- Footer ---- */
/* Sticky footer - te faqet publike (kudo ku ka .site-footer) footer-i shkon në fund
   të viewport-it edhe kur përmbajtja është e shkurtër (p.sh. faqja 404 / e gabimit). */
body:has(> .site-footer) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

body:has(> .site-footer) > main {
    flex: 1 0 auto;
}

.site-footer {
    background: var(--ink-900);
    color: #fff;
    padding: 3.5rem 0 1.75rem;
    margin-top: 4rem;
}

.site-footer p,
.site-footer span,
.site-footer li {
    color: rgba(255, 255, 255, 0.82);
}

.site-footer a {
    color: #fff;
    opacity: 0.82;
    transition: opacity var(--dur) var(--ease);
}

.site-footer a:hover {
    opacity: 1;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer hr {
    border-color: rgba(255, 255, 255, 0.14);
}

.site-footer h2 {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.site-footer .footer-fine,
.site-footer .footer-fine span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.site-footer a:has(> .footer-logo) {
    display: inline-block;
}

.footer-contact {
    font-style: normal;
    line-height: 1.6;
}

.footer-contact .bi {
    color: var(--brand-300);
}

.footer-admin-link {
    font-size: 0.85rem;
    opacity: 0.55 !important;
}

.footer-admin-link:hover {
    opacity: 0.9 !important;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.footer-social a {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    opacity: 0.82;
    font-size: 1rem;
    transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

.footer-social a:hover {
    background: var(--brand-500);
    opacity: 1;
    transform: translateY(-2px);
    text-decoration: none;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.footer-legal a {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-legal a:hover {
    opacity: 1;
}

/* ---- Cookie / privacy notice ---- */
.cookie-notice {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1090;
    max-width: 640px;
    margin: 0 auto;
    background: var(--ink-900);
    color: #fff;
    border: 1px solid var(--ink-700);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.cookie-notice p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    flex: 1 1 260px;
}

.cookie-notice code {
    color: var(--brand-300);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.05em 0.35em;
    border-radius: var(--r-sm);
    font-size: 0.85em;
}

.cookie-notice a {
    color: var(--brand-300);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-notice .btn {
    flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .cookie-notice {
        animation: fade-up .4s var(--ease-out) both;
    }
}

/* ---- Toast container tweak ---- */
.toast {
    border-radius: var(--r-md);
}

/* ---- Forms ---- */
.form-control,
.form-select {
    border-radius: var(--r-sm);
    border-color: var(--line-300);
    padding: 0.6rem 0.85rem;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(177, 0, 93, 0.14);
}

/* ---- Password field with show/hide toggle ---- */
.pw-field {
    position: relative;
}

.pw-field .form-control {
    padding-right: 2.85rem;
}

.btn-pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-400);
    cursor: pointer;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    transition: color var(--dur) var(--ease);
}

.btn-pw-toggle:hover {
    color: var(--brand-600);
}

.btn-pw-toggle:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: -2px;
}

.btn-pw-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.btn-pw-toggle svg[hidden] {
    display: none;
}

/* ---- Password requirements checklist (live) ---- */
.pw-checklist {
    margin-top: .55rem;
}

.pw-checklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .3rem;
}

.pw-checklist li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    line-height: 1.3;
    color: var(--text-500);
    transition: color var(--dur) var(--ease);
}

.pw-checklist li.ok {
    color: var(--success-600);
}

.pw-check-ic {
    flex: 0 0 1.05rem;
    width: 1.05rem;
    height: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 50%;
    background: var(--paper-100);
    color: var(--text-400);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.pw-checklist li.ok .pw-check-ic {
    background: var(--success-100);
    color: var(--success-600);
}

@media (prefers-reduced-motion: reduce) {
    .pw-checklist li,
    .pw-check-ic {
        transition: none;
    }
}

/* ---- Empty / loading states ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-500);
}

.empty-state i {
    font-size: 2.25rem;
    color: var(--line-300);
    margin-bottom: 0.75rem;
    display: block;
}

.skeleton {
    background: linear-gradient(90deg, var(--paper-100) 25%, var(--line-200) 37%, var(--paper-100) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: var(--r-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

/* ---- Table density ---- */
.table-clean {
    font-size: 0.9rem;
}

.table-clean thead th {
    font-weight: 600;
    color: var(--text-500);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--line-200);
    background: var(--paper-50);
}

.table-clean td {
    vertical-align: middle;
    border-color: var(--line-200);
}

.table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Utility ---- */
.text-gold {
    color: var(--brand-500) !important;
}

.text-brand {
    color: var(--brand-500) !important;
}

.text-muted-2 {
    color: var(--text-500) !important;
}

.bg-ink {
    background: var(--ink-800) !important;
}

.divider-v {
    width: 1px;
    background: var(--line-200);
}

/* ==========================================================================
   Motion - entrance reveals + ambient micro-animations
   All opt-in via [data-animate]; disabled under reduced-motion or no-JS.
   ========================================================================== */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(.9);
    }

    60% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

html.js [data-animate] {
    opacity: 0;
}

html.js [data-animate].is-visible {
    animation: fade-up var(--dur-slow) var(--ease-out) both;
    animation-delay: var(--reveal-delay, 0ms);
}

html.js [data-animate="fade"].is-visible {
    animation-name: fade-in;
}

html.js [data-animate="pop"].is-visible {
    animation-name: pop-in;
}

/* Ambient hover/press for any interactive card or tile */
.lift {
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease);
}

.lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ---- Scroll progress bar (fixed, top) ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1031;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .1s linear;
    pointer-events: none;
}

/* ---- Back-to-top floating button ---- */
.to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 0;
    background: var(--ink-900);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px) scale(.9);
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease-out), background-color .2s var(--ease);
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    background: var(--brand-500);
    transform: translateY(-3px);
}

.to-top:active {
    transform: translateY(0);
}

/* ---- Primary button sheen on hover ---- */
.btn-brand,
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-brand::after,
.btn-gold::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -150%;
    width: 55%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
}

.btn-brand:hover::after,
.btn-gold:hover::after {
    animation: btn-sheen .75s var(--ease);
}

@keyframes btn-sheen {
    from {
        left: -150%;
    }

    to {
        left: 165%;
    }
}

/* ---- CTA band ambient glow ---- */
.cta-band > * {
    position: relative;
    z-index: 1;
}

.cta-band::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 55%;
    aspect-ratio: 1;
    top: -22%;
    right: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 135, 176, .40), transparent 62%);
    filter: blur(30px);
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    .cta-band::after {
        animation: cta-glow 13s ease-in-out infinite alternate;
    }
}

@keyframes cta-glow {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-12%, 16%, 0) scale(1.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.js [data-animate] {
        opacity: 1 !important;
        animation: none !important;
    }

    html.js .main-nav > li,
    .nav-drawer .nav-item {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .site-header,
    .scroll-progress,
    .to-top,
    .cta-band::after {
        animation: none !important;
        transition: none !important;
    }

    .btn:hover,
    .card-plain:hover,
    .source-chip:hover,
    .lift:hover,
    .btn-brand:hover::after,
    .btn-gold:hover::after {
        transform: none !important;
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   OTP / verification-code inputs (reset-password.html, login-2fa.html)
   ========================================================================== */
.otp-group {
    display: flex;
    gap: .6rem;
    justify-content: center;
}

.otp-input {
    width: 3.25rem;
    height: 3.5rem;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: var(--r-md);
}

/* Narrow phones: keep the 4-digit code row inside the card */
@media (max-width: 400px) {
    .otp-group {
        gap: .4rem;
    }

    .otp-input {
        width: 2.75rem;
        height: 3.1rem;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Mobile polish - programi përdoret kryesisht nga telefoni
   ========================================================================== */

/* Rrjeti Bootstrap g-5/gx-5 ka margjina negative -1.5rem që dalin jashtë gutter-it
   të kontejnerit në telefon → scroll i vogël horizontal. E ulim në telefon. */
@media (max-width: 767.98px) {
    .row.g-5,
    .row.gx-5 {
        --bs-gutter-x: 1.5rem;
    }

    /* Rrjetë sigurie: çdo mbetje mbi gjerësinë e ekranit brenda përmbajtjes pritet
       (clip te <main>, jo te <html> - header-i sticky rri jashtë main-it, s'preket). */
    body > main {
        overflow-x: clip;
    }
}

@media (max-width: 575.98px) {
    .container-xl {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    section {
        padding: 3rem 0;
    }

    .section-tight {
        padding: 2.25rem 0;
    }

    .eyebrow {
        font-size: 0.72rem;
        margin-bottom: 0.6rem;
    }

    .eyebrow::before {
        width: 1.25rem;
    }

    .lead,
    .section-lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Header: logo + hamburger me hapësirë të mjaftueshme */
    .site-header .container-xl {
        gap: 0.5rem;
    }

    .brand-mark {
        padding: 10px 4px;
        font-size: 1.05rem;
    }

    /* Butonat: cak prekjeje real (>=44px) kur janë të vetëm */
    .btn-lg {
        padding: 0.72rem 1.15rem;
        font-size: 1rem;
    }

    /* Footer: kolona të pastra, ikona më të mëdha për prekje */
    .site-footer {
        padding: 2.75rem 0 1.5rem;
        margin-top: 2.75rem;
        text-align: left;
    }

    .site-footer .footer-social a {
        width: 2.5rem;
        height: 2.5rem;
    }

    .site-footer .footer-fine {
        text-align: center;
        gap: 0.75rem;
    }

    /* Asnjë varg i gjatë (domain, kod) nuk e prish faqen */
    .prose,
    .legal-prose,
    .legal-prose li,
    .faq-body {
        overflow-wrap: break-word;
    }

    code {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Njoftimi i cookies: më kompakt, mbi gishtin e poshtëm */
    .cookie-notice {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 380px) {
    .container-xl {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

/* ==========================================================================
   Përgjigjet e Barleti AI të formatuara nga markdown-i (renderMarkdown në main.js)
   ========================================================================== */
.md { white-space: normal; font-size: 0.95rem; line-height: 1.6; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 0.6rem; }
.md ul, .md ol { margin: 0 0 0.6rem; padding-left: 1.3rem; }
.md li { margin-bottom: 0.2rem; }
.md strong { font-weight: 600; }
.md .md-h { font-weight: 700; margin: 0.8rem 0 0.4rem; }
.md .md-h1, .md .md-h2 { font-size: 1.05rem; }
.md code {
    font-size: 0.85em; padding: 0.1em 0.35em; border-radius: 4px;
    background: rgba(127, 127, 127, 0.14);
}
.md pre {
    margin: 0 0 0.6rem; padding: 0.6rem 0.75rem; border-radius: 6px;
    background: rgba(127, 127, 127, 0.12); overflow-x: auto; white-space: pre;
}
.md pre code { padding: 0; background: none; }
.md hr { margin: 0.75rem 0; opacity: 0.2; }
.md a { text-decoration: underline; overflow-wrap: anywhere; }
.md .md-table { margin: 0 0 0.6rem; overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 0.9rem; min-width: 60%; }
.md th, .md td {
    padding: 0.35rem 0.6rem; text-align: left; vertical-align: top;
    border: 1px solid rgba(127, 127, 127, 0.28);
}
.md th { font-weight: 600; background: rgba(127, 127, 127, 0.12); }
.md tbody tr:nth-child(even) td { background: rgba(127, 127, 127, 0.05); }
