/* =========================================================================
Admin Control Panel — Shell
   =========================================================================

Extracted from the Leptos `<style>` blocks that used to sit inside these
components. Those blocks only existed in the DOM while their component was
mounted, which made cross-panel styling depend on what happened to be on
screen, and made the same rule easy to declare twice with different values.

Sources:
     - apps/frontend-admin/src/ui/app/shell.rs
     - apps/frontend-admin/src/ui/app/login.rs
     - apps/frontend-admin/src/ui/app/access_denied.rs
   ========================================================================= */

/* ---- shell.rs ---- */
.admin-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary, 'Inter', system-ui, sans-serif);
}

.admin-header {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-accent);
}

.admin-title h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-logout-btn {
    background: none;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.admin-logout-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.admin-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-primary);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.15s;
    width: 100%;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: var(--widget-bg);
    color: var(--text-accent);
    border-left-color: var(--accent-color);
}

.admin-content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .admin-app {
        height: 100dvh;
    }

    .admin-header {
        padding: 0.5rem 0.75rem;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .admin-title {
        gap: 0.5rem;
        min-width: 0;
    }

    .admin-title h1 {
        font-size: 1rem;
        line-height: 1.15;
    }

    .admin-header-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-user-label {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.72rem;
    }

    .admin-logout-btn {
        padding: 0.25rem 0.55rem;
        font-size: 0.75rem;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-primary);
        scrollbar-width: none;
    }

    .admin-sidebar::-webkit-scrollbar {
        display: none;
    }

    .admin-nav-item {
        flex: 0 0 4.4rem;
        flex-direction: column;
        justify-content: center;
        gap: 0.15rem;
        padding: 0.45rem 0.25rem;
        border-left: 0;
        border-bottom: 3px solid transparent;
        font-size: 0.68rem;
    }

    .admin-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-color);
    }

    .admin-nav-item svg {
        width: 1rem;
        height: 1rem;
    }

    .admin-content-area {
        padding: 0.75rem;
    }
}
     

/* ---- login.rs ---- */
    .admin-login-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: var(--bg-primary);
        font-family: var(--font-primary, 'Inter', system-ui, sans-serif);
    }
    .admin-login-card {
        background: var(--bg-secondary);
        border: 1px solid var(--border-primary);
        border-radius: 12px;
        padding: 2.5rem;
        width: 100%;
        max-width: 420px;
        box-shadow: var(--popup-shadow);
    }
    .admin-login-header {
        text-align: center;
        margin-bottom: 2rem;
    }
    .admin-login-logo {
        height: 48px;
        width: auto;
        margin-bottom: 0.5rem;
    }
    .admin-login-subtitle {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }
    .admin-login-form {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }
    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }
    .form-group label {
        font-size: 0.85rem;
        color: var(--text-secondary);
        font-weight: 500;
    }
    .admin-login-error {
        background: var(--danger-bg-hover);
        color: var(--danger-color);
        border: 1px solid var(--danger-color);
        border-radius: 6px;
        padding: 0.65rem 0.9rem;
        font-size: 0.875rem;
    }
    .admin-login-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        margin-top: 0.5rem;
    }
    .admin-login-notice {
        color: var(--text-muted, #5a5a6e);
        font-size: 0.75rem;
        text-align: center;
        margin: 1.25rem 0 0;
    }


/* ---- access_denied.rs ---- */
    .admin-denied-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: var(--bg-primary);
        font-family: var(--font-primary, 'Inter', system-ui, sans-serif);
    }
    .admin-denied-card {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        color: var(--danger-color);
        max-width: 360px;
    }
    .admin-denied-card h1 { margin: 0; }
    .admin-denied-card p { color: var(--text-secondary); margin: 0; }


/* Sidebar separator between the primary panels and the system panels.
   Was `class="h-px bg-slate-800 my-2"` — three Tailwind utilities that the ACP
   has no build step to generate, so the divider never actually rendered. */
.admin-nav-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 0.5rem 0;
}
