@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --bg-body: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 280px;
    --radius: 16px;
    --glass-border: rgba(255, 255, 255, 0.4);
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-title: #818cf8;
    --main-bg-a: #e2e8f0;
    --main-bg-b: #f1f5f9;
}

/* --- RESET BÁSICO --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

body {
    background: radial-gradient(circle at top right, var(--main-bg-a), var(--main-bg-b));
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    transition: background 0.25s ease, color 0.25s ease;
}

body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
}

/* Malha neural base cobrindo a tela inteira */
body::before {
    inset: -18%;
    z-index: 0;
    background:
        radial-gradient(circle at 9% 14%, rgba(79, 70, 229, 0.2), transparent 23%),
        radial-gradient(circle at 87% 18%, rgba(14, 165, 233, 0.2), transparent 25%),
        radial-gradient(circle at 28% 78%, rgba(34, 197, 94, 0.16), transparent 24%),
        radial-gradient(circle at 74% 82%, rgba(99, 102, 241, 0.16), transparent 26%),
        repeating-linear-gradient(120deg,
            rgba(30, 64, 175, 0.11) 0 1px,
            transparent 1px 96px),
        repeating-linear-gradient(60deg,
            rgba(2, 132, 199, 0.1) 0 1px,
            transparent 1px 92px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    box-shadow:
        inset 0 0 220px rgba(255, 255, 255, 0.26),
        0 0 0 1px rgba(148, 163, 184, 0.08),
        0 0 120px rgba(30, 64, 175, 0.12);
    opacity: 0.62;
    animation: wmsNeuralDrift 38s linear infinite;
}

/* Nós e pulsos de conexão animados */
body::after {
    inset: -12%;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 22%, rgba(56, 189, 248, 0.5) 0 2px, transparent 3px),
        radial-gradient(circle at 22% 64%, rgba(14, 165, 233, 0.42) 0 2px, transparent 3px),
        radial-gradient(circle at 45% 35%, rgba(99, 102, 241, 0.44) 0 2px, transparent 3px),
        radial-gradient(circle at 62% 72%, rgba(16, 185, 129, 0.42) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 18%, rgba(59, 130, 246, 0.45) 0 2px, transparent 3px),
        radial-gradient(circle at 84% 56%, rgba(79, 70, 229, 0.44) 0 2px, transparent 3px),
        radial-gradient(circle at 38% 86%, rgba(6, 182, 212, 0.4) 0 2px, transparent 3px),
        radial-gradient(circle at 56% 52%, rgba(15, 23, 42, 0.08) 0 40%, transparent 68%),
        repeating-linear-gradient(140deg,
            rgba(59, 130, 246, 0.1) 0 1px,
            transparent 1px 132px),
        repeating-linear-gradient(40deg,
            rgba(14, 165, 233, 0.08) 0 1px,
            transparent 1px 140px);
    opacity: 0.5;
    filter: blur(0.12px);
    animation: wmsNeuralPulse 14s ease-in-out infinite alternate;
}

body > * {
    position: relative;
    z-index: 1;
}

@keyframes wmsNeuralDrift {
    from { transform: translate3d(-1.2%, -0.8%, 0) rotate(0deg) scale(1.02); }
    to { transform: translate3d(1.2%, 0.8%, 0) rotate(360deg) scale(1.05); }
}

@keyframes wmsNeuralPulse {
    from { opacity: 0.34; transform: scale(1); }
    to { opacity: 0.62; transform: scale(1.04); }
}

body.theme-dark {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --sidebar-bg: #020617;
    --sidebar-text: #cbd5e1;
    --sidebar-title: #a5b4fc;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --main-bg-a: #0f172a;
    --main-bg-b: #020617;
    --bg-card: rgba(15, 23, 42, 0.92);
}

/* --- SIDEBAR (MODO ADMINISTRADOR) --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    padding: 30px 15px;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header { padding: 0 18px; margin-bottom: 35px; }
.sidebar-header h3 { font-size: 1.5rem; font-weight: 800; color: var(--sidebar-title); }

.sidebar nav ul { list-style: none; }

.sidebar nav a {
    display: flex;
    align-items: center;
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 12px 18px;
    margin-bottom: 5px;
    border-radius: 12px;
    transition: 0.3s;
}

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

.sidebar li.active a {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 10px 15px -5px rgba(79, 70, 229, 0.4);
}

.menu-section-title {
    padding: 20px 18px 10px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 1px;
}

body.no-animations *,
body.no-animations *::before,
body.no-animations *::after {
    animation: none !important;
    transition: none !important;
}

body.ui-density-compact .main-content { padding: 28px; }
body.ui-density-compact .sidebar nav a { padding: 9px 14px; margin-bottom: 3px; }
body.ui-density-spacious .main-content { padding: 48px; }
body.ui-density-spacious .sidebar nav a { padding: 14px 20px; margin-bottom: 8px; }

/* --- CONTEÚDO PRINCIPAL --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    transition: all 0.3s ease;
    animation: pageReveal 0.42s ease;
}

@keyframes pageReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TOGGLE DE TEMA --- */
.theme-toggle-btn {
    margin-top: 0;
    width: auto;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.22s ease;
}

.theme-toggle-btn:hover {
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28);
    transform: translateY(-1px);
}

.theme-toggle-btn .theme-icon {
    transition: transform 0.35s ease;
}

.theme-toggle-btn.animating .theme-icon {
    transform: rotate(180deg) scale(1.1);
}

body.theme-dark .theme-toggle-btn {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(99, 102, 241, 0.5);
}

.sidebar-header .theme-toggle-btn .theme-label {
    display: none;
}

.theme-floating-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    z-index: 1200;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-floating-btn.animating i {
    transform: rotate(180deg) scale(1.08);
    transition: transform 0.35s ease;
}

.theme-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

.btn-voltar-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;
    padding: 12px 14px;
    border-radius: 11px;
    border: none;
    margin: 0;
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-voltar-home:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

#btn-voltar-home.mobile-back-btn {
    background: #1e293b;
}

#btn-voltar-home.mobile-home-btn span,
#btn-voltar-home.mobile-back-btn span {
    display: none;
}

.theme-floating-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.35);
}

/* --- CARDS DE DASHBOARD (ADMIN) --- */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-stat {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    position: relative;
    transition: 0.3s;
}

.card-stat:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.05); }
.card-stat .value { font-size: 1.8rem; font-weight: 800; display: block; margin: 8px 0; }
.card-stat h4 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }

/* --- TABELAS --- */
.table-container {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; font-size: 0.75rem; color: var(--text-muted); border-bottom: 2px solid #f1f5f9; text-transform: uppercase; }
td { padding: 15px; border-bottom: 1px solid #f1f5f9; font-size: 0.95rem; }

/* --- DARK MODE: TABELAS E FORMULÁRIOS --- */
body.theme-dark .table-container {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.theme-dark .table-container h1,
body.theme-dark .table-container h2,
body.theme-dark .table-container h3,
body.theme-dark .table-container h4,
body.theme-dark .table-container p,
body.theme-dark .table-container label,
body.theme-dark .table-container small,
body.theme-dark .table-container strong {
    color: inherit;
}

body.theme-dark th {
    color: #94a3b8;
    border-bottom-color: #334155;
}

body.theme-dark td {
    color: #e2e8f0;
    border-bottom-color: #1e293b;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #64748b;
}

/* --- MODO OPERADOR (FOCO TOTAL) --- */
/* Ativado quando o JS adiciona .worker-mode ao body */
body.worker-mode {
    background: #000 !important;
}

body.worker-mode .sidebar {
    display: none !important;
}

body.worker-mode .main-content {
    margin-left: 0 !important;
    padding: 20px !important;
    width: 100% !important;
}

body.worker-mode header h1 { color: white; text-align: center; }

/* --- BOTÕES GIGANTES DO OPERADOR --- */
.grid-operacao {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card-operacao {
    background: #111;
    border: 2px solid #222;
    padding: 60px 20px;
    border-radius: 24px;
    text-align: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card-operacao i { font-size: 4rem; }
.card-operacao span { font-size: 1.6rem; font-weight: 800; text-transform: uppercase; }

.card-operacao:hover {
    transform: translateY(-10px);
    background: #1a1a1a;
    border-color: var(--primary);
}

/* --- UTILITÁRIOS --- */
.hidden { display: none !important; }

.btn-primary,
.btn-secondary,
.btn-success {
    border: none;
    padding: 11px 18px;
    border-radius: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.22);
}

.btn-secondary {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #f8fafc;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #059669, var(--success));
    color: #fff;
    box-shadow: 0 10px 20px rgba(5, 150, 105, 0.22);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn-primary:active,
.btn-secondary:active,
.btn-success:active {
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-success:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* --- STATUS OFFLINE GLOBAL --- */
.offline-status-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 30px));
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(125deg, #7f1d1d, #991b1b);
    color: #fee2e2;
    border: 1px solid rgba(252, 165, 165, 0.35);
    box-shadow: 0 14px 30px rgba(69, 10, 10, 0.42);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.offline-status-banner i {
    font-size: 0.95rem;
    color: #fecaca;
}

.offline-status-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.offline-status-banner.is-hidden {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

/* --- LOGIN PROFISSIONAL: NEUMORPHISM + GLASSMORPHISM + AURORA UI --- */
.login-body {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Aurora UI Background: gradientes boreais multicoloridos */
    background:
        linear-gradient(135deg, #0f1729 0%, #1a0d3d 25%, #0d2e4d 50%, #1a2d3d 75%, #0f1729 100%),
        radial-gradient(circle at 15% 35%, rgba(34, 197, 94, 0.2), transparent 40%),
        radial-gradient(circle at 85% 65%, rgba(99, 102, 241, 0.25), transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.2), transparent 50%);
    background-attachment: fixed;
    animation: auroraShift 15s ease-in-out infinite;
}

@keyframes auroraShift {
    0%, 100% { background-color: #0f1729; }
    50% { background-color: #1a0d3d; }
}

.login-body::before,
.login-body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.login-body::before {
    width: 48vw;
    height: 48vw;
    min-width: 340px;
    min-height: 340px;
    top: -12%;
    right: -8%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 65%);
    filter: blur(2px);
    animation: auroraFloatTL 13s ease-in-out infinite, auroraGlow 4s ease-in-out infinite;
}

.login-body::after {
    width: 52vw;
    height: 52vw;
    min-width: 360px;
    min-height: 360px;
    left: -10%;
    bottom: -15%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), transparent 70%);
    filter: blur(2px);
    animation: auroraFloatBR 15s ease-in-out infinite, auroraGlow 5s ease-in-out infinite reverse;
}

@keyframes auroraFloatTL {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -22px, 0) scale(1.05); }
}

@keyframes auroraFloatBR {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-20px, 24px, 0) scale(1.06); }
}

@keyframes auroraGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

@keyframes loginFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes loginRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    border: none;
    box-shadow: 
        inset 0 0 60px rgba(255, 255, 255, 0.05),
        0 0 80px rgba(16, 185, 129, 0.15);
    background: 
        rgba(15, 23, 42, 0.45),
        rgba(26, 13, 61, 0.15);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-showcase {
    position: relative;
    padding: clamp(32px, 4vw, 62px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #e2e8f0;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.05)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(26, 13, 61, 0.5) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.login-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(transparent 10%, rgba(0, 0, 0, 0.9) 45%, transparent 92%);
    animation: gridPan 14s linear infinite;
    pointer-events: none;
}

.login-showcase-orb {
    position: absolute;
    right: 8%;
    top: 14%;
    width: clamp(120px, 15vw, 220px);
    aspect-ratio: 1;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: 
        radial-gradient(circle at 30% 30%, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.05)),
        radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.15), transparent);
    box-shadow:
        inset 0 0 30px rgba(34, 197, 94, 0.2),
        0 0 50px rgba(16, 185, 129, 0.3),
        0 0 100px rgba(168, 85, 247, 0.15);
    backdrop-filter: blur(12px);
    animation: orbPulse 4.2s ease-in-out infinite, auroraGlow 5s ease-in-out infinite;
    pointer-events: none;
}

.login-showcase-orb::before,
.login-showcase-orb::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 999px;
    border: 1px dashed rgba(125, 211, 252, 0.35);
    animation: orbSpin 14s linear infinite;
}

.login-showcase-orb::after {
    inset: -26px;
    border-style: solid;
    opacity: 0.52;
    animation-duration: 20s;
    animation-direction: reverse;
}

@keyframes gridPan {
    from { transform: translateY(0); }
    to { transform: translateY(44px); }
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes orbSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.42);
    color: #bae6fd;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 18px;
}

.login-showcase h1 {
    font-size: clamp(1.7rem, 2.5vw, 2.6rem);
    line-height: 1.1;
    margin-bottom: 14px;
}

.login-showcase p {
    color: #cbd5e1;
    max-width: 420px;
    font-size: 0.96rem;
}

.login-features {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.login-feature-item i {
    color: #67e8f9;
}

.login-panel {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08)),
        rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(28px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        -4px 0 15px rgba(0, 0, 0, 0.1);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0f172a;
    margin-bottom: 24px;
    animation: slideInDown 0.6s ease-out;
}

.login-brand i {
    font-size: 1.45rem;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #f8fafc;
    box-shadow: 
        0 8px 16px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.login-brand i::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-brand h2 {
    line-height: 1.1;
    font-size: 1.15rem;
}

.login-brand small {
    color: #64748b;
    font-size: 0.78rem;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-field {
    display: grid;
    gap: 6px;
}

.login-field label {
    color: #334155;
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.login-field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(10px);
    color: #0f172a;
    transition: 
        all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.05),
        inset -2px -2px 4px rgba(255, 255, 255, 0.1);
}

.login-field input::placeholder {
    color: rgba(15, 23, 42, 0.5);
}

.login-field input:focus {
    border-color: rgba(16, 185, 129, 0.6);
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.05),
        inset -2px -2px 4px rgba(255, 255, 255, 0.15),
        0 0 0 3px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.btn-login {
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    padding: 13px 14px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #f8fafc;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: 
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        filter 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(16, 185, 129, 0.2),
        0 8px 16px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    animation: shine 3s infinite;
}

.btn-login:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 8px 16px rgba(16, 185, 129, 0.35),
        0 12px 24px rgba(16, 185, 129, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    filter: brightness(1.08);
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 
        0 2px 4px rgba(16, 185, 129, 0.2),
        0 4px 8px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.btn-login:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.login-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.login-footnote {
    margin-top: 18px;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.75rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .offline-status-banner {
        top: auto;
        bottom: 16px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .login-card {
        grid-template-columns: 1fr;
        min-height: auto;
        height: auto;
    }

    .login-showcase {
        min-height: auto;
        padding: 24px 18px;
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 24px 18px;
        display: flex;
        justify-content: center;
    }

    .login-brand {
        margin-bottom: 20px;
    }

    .login-brand i {
        font-size: 1.2rem;
        width: 36px;
        height: 36px;
    }

    .login-brand h2 {
        font-size: 0.95rem;
    }

    .login-brand small {
        font-size: 0.7rem;
    }

    .login-feature-item {
        font-size: 0.8rem;
    }

    .login-form {
        gap: 12px;
    }

    .login-field input {
        padding: 11px 12px;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 12px 12px;
        font-size: 0.9rem;
    }

    .login-message {
        font-size: 0.85rem;
    }

    .login-footnote {
        font-size: 0.7rem;
        margin-top: 14px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 20px 16px;
    }

    .login-brand {
        margin-bottom: 18px;
    }

    .login-showcase-orb {
        display: none !important;
    }

    .login-field input {
        padding: 10px 11px;
        font-size: 0.88rem;
    }

    .btn-login {
        padding: 11px 11px;
        font-size: 0.85rem;
        margin-top: 4px;
    }

    .login-feature-item {
        font-size: 0.75rem;
        gap: 8px;
    }
}

body.theme-dark::before {
    opacity: 0.72;
    box-shadow:
        inset 0 0 280px rgba(2, 6, 23, 0.62),
        0 0 0 1px rgba(129, 140, 248, 0.12),
        0 0 180px rgba(14, 165, 233, 0.16);
}

body.theme-dark::after {
    opacity: 0.56;
    filter: blur(0.18px) saturate(1.15);
}

@media (max-width: 900px) {
    body::before {
        inset: -22%;
        opacity: 0.5;
        animation: none !important;
    }

    body::after {
        inset: -18%;
        opacity: 0.25;
        animation: none !important;
    }

    .login-body::before {
        animation: none !important;
    }

    .login-body::after {
        animation: none !important;
    }

    .login-showcase-orb {
        animation: none !important;
    }

    .login-showcase-orb::before,
    .login-showcase-orb::after {
        animation: none !important;
    }
}