/* ==============================================
   SIDEBAR & DASHBOARD LAYOUT
   ============================================== */

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    border: none;
    border-right: 1px solid var(--glass-border);
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(40px);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 24px 28px;
    margin-bottom: 8px;
}

.sidebar-header .branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    height: 32px;
    width: auto;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--gold), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.7;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(243, 194, 106, 0.1);
    color: var(--gold);
}

.nav-item.active i {
    opacity: 1;
}

.nav-item.add-btn {
    color: var(--gold);
    margin-top: 4px;
}

.nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0 16px 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--glass-border);
}

.lang-selector-minimal {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    outline: none;
}

/* Top Bar Styling */
.top-bar {
    height: var(--top-bar-height);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(20px);
    z-index: 900;
    border-bottom: 1px solid var(--glass-border);
}

.search-container {
    flex: 1;
    max-width: 800px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 0 20px;
    height: 44px;
    border-radius: 22px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(243, 194, 106, 0.1);
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    font-size: 0.95rem;
    outline: none;
}

.top-bar-actions {
    position: absolute;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-create-short {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-create-short:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-login-round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-login-round:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Category Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.filter-bar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.filter-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-chip.active {
    background: white;
    color: black;
    border-color: white;
}

.content-header {
    margin-bottom: 0;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.view-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.btn-icon-ref {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

/* Loading States */
.loader-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 0;
    gap: 20px;
    color: var(--text-muted);
}

.pulse-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Responsive Overrides within layout.css */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .app-stage {
        margin-left: var(--sidebar-collapsed-width);
    }

    .sidebar .brand-name,
    .sidebar .nav-item span,
    .sidebar .nav-section-title {
        display: none;
    }

    .sidebar .nav-item {
        justify-content: center;
        padding: 12px;
    }
}