﻿/* ================= DESIGN TOKENS ================= */
:root {
    --sw-primary: #0f7a5d;
    --sw-primary-dark: #0b2f2a;
    --sw-primary-light: #134e4a;
    --sw-accent: #10b981;
    --sw-accent-light: #bbf7d0;
    --sw-bg: #f8faf9;
    --sw-surface: #ffffff;
    --sw-text: #1e293b;
    --sw-text-muted: #64748b;
    --sw-border: #e2e8f0;
    --sw-radius-sm: 8px;
    --sw-radius-md: 12px;
    --sw-radius-lg: 16px;
    --sw-shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --sw-shadow-md: 0 4px 14px rgba(11, 47, 42, .08);
    --sw-shadow-lg: 0 10px 30px rgba(11, 47, 42, .12);
    --sw-transition: all .2s cubic-bezier(.4, 0, .2, 1);
}

/* ================= HEADER ================= */
.top-header {
    background: linear-gradient(90deg, #0b2f2a 0%, #10433b 50%, #134e4a 100%);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .14);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(8px);
}
.top-header__inner {
    width: 100%;
    max-width: 1680px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* brand */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    transition: opacity .2s ease;
}

.brand-badge {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(187, 247, 208, .15);
    border: 1px solid rgba(187, 247, 208, .3);
    border-radius: 10px;
    color: #a7f3d0;
    font-size: 18px;
}

.brand-link:hover {
    color: #ffffff;
    text-decoration: none;
    opacity: .92;
}

.brand-text--compact {
    display: none;
}

@media (min-width: 992px) {
    .top-header__brand {
        min-width: 0;
        flex: 0 1 auto;
    }
    .brand-link {
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1240px) {
    .top-header__inner {
        padding-left: 16px;
        padding-right: 16px;
    }
    .brand-link {
        font-size: 18px;
    }
    .brand-badge {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .top-header__right {
        gap: 6px;
    }
    .header-text-link,
    .user-greeting {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* right area */
.top-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-header__toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background-color .18s ease;
}

.top-header__toggle:hover,
.top-header__toggle:focus-visible {
    background: rgba(255, 255, 255, .16);
    outline: none;
}

/* greeting */
.user-greeting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2f1ec;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    padding: 6px 10px;
}

/* text links */
.header-text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2f1ec;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 7px 11px;
    transition: all .18s ease;
}

.header-text-link i {
    font-size: 14px;
    opacity: .85;
}

.header-text-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
    text-decoration: none;
    transform: translateY(-1px);
}

.header-text-link.is-active {
    border-color: rgba(187, 247, 208, .28);
    background: rgba(187, 247, 208, .16);
    color: #ffffff;
    font-weight: 700;
}

.header-logout-link {
    color: #fca5a5;
}
.header-logout-link:hover {
    background: rgba(239, 68, 68, .18);
    color: #fecaca;
}
@media (max-width: 991.98px) {
    .top-header__inner {
        min-height: 64px;
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 10px 14px;
    }

    .top-header__brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .brand-link {
        display: inline-flex;
        max-width: calc(100vw - 82px);
        gap: 9px;
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .brand-text--full {
        display: none;
    }

    .brand-text--compact {
        display: inline;
    }

    .brand-badge {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .top-header__toggle {
        display: inline-flex;
    }

    .top-header__right {
        display: none;
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        max-height: calc(100vh - 84px);
        padding: 10px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, .14);
        overflow-y: auto;
    }

    .top-header.is-open .top-header__right {
        display: flex;
    }

    .header-text-link,
    .user-greeting {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .header-text-link:hover,
    .header-text-link:focus-visible {
        background: rgba(255, 255, 255, .08);
        color: #fff;
        outline: none;
    }

    .user-greeting {
        color: #cfe8df;
        background: rgba(255, 255, 255, .05);
    }
}

/* ================= PAGE + FOOTER ================= */
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    flex: 0 0 auto;
}

.page-container-full {
    flex: 1 0 auto;
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.site-footer {
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid rgba(187, 247, 208, .16);
    background: linear-gradient(90deg, #0b2f2a 0%, #123f3b 52%, #134e4a 100%);
    color: #d9eee7;
    box-shadow: 0 -8px 24px rgba(11, 47, 42, .08);
}

.site-footer__inner {
    width: 100%;
    max-width: 1680px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto;
    padding: 18px 28px;
}

.site-footer__brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.site-footer__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(187, 247, 208, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #bbf7d0;
    font-size: 20px;
}

.site-footer__brand-copy {
    min-width: 0;
}

.site-footer__brand-copy strong,
.site-footer__brand-copy small {
    display: block;
}

.site-footer__brand-copy strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.site-footer__brand-copy small {
    margin-top: 2px;
    color: #a9c9bf;
    font-size: 12px;
}

.site-footer p {
    margin: 0;
    color: #c6ded6;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .site-footer__inner {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 18px 20px;
    }

    .site-footer p {
        white-space: normal;
    }
}
