/* ===================================================================
   Kept minimal on purpose (same policy as orderpulse-local): only a
   reset, :root custom properties (CSS isolation can't scope :root),
   and the static-SSR Login page's styles (no circuit yet, so
   Component.razor.css scoping doesn't apply there). Everything else
   lives in a Component.razor.css next to its component.
   =================================================================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Only AdminPageHeader uses this now — AdminLayout's sidebar header grew taller than this
       once it started stacking the Carl's Jr. + Order Pulse logos, so they're no longer meant
       to line up. Kept as a named value anyway since AdminPageHeader still wants a consistent
       minimum height regardless of the sidebar. */
    --admin-topbar-height: calc(38px + 2.2rem);
}

/* Login page — two-panel layout: form on a plain dark ground on the left, a solid near-black
   brand panel with the Order Pulse wordmark + a decorative pulse-line on the right. Collapses
   to just the form panel below 900px (this is an admin/kiosk-facing login, not a phone-first
   flow, so the breakpoint only needs to guard against not-completely-broken, not a real
   mobile-optimized layout). */
.login-page {
    display: flex;
    min-height: 100vh;
    background: #0b0b0f;
}

.login-panel {
    flex: 1 1 480px;
    max-width: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
    max-width: 360px;
}

.login-logo {
    height: 56px;
    align-self: center;
    margin-bottom: 0.75rem;
}

.login-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
}

.login-subtitle {
    margin: 0 0 0.5rem;
    color: #888888;
    font-size: 0.9rem;
    text-align: center;
}

.login-input {
    padding: 0.75rem 0.95rem;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    background: #131316;
    color: #ffffff;
    font-size: 0.95rem;
}

.login-input:focus {
    outline: none;
    border-color: #DA1A32;
}

.login-error {
    margin: 0;
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
}

.login-success {
    margin: 0;
    color: #4caf50;
    font-size: 0.85rem;
    text-align: center;
}

.login-button {
    margin-top: 0.4rem;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: #DA1A32;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.login-button:hover {
    background: #b8152a;
}

.login-link {
    margin-top: -0.3rem;
    color: #888888;
    font-size: 0.82rem;
    text-align: center;
    text-decoration: none;
}

.login-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
    background: #0e0f11;
    border-left: 1px solid #1c1c1c;
}

.login-brand-logo {
    height: 72px;
}

.login-brand-tagline {
    margin: 0;
    color: #888888;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.login-brand-pulse {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4rem;
    width: 100%;
    height: 90px;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .login-brand-panel {
        display: none;
    }

    .login-panel {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* "Powered by Argos" credit — shared shape between the login page (inline, below the button)
   and AdminLayout's sidebar footer (see its own .razor.css for sizing overrides).
   argos-logo-white.png is pre-processed (recolored to white, background made transparent) so
   it can sit directly on the dark theme with no extra backing. Deliberately watermark-styled
   (large, low opacity) rather than a crisp small badge — the manufacturer should register at a
   glance without competing with the store's own branding. */
.poweredby {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #aaaaaa;
    font-size: 1rem;
    opacity: 0.55;
    margin-top: 1.5rem;
}

.poweredby-logo {
    height: 44px;
    display: block;
}

/* Shared by Stores.razor and Users.razor — same reasoning as .permission-section-title below:
   two sibling pages, no parent/child relationship, so it can't live in either one's own
   Page.razor.css. */
.admin-search-field {
    max-width: 300px;
}

/* Shared dialog header (icon badge + title + subtitle) — used by every MudDialog's TitleContent
   across Stores/Users dialogs. Global because MudDialogProvider renders TitleContent into a
   root-level portal outside any one dialog's own component tree, same reasoning as .mud-dialog
   itself below. */
.dialog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dialog-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(218, 26, 50, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dialog-header-icon .mud-icon-root {
    color: #DA1A32;
    font-size: 1.6rem;
}

.dialog-header-subtitle {
    display: block;
    color: #999999;
    margin-top: 0.15rem;
}

.dialog-header-divider {
    border-color: #DA1A32 !important;
    opacity: 0.6;
    margin-top: 1rem;
}

/* Section header (small icon + title + description) inside a dialog's own body — e.g.
   "Módulos"/"Sucursales" in the user permission dialogs, "Credenciales" groupings, etc. */
.dialog-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.dialog-section-header .mud-icon-root {
    color: #DA1A32;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.dialog-section-title {
    font-weight: 600;
    color: #ffffff;
}

.dialog-section-hint {
    display: block;
    color: #999999;
}

/* Callout box for a supplementary note inside a dialog (e.g. "the time zone will be used to
   normalize order/report times" under Stores' Zona horaria field). */
.dialog-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 206, 52, 0.1);
    border: 1px solid rgba(255, 206, 52, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.dialog-callout .mud-icon-root {
    color: #FFCE34;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.dialog-callout-text {
    color: #cccccc;
    font-size: 0.85rem;
}

/* Shared by AddAdminUserDialog and EditAdminUserPermissionsDialog — two sibling dialogs, no
   parent/child relationship, so this can't live in either one's own Component.razor.css. */
.permission-section-title {
    text-align: center;
    font-weight: 600;
}

.permission-section-hint {
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.85em;
}

/* Shared by ModuleAssignmentPicker/StoreAssignmentPicker's MudDropZones — global because it's
   applied via Class="..." on a MudBlazor child component from two unrelated sibling components.
   flex-basis: 0 (not "auto") is what makes both zones split the row equally regardless of how
   much content is inside — with only flex-grow, an empty zone's initial size is based on its own
   (near-zero) content, so it stays visibly narrower than a zone full of item cards. */
.drop-zone-fixed {
    flex: 1 1 0;
    min-width: 0;
    min-height: 220px;
}

/* Global, on purpose: MudDialogProvider renders every dialog's paper into a root portal outside
   any of our own components' render trees, so there's no component to scope this to (::deep
   can't reach it either — it needs a scoped ancestor, and there isn't one). Applies to every
   dialog in the app, not just the permission ones — without it, dialogs blend into the page
   behind them, especially in dark mode where the dialog surface and the backdrop are both dark. */
.mud-dialog {
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 6px 18px rgba(0, 0, 0, 0.6) !important;
}
