/* ============================================
   FRONTEND HEADER — Vanilla CSS (No Tailwind)
   Variabel warna dikontrol oleh sistem tema
   di resources/css/app.css (class .theme-*)
   ============================================ */

/* ── Header Shell ── */
.hdr {
    background: linear-gradient(135deg, var(--header-from) 0%, var(--header-to) 100%);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.hdr-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Brand / Logo ── */
.hdr-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    padding-right: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
}

.hdr-brand:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hdr-logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background: #fff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0.25rem;
}

.hdr-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hdr-logo-fallback {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.25rem;
}

.hdr-title {
    font-weight: 800;
    line-height: 1;
    font-size: 1.125rem;
}

.hdr-subtitle {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Navigation (Desktop) ── */
.hdr-nav {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .hdr-nav { display: flex; }
}

.nav-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ── User Actions ── */
.hdr-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown {
    position: relative;
}

.hdr-user-btn {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    font-weight: 700;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.hdr-user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hdr-user-avatar {
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.hdr-user-name {
    display: none;
}

@media (min-width: 640px) {
    .hdr-user-name { display: inline; }
}

/* ── Dropdown Menu ── */
.hdr-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 14rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    z-index: 1001;
    color: #1e293b;
}

.hdr-dropdown-info {
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.hdr-dropdown-info-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hdr-dropdown-info-email {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdr-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.hdr-dropdown-item:hover {
    background: #f1f5f9;
}

.hdr-dropdown-item-blue {
    color: #2563eb;
}

.hdr-dropdown-item-blue:hover {
    background: #eff6ff;
}

.hdr-dropdown-logout {
    color: #dc2626;
}

.hdr-dropdown-logout:hover {
    background: #fef2f2;
}

.hdr-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.25rem 0;
}

/* ── Login Button ── */
.hdr-login-btn {
    background: #facc15;
    color: #0f172a;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(250, 204, 21, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.hdr-login-btn:hover {
    background: #eab308;
    transform: scale(1.05);
}

.hdr-login-btn:active {
    transform: scale(0.95);
}

/* ── Mobile Menu Toggle ── */
.hdr-mobile-toggle {
    display: none;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
}

@media (max-width: 1023px) {
    .hdr-mobile-toggle { display: block; }
}

/* ── Mobile Drawer ── */
.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.mobile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.mobile-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 18rem;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.mobile-drawer-title {
    font-weight: 800;
    color: #1e293b;
}

.mobile-drawer-close {
    padding: 0.5rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-drawer-close:hover {
    color: #475569;
}

.mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-item {
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #475569;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.mobile-nav-item.active {
    background: #eff6ff;
    color: #2563eb;
}

/* ── Mobile Drawer Footer ── */
.mobile-drawer-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.mobile-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: #2563eb;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.mobile-user-meta {
    overflow: hidden;
}

.mobile-user-name {
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user-email {
    font-size: 10px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #2563eb;
    color: #fff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

[x-cloak] { display: none !important; }
