
/* =========================================
   PREMIUM HEADER
========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background .3s ease, box-shadow .3s ease;
}

body.dark-mode .header {
    background: rgba(15, 23, 42, 0.90);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-container {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* BRAND */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    color: var(--color-text, #0f172a);
    text-decoration: none;
}

.logo-mark {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 7px 20px rgba(37, 99, 235, .22);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.logo-text small {
    font-size: 11px;
    color: var(--color-muted, #64748b);
    letter-spacing: .3px;
}

/* NAVIGATION */

.navbar {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 11px;
    color: var(--color-text, #334155);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .25s ease;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 3px;
    height: 2px;
    border-radius: 5px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: #2563eb;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    transform: scaleX(1);
}

/* LANGUAGE */

.nav-language {
    display: flex;
    align-items: center;
    margin-inline-start: 8px;
}

.nav-language a,
.nav-language button,
.nav-language select {
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 9px;
    padding: 8px 11px;
    background: transparent;
    color: var(--color-text, #334155);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* HEADER ACTIONS */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.theme-toggle,
.menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 12px;
    background: transparent;
    color: var(--color-text, #334155);
    font-size: 17px;
    cursor: pointer;
    transition: .25s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
    background: rgba(37, 99, 235, .10);
    color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
}

/* DARK MODE */

body.dark-mode .nav-list a {
    color: #cbd5e1;
}

body.dark-mode .nav-list a:hover,
body.dark-mode .nav-list a.active {
    color: #60a5fa;
}

body.dark-mode .theme-toggle,
body.dark-mode .menu-toggle,
body.dark-mode .nav-language a,
body.dark-mode .nav-language button,
body.dark-mode .nav-language select {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, .15);
}

/* TABLET */

@media (max-width: 1100px) {
    .header-container {
        gap: 12px;
    }

    .nav-list {
        gap: 0;
    }

    .nav-list a {
        padding-inline: 7px;
        font-size: 12px;
    }

    .logo-text strong {
        font-size: 14px;
    }
}

/* MOBILE */

@media (max-width: 850px) {

    .header-container {
        min-height: 72px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding: 12px 20px 22px;
        background: #fff;
        border-top: 1px solid rgba(148, 163, 184, .15);
        box-shadow: 0 18px 35px rgba(15, 23, 42, .12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: .25s ease;
    }

    body.dark-mode .navbar {
        background: #0f172a;
        border-top-color: rgba(255, 255, 255, .08);
        box-shadow: 0 18px 35px rgba(0, 0, 0, .3);
    }

    .navbar.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        display: flex;
        width: 100%;
        padding: 13px 15px;
        border-radius: 10px;
        font-size: 14px;
    }

    .nav-list a::after {
        display: none;
    }

    .nav-list a:hover,
    .nav-list a.active {
        background: rgba(37, 99, 235, .09);
    }

    .nav-language {
        margin: 10px 0 0;
        padding: 10px 15px;
        border-top: 1px solid rgba(148, 163, 184, .2);
    }

    .nav-language a,
    .nav-language button,
    .nav-language select {
        min-height: 40px;
    }
}

@media (max-width: 480px) {

    .header-container {
        min-height: 66px;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .logo-text strong {
        font-size: 13px;
    }

    .logo-text small {
        font-size: 10px;
    }

    .theme-toggle,
    .menu-toggle {
        width: 38px;
        height: 38px;
    }

    .header-actions {
        gap: 7px;
    }
}






/* ==============================================================
*/

.global-messages {
    position: fixed;
    top: 100px;
    right: 25px;
    z-index: 99999;
    width: min(420px, calc(100% - 30px));
    pointer-events: none;
}

.global-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    animation: toastEnter 0.35s ease forwards;
}

.global-alert-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    cursor: pointer;
}

.global-alert-warning {
    border-color: #d97706;
}

.global-alert-warning i {
    color: #d97706;
}

.global-alert-error {
    border-color: #dc2626;
}

.global-alert-success {
    border-color: #16a34a;
}

.global-alert.is-hiding {
    animation: toastExit 0.4s ease forwards;
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastExit {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@media (max-width: 600px) {
    .global-messages {
        top: 85px;
        right: 15px;
    }
}




