/* ============================================================
   components.css — Reusable UI Component Styles
   logsearch.xyz
   ============================================================ */

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn--primary {
    background: var(--color-accent);
    color: #0f1117;
    border-color: var(--color-accent);
    font-weight: var(--fw-bold);
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #0f1117;
}

.btn--secondary {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border-light);
}

.btn--secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-text-muted);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: transparent;
}

.btn--ghost:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.btn--danger {
    background: transparent;
    color: var(--color-error);
    border-color: var(--color-error);
}

.btn--danger:hover {
    background: var(--color-error-muted);
}

.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--fs-md);
}

.btn--full {
    width: 100%;
}

.btn--icon {
    padding: var(--space-2);
    border-radius: var(--radius-sm);
}

/* ----- Inputs ----- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-base);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-muted);
}

.form-input--error {
    border-color: var(--color-error);
}

.form-hint {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.form-error {
    font-size: var(--fs-xs);
    color: var(--color-error);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-relaxed);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.form-checkbox a {
    color: var(--color-accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ----- Cards ----- */
.card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all 0.4s var(--ease-smooth);
}

.card:hover {
    border-color: rgba(34, 211, 238, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card--accent {
    border-color: var(--color-accent);
}

.card--accent:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
}

.card__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-muted);
    color: var(--color-accent-text);
    border-radius: var(--radius-lg);
    font-size: var(--fs-xl);
    margin-bottom: var(--space-5);
    transition: all 0.4s var(--ease-smooth);
}

.card:hover .card__icon {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
}

.card__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-2);
}

.card__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-relaxed);
}

/* ----- Badge ----- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge--success {
    background: var(--color-success-muted);
    color: var(--color-success);
}

.badge--error {
    background: var(--color-error-muted);
    color: var(--color-error);
}

.badge--warning {
    background: var(--color-warning-muted);
    color: var(--color-warning);
}

.badge--info {
    background: var(--color-info-muted);
    color: var(--color-info);
}

.badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ----- Table ----- */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

.table th {
    text-align: left;
    padding: var(--space-4) var(--space-5);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--color-bg-hover);
}

/* ----- Toast ----- */
#toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + var(--space-4));
    right: var(--space-4);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: rgba(35, 39, 56, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(42, 46, 66, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm);
    pointer-events: auto;
    animation: toast-in 0.4s var(--ease-smooth) forwards;
    max-width: 380px;
}

.toast--success {
    border-left: 3px solid var(--color-success);
}

.toast--error {
    border-left: 3px solid var(--color-error);
}

.toast--info {
    border-left: 3px solid var(--color-info);
}

.toast--warning {
    border-left: 3px solid var(--color-warning);
}

.toast__icon {
    flex-shrink: 0;
    font-size: var(--fs-md);
}

.toast--success .toast__icon {
    color: var(--color-success);
}

.toast--error .toast__icon {
    color: var(--color-error);
}

.toast--info .toast__icon {
    color: var(--color-info);
}

.toast--warning .toast__icon {
    color: var(--color-warning);
}

.toast__msg {
    flex: 1;
    color: var(--color-text-primary);
}

.toast__close {
    flex-shrink: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

.toast__close:hover {
    color: var(--color-text-primary);
}

.toast.toast--out {
    animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ----- Modal / Overlay ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    animation: fade-in 0.2s ease;
}

.modal {
    width: 100%;
    max-width: 680px;
    max-height: 80vh;
    background: rgba(22, 24, 34, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 46, 66, 0.5);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), 0 0 1px rgba(34, 211, 238, 0.08);
    display: flex;
    flex-direction: column;
    animation: modal-in 0.35s var(--ease-smooth);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.modal__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
}

.modal__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    font-size: var(--fs-lg);
}

.modal__close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.modal__body {
    padding: var(--space-6);
    overflow-y: auto;
    flex: 1;
    font-size: var(--fs-sm);
    line-height: var(--lh-relaxed);
    color: var(--color-text-secondary);
}

.modal__body h1,
.modal__body h2,
.modal__body h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
    font-size: var(--fs-lg);
}

.modal__body h1:first-child,
.modal__body h2:first-child,
.modal__body h3:first-child {
    margin-top: 0;
}

.modal__body p {
    margin-bottom: var(--space-4);
}

.modal__body ul,
.modal__body ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.modal__body ul {
    list-style: disc;
}

.modal__body ol {
    list-style: decimal;
}

.modal__body li {
    margin-bottom: var(--space-2);
}

.modal__body strong {
    color: var(--color-text-primary);
    font-weight: var(--fw-semibold);
}

/* Modal loading state */
.modal__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    gap: var(--space-4);
    color: var(--color-text-muted);
}

.modal__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.modal__error {
    text-align: center;
    padding: var(--space-8);
    color: var(--color-error);
    font-size: var(--fs-sm);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ----- Skeleton Loader ----- */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-tertiary) 25%,
            var(--color-bg-hover) 50%,
            var(--color-bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton--text {
    height: 14px;
    margin-bottom: var(--space-2);
}

.skeleton--title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-4);
}

.skeleton--block {
    height: 120px;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ----- Navbar — Modern Floating Glassmorphism ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    height: var(--navbar-height);
    background: rgba(15, 17, 23, 0.7);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(42, 46, 66, 0.5);
    transition: all 0.5s var(--ease-smooth);
}

/* Scroll-triggered compact state */
.navbar.is-scrolled {
    height: 56px;
    background: rgba(15, 17, 23, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), var(--shadow-glow);
    border-bottom-color: rgba(34, 211, 238, 0.08);
}

/* Spacer to prevent content from hiding behind fixed navbar */
.navbar-spacer {
    height: var(--navbar-height);
    transition: height 0.5s var(--ease-smooth);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Brand — futuristic font */
.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0;
    font-family: 'Lemon', cursive;
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--color-accent-text);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
}

.navbar__brand:hover {
    color: var(--color-accent);
    transform: translateY(-1px);
}

.navbar__brand-xyz {
    color: #ffffff;
}

.navbar__brand:hover .navbar__brand-xyz {
    color: #ffffff;
}

/* Links container — pill background */
.navbar__links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: rgba(22, 24, 34, 0.6);
    border: 1px solid rgba(42, 46, 66, 0.4);
    border-radius: var(--radius-full);
    padding: 4px;
}

/* Individual nav link — smoothly animated */
.navbar__link {
    position: relative;
    padding: var(--space-2) var(--space-5);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    transition: all 0.35s var(--ease-smooth);
    text-decoration: none;
    overflow: hidden;
}

.navbar__link:hover {
    color: var(--color-text-primary);
    background: rgba(42, 46, 66, 0.4);
}

.navbar__link--active {
    color: var(--color-accent-text);
    background: var(--color-accent-muted);
}

/* Actions */
.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.navbar__actions .btn {
    border-radius: var(--radius-full);
    transition: all 0.35s var(--ease-smooth);
}

.navbar__actions .btn--primary:hover {
    transform: translateY(-1px);
}

.navbar__actions .btn--ghost:hover {
    background: rgba(42, 46, 66, 0.5);
    transform: translateY(-1px);
}

/* Hamburger — morphing X animation */
.navbar__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: var(--space-2);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.3s var(--ease-smooth);
}

.navbar__hamburger:hover {
    background: rgba(42, 46, 66, 0.5);
}

.navbar__hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text-secondary);
    border-radius: var(--radius-full);
    transition: all 0.4s var(--ease-smooth);
    transform-origin: center;
}

/* Hamburger → X morph */
.navbar__hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--color-accent);
}

.navbar__hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar__hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--color-accent);
}

/* Mobile nav — smooth slide */
.navbar__mobile {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(22, 24, 34, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 46, 66, 0.5);
    padding: var(--space-6) var(--space-4);
    z-index: var(--z-sticky);
    transform: translateY(-110%);
    opacity: 0;
    transition: all 0.45s var(--ease-smooth);
    pointer-events: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.navbar__mobile.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.navbar__mobile .navbar__link {
    display: block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--fs-base);
    margin-bottom: var(--space-1);
    transition: all 0.3s var(--ease-smooth);
}

.navbar__mobile .navbar__link::after {
    display: none;
}

.navbar__mobile .navbar__link:hover {
    background: rgba(42, 46, 66, 0.5);
    transform: translateX(4px);
}

.navbar__mobile .navbar__actions {
    padding-top: var(--space-5);
    border-top: 1px solid rgba(42, 46, 66, 0.5);
    margin-top: var(--space-4);
    gap: var(--space-3);
}

/* Staggered mobile link animation */
.navbar__mobile.is-open .navbar__link:nth-child(1) {
    animation: navSlideIn 0.4s 0.05s var(--ease-smooth) both;
}

.navbar__mobile.is-open .navbar__link:nth-child(2) {
    animation: navSlideIn 0.4s 0.1s var(--ease-smooth) both;
}

.navbar__mobile.is-open .navbar__link:nth-child(3) {
    animation: navSlideIn 0.4s 0.15s var(--ease-smooth) both;
}

.navbar__mobile.is-open .navbar__link:nth-child(4) {
    animation: navSlideIn 0.4s 0.2s var(--ease-smooth) both;
}

.navbar__mobile.is-open .navbar__link:nth-child(5) {
    animation: navSlideIn 0.4s 0.25s var(--ease-smooth) both;
}

.navbar__mobile.is-open .navbar__actions {
    animation: navSlideIn 0.4s 0.3s var(--ease-smooth) both;
}

@keyframes navSlideIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Profile Dropdown — glassmorphism */
.navbar__profile {
    position: relative;
}

.navbar__profile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
    transition: all 0.35s var(--ease-smooth);
}

.navbar__profile-btn:hover {
    background: rgba(42, 46, 66, 0.5);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.navbar__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-accent-muted);
    color: var(--color-accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    border: 2px solid rgba(34, 211, 238, 0.2);
    transition: all 0.35s var(--ease-smooth);
}

.navbar__profile-btn:hover .navbar__avatar {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.navbar__dropdown {
    position: absolute;
    top: calc(100% + var(--space-3));
    right: 0;
    min-width: 200px;
    background: rgba(35, 39, 56, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 46, 66, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 1px rgba(34, 211, 238, 0.1);
    padding: var(--space-2);
    z-index: var(--z-dropdown);
    transform: translateY(-8px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-smooth);
}

.navbar__dropdown.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.navbar__dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease-smooth);
    text-decoration: none;
}

.navbar__dropdown-item:hover {
    background: rgba(42, 46, 66, 0.5);
    color: var(--color-text-primary);
    transform: translateX(2px);
}

.navbar__dropdown-divider {
    height: 1px;
    background: rgba(42, 46, 66, 0.5);
    margin: var(--space-2) var(--space-2);
}

@media (max-width: 768px) {

    .navbar__links,
    .navbar__actions:not(.navbar__mobile .navbar__actions) {
        display: none;
    }

    .navbar__hamburger {
        display: flex;
    }
}

/* ----- Footer — Modern Smooth ----- */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(34, 211, 238, 0.08);
    padding: var(--space-16) 0 var(--space-8);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: var(--color-accent);
    opacity: 0.3;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
}

.footer__brand {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.footer__brand span {
    color: var(--color-accent-text);
}

.footer__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    max-width: 300px;
}

.footer__heading {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-5);
    position: relative;
    padding-bottom: var(--space-2);
}

.footer__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    opacity: 0.5;
}

.footer__link {
    display: block;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    padding: var(--space-2) 0;
    transition: all 0.3s var(--ease-smooth);
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.footer__link:hover {
    color: var(--color-accent-text);
    transform: translateX(4px);
}

.footer__bottom {
    margin-top: var(--space-12);
    padding: var(--space-5) var(--space-6);
    background: rgba(15, 17, 23, 0.4);
    border: 1px solid rgba(42, 46, 66, 0.3);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
}

@media (max-width: 480px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Sidebar (Dashboard) ----- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-bg-secondary);
    border-right: 1px solid rgba(42, 46, 66, 0.4);
    padding: var(--space-6) var(--space-4);
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: calc(var(--z-sticky) - 1);
}

.sidebar__section {
    margin-bottom: var(--space-6);
}

.sidebar__heading {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 var(--space-3);
    margin-bottom: var(--space-2);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease-smooth);
    text-decoration: none;
    cursor: pointer;
}

.sidebar__link:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    transform: translateX(2px);
}

.sidebar__link--active {
    background: var(--color-accent-muted);
    color: var(--color-accent-text);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.08);
}

.sidebar__icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}

/* ----- Code Block ----- */
.code-block {
    position: relative;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.code-block__copy {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.code-block__copy:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.code-block pre {
    padding: var(--space-4);
    overflow-x: auto;
    font-size: var(--fs-sm);
    line-height: var(--lh-relaxed);
    color: var(--color-text-secondary);
}

.code-block code {
    color: inherit;
}

/* Syntax highlights */
.code-block .kw {
    color: var(--color-accent-text);
}

.code-block .str {
    color: var(--color-success);
}

.code-block .num {
    color: var(--color-warning);
}

.code-block .cmt {
    color: var(--color-text-muted);
}

/* ----- Tabs ----- */
.tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

.tabs__tab {
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tabs__tab:hover {
    color: var(--color-text-secondary);
}

.tabs__tab--active {
    color: var(--color-accent-text);
    border-bottom-color: var(--color-accent);
}

.tabs__panel {
    display: none;
}

.tabs__panel--active {
    display: block;
}

/* ----- Empty State ----- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.4;
}

.empty-state__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-2);
}

.empty-state__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    max-width: 320px;
}

/* ────────────────────────────────────────────────
   ADMIN PANEL
   ──────────────────────────────────────────────── */

/* Admin sidebar accent */
.sidebar--admin {
    border-right-color: rgba(251, 191, 36, 0.15);
}

.sidebar--admin .sidebar__heading {
    color: #fbbf24;
    letter-spacing: 0.12em;
}

.sidebar--admin .sidebar__link--active {
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    border-left: 3px solid #fbbf24;
}

.sidebar--admin .sidebar__link:hover {
    background: rgba(251, 191, 36, 0.06);
    color: #fde68a;
}

/* Admin filters bar */
.admin-filters {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

/* Admin pagination */
.admin-pagination {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

/* Danger-highlighted rows */
.admin-row--danger {
    background: rgba(239, 68, 68, 0.05) !important;
}

.admin-row--danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Admin settings form */
.admin-settings-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.admin-setting-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: start;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.admin-setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Toggle switch */
.admin-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--color-bg-tertiary);
    border-radius: 26px;
    transition: background var(--transition-normal);
}

.admin-toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.admin-toggle input:checked+.admin-toggle__slider {
    background: #22c55e;
}

.admin-toggle input:checked+.admin-toggle__slider::before {
    transform: translateX(22px);
}

/* Small danger button */
.btn--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Badge variants */
.badge--info {
    background: rgba(59, 130, 246, 0.1);
    color: #93bbfd;
}

@media (max-width: 768px) {
    .admin-setting-row {
        grid-template-columns: 1fr;
    }

    .admin-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filters .form-input {
        max-width: none !important;
    }
}