/* dashboard.css — Cursor-style: top bar + static left nav + content */

/* ─── View Sections ──────────────────────────────────────────────────────── */

.view-section {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    min-height: 100vh;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-section.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    transform: translateY(0);
}

.view-section.hidden {
    display: none;
}

/* ─── Login View ─────────────────────────────────────────────────────────── */

.login-card {
    max-width: 420px;
    margin: 80px auto 0;
    padding: 2.5rem 2rem;
    text-align: center;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    animation: cardReveal 0.5s cubic-bezier(0.2, 0, 0, 1) 0.1s both;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.login-card:hover::before {
    opacity: 0.35;
}

.login-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-logo {
    display: inline-flex;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
    transition: color 0.3s ease;
}

.login-logo:hover {
    color: var(--text-high);
}

.login-header h1 {
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0 0 0.4rem;
    color: var(--text-high);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* ─── Inputs ─────────────────────────────────────────────────────────────── */

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    color: var(--text-high);
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    padding-top: 1.3rem;
    padding-bottom: 0.5rem;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.6rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.input-glow {
    display: none;
}

/* ─── Login Buttons ──────────────────────────────────────────────────────── */

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-high);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-shimmer {
    display: none;
}

.btn-login-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-login-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn-login-secondary+.btn-login-secondary {
    margin-top: 0.5rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.75rem;
}

.login-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.login-divider-text {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    font-family: var(--font-mono);
}

.login-error {
    text-align: center;
    margin-top: 0.75rem;
    color: #ff6666;
    font-size: 0.7rem;
    display: none;
    font-family: var(--font-mono);
}

.login-hint {
    text-align: center;
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.7rem;
}

.glass-panel {
    border-radius: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  DASHBOARD VIEW                                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Top Bar ────────────────────────────────────────────────────────────── */

.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 50;
}

.dash-brand {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.25s ease;
}

.dash-brand:hover {
    color: var(--text-high);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.12));
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-topbar-user {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: var(--font-sans);
}

.dash-topbar-link {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

.dash-topbar-link:hover {
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.04);
}

/* ─── Topbar Avatar Dropdown ─────────────────────────────────────────────── */

.topbar-avatar-wrap {
    position: relative;
}

button.topbar-avatar {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

button.topbar-avatar:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.topbar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: rgba(26, 26, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    z-index: 200;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: topbarDDIn 0.15s cubic-bezier(0.2, 0, 0, 1);
}

.topbar-dropdown.open {
    display: block;
}

@keyframes topbarDDIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.topbar-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.topbar-dd-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.topbar-dd-item svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.topbar-dd-item:hover svg {
    opacity: 0.8;
}

.topbar-dd-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 8px;
}

.topbar-dd-danger {
    color: rgba(255, 100, 100, 0.7);
}

.topbar-dd-danger:hover {
    background: rgba(255, 100, 100, 0.08);
    color: rgba(255, 100, 100, 1);
}

.topbar-dd-danger svg {
    stroke: currentColor;
}

/* ─── Body: Nav + Content ────────────────────────────────────────────────── */

.dash-body {
    display: flex;
    min-height: calc(100vh - 50px);
}

/* ─── Left Nav ───────────────────────────────────────────────────────────── */

.dash-nav {
    width: 200px;
    flex-shrink: 0;
    padding: 24px 12px;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-nav .dash-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 8px;
    text-align: left;
    width: 100%;
    white-space: nowrap;
}

.dash-nav .dash-tab svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.dash-nav .dash-tab:hover {
    color: var(--text-med);
    background: rgba(255, 255, 255, 0.03);
}

.dash-nav .dash-tab:hover svg {
    opacity: 0.7;
}

.dash-nav .dash-tab.active {
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.05);
}

.dash-nav .dash-tab.active svg {
    opacity: 1;
}

/* ─── Content Area ───────────────────────────────────────────────────────── */

.dash-content {
    flex: 1;
    max-width: 760px;
    padding: 28px 36px 80px;
    animation: contentFadeIn 0.4s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Dashboard Header ──────────────────────────────────────────────────── */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.avatar-circle.topbar-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
}

.welcome-text {
    display: flex;
    flex-direction: column;
}

.welcome-text .label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.welcome-text h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-high);
    letter-spacing: -0.01em;
}

/* ─── Three-Dots Menu (mobile/fallback) ──────────────────────────────────── */

#btn-menu-toggle {
    width: 32px;
    height: 32px;
    display: none;
    /* hidden on desktop, shown on mobile */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

#btn-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-high);
}

.header-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 150px;
    background: rgba(26, 26, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    z-index: 100;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: dropdownFadeIn 0.18s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#btn-logout-dropdown {
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.8);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    border-radius: 6px;
}

#btn-logout-dropdown:hover {
    background: rgba(255, 100, 100, 0.08);
    color: rgba(255, 100, 100, 1);
}

/* ─── Tab Panels ─────────────────────────────────────────────────────────── */

.tab-panel {
    display: none;
    animation: panelFadeIn 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.tab-panel.active {
    display: block;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Section Cards ──────────────────────────────────────────────────────── */

.section-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.section-card:hover::before {
    opacity: 0.25;
}

.section-card:last-child {
    margin-bottom: 0;
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.section-card-header .sc-icon {
    font-size: 1rem;
    width: 1.6rem;
    text-align: center;
    color: var(--text-dim);
    transition: color 0.2s;
}

.section-card:hover .sc-icon {
    color: var(--text-med);
}

.section-card-header .sc-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-med);
    text-transform: uppercase;
}

.section-card-header .sc-subtitle {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

.section-card-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
}

.section-card-row+.section-card-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-card-row .row-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    min-width: 60px;
    text-transform: uppercase;
}

.section-card-row .row-value {
    font-size: 0.75rem;
    color: var(--text-med);
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    word-break: break-all;
    color: var(--text-dim);
}

/* ─── Companion Buttons ──────────────────────────────────────────────────── */

.btn-companion {
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-companion:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-strong);
    color: var(--text-high);
    transform: translateY(-1px);
}

/* ─── Alias Form ─────────────────────────────────────────────────────────── */

.alias-form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ─── Quick Links ────────────────────────────────────────────────────────── */

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dim);
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.quick-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-high);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.quick-link:hover::before {
    opacity: 0.35;
}

.quick-link .ql-icon {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.quick-link:hover .ql-icon {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.quick-link .ql-info {
    display: flex;
    flex-direction: column;
}

.quick-link .ql-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-med);
    transition: color 0.2s;
}

.quick-link .ql-desc {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

.quick-link:hover .ql-title {
    color: var(--text-high);
}

/* Staggered entrance */
.quick-link:nth-child(1) {
    animation: cardReveal 0.35s cubic-bezier(0.2, 0, 0, 1) 0.08s both;
}

.quick-link:nth-child(2) {
    animation: cardReveal 0.35s cubic-bezier(0.2, 0, 0, 1) 0.13s both;
}

.quick-link:nth-child(3) {
    animation: cardReveal 0.35s cubic-bezier(0.2, 0, 0, 1) 0.18s both;
}

.quick-link:nth-child(4) {
    animation: cardReveal 0.35s cubic-bezier(0.2, 0, 0, 1) 0.23s both;
}

/* ─── Icon SVGs ──────────────────────────────────────────────────────────── */

.icon-svg svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.sc-icon.icon-svg svg {
    width: 18px;
    height: 18px;
}

.ql-icon.icon-svg svg {
    width: 18px;
    height: 18px;
}

/* ─── Misc ───────────────────────────────────────────────────────────────── */

.dashboard-bg {
    display: none;
}

.glow-effect {
    pointer-events: none;
}

.account-error {
    color: #ff6666;
    font-size: 0.7rem;
    display: none;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

.account-status-msg {
    font-size: 0.7rem;
    display: none;
    font-family: var(--font-mono);
}

/* ─── Store ──────────────────────────────────────────────────────────────── */

.store-label {
    margin-bottom: 0.5rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-mono);
}

.store-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.store-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    background: rgba(12, 14, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
    font-family: var(--font-sans);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.equip-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .dash-topbar {
        padding: 10px 16px;
    }

    .dash-body {
        flex-direction: column;
    }

    .dash-nav {
        width: 100%;
        flex-direction: row;
        gap: 4px;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        overflow-x: auto;
    }

    .dash-nav .dash-tab {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .dash-nav .dash-tab svg {
        display: none;
    }

    .dash-content {
        padding: 20px 16px 60px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .user-welcome {
        flex-direction: column;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    #btn-menu-toggle {
        display: flex;
    }

    .login-card {
        margin-top: 40px;
        padding: 2rem 1.5rem;
    }
}