/**
 * CamadaBase 2.0 - Design Tokens & Base Styles
 */

/* ===== CSS Variables (Design Tokens) ===== */
/* ===== CSS Variables (Design Tokens) ===== */
:root {
    /* Colors - Primary - Neon/Glow */
    --primary-50: #1e1b4b;
    --primary-100: #312e81;
    --primary-200: #3730a3;
    --primary-300: #4338ca;
    --primary-400: #4f46e5;
    --primary-500: #6366f1;
    --primary-600: #818cf8;
    /* Lighter for dark mode contrast */
    --primary-700: #a5b4fc;
    --primary-800: #c7d2fe;
    --primary-900: #e0e7ff;

    /* Colors - Accent */
    --accent-cyan: #22d3ee;
    --accent-pink: #f472b6;
    --accent-emerald: #34d399;

    /* Colors - Neutral (Dark Mode Inverted) */
    --gray-50: #0f172a;
    /* Darkest background */
    --gray-100: #1e293b;
    /* Card background */
    --gray-200: #334155;
    /* Borders */
    --gray-300: #475569;
    --gray-400: #94a3b8;
    /* Muted text */
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
    /* Primary text */

    /* Colors - Semantic */
    --success-500: #22c55e;
    --success-600: #4ade80;
    /* Brighter for dark mode */
    --warning-500: #eab308;
    --warning-600: #facc15;
    --error-500: #ef4444;
    --error-600: #f87171;
    --info-500: #3b82f6;
    --info-600: #60a5fa;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Border Radius - MAIS ARREDONDADOS */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;

    /* Shadows - Mais suaves e modernas */
    --shadow-sm: 0 2px 8px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 8px 20px -4px rgb(0 0 0 / 0.1), 0 4px 8px -4px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 0.15), 0 8px 16px -8px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 24px 50px -12px rgb(0 0 0 / 0.2);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-100);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow);
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-size: 4rem;
    animation: float 2s ease-in-out infinite;
}

.loading-text {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-top: var(--space-4);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: var(--space-6) auto 0;
    animation: spin 1s linear infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== App Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    transition: width var(--transition-normal);
}

.sidebar-header {
    padding: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border-bottom: 1px solid var(--gray-700);
}

.brand-logo {
    font-size: 2rem;
}

.brand-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--gray-300);
    transition: all var(--transition-fast);
    margin-bottom: var(--space-1);
}

.nav-item:hover {
    background: var(--gray-800);
    color: white;
}

.nav-item.active {
    background: var(--primary-600);
    color: white;
}

.nav-item-icon {
    font-size: 1.25rem;
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gray-700);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 500;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.days-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.days-badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.days-badge.ok {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* ===== Plan Badge ===== */
.plan-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Starter - Cinza */
.plan-badge.starter {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* Basic - Azul */
.plan-badge.basic {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Pro - Roxo com brilho */
.plan-badge.pro {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
    color: #a78bfa;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
    animation: glow-pro 2s ease-in-out infinite alternate;
}

@keyframes glow-pro {
    from {
        box-shadow: 0 0 4px rgba(139, 92, 246, 0.3);
    }

    to {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    }
}

/* Premium - Dourado com efeito shimmer */
.plan-badge.premium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.3));
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    animation: shimmer 2s linear infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gray-700);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--gray-400);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: var(--error-500);
    color: white;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    background: white;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.btn-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    flex: 1;
}

.page-content {
    flex: 1;
    padding: var(--space-6);
}

/* ===== Login Screen PREMIUM ===== */
.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    z-index: 1000;
    overflow: hidden;
}

/* Animated background particles */
.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 40%);
    animation: bgPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgPulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-8);
    max-width: 520px;
    margin: 0 auto;
}

.login-brand {
    text-align: center;
    margin-bottom: var(--space-8);
    animation: fadeSlideDown 0.8s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand .brand-logo {
    font-size: 4rem;
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-brand h1 {
    font-size: var(--font-size-3xl);
    margin-top: var(--space-2);
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-brand p {
    color: #94a3b8;
    font-size: var(--font-size-lg);
}

.login-form {
    background: rgba(30, 41, 59, 0.85);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(20px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: formAppear 0.6s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

/* Gradient border animation */
.login-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
    background-size: 400% 400%;
    border-radius: calc(var(--radius-2xl) + 2px);
    z-index: -1;
    opacity: 0.4;
    animation: borderGlow 4s ease infinite;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-group {
    margin-bottom: var(--space-5);
    animation: fieldFadeIn 0.5s ease-out both;
}

.form-group:nth-of-type(1) {
    animation-delay: 0.3s;
}

.form-group:nth-of-type(2) {
    animation-delay: 0.4s;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: #e2e8f0;
    font-size: var(--font-size-sm);
}

.form-group input {
    width: 100%;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    color: #fff;
    font-size: var(--font-size-base);
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 0 20px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.5);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    animation: fieldFadeIn 0.5s ease-out 0.5s both;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    color: #94a3b8;
}

.link-forgot {
    font-size: var(--font-size-sm);
    color: #818cf8;
}

.link-forgot:hover {
    color: #a5b4fc;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: #64748b;
    animation: fieldFadeIn 0.5s ease-out 0.55s both;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.login-register {
    text-align: center;
    margin-top: var(--space-6);
    color: #94a3b8;
    animation: fieldFadeIn 0.5s ease-out 0.65s both;
}

.login-register a {
    color: #818cf8;
}

.login-register a:hover {
    color: #a5b4fc;
}

/* Primary Button Premium */
.login-form .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fieldFadeIn 0.5s ease-out 0.6s both;
}

.login-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.login-form .btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.login-form .btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

/* Google Button Premium */
.login-form .btn-google {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: fieldFadeIn 0.5s ease-out 0.55s both;
}

.login-form .btn-google:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.login-image-side {
    flex: 1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.login-image-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
    animation: bgPulse 6s ease-in-out infinite reverse;
}

.login-image-content {
    text-align: center;
    color: white;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.floating-printer {
    font-size: 8rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
}

/* ===== Animated 3D Printer ===== */
.printer-3d-container {
    width: 200px;
    height: 220px;
    position: relative;
    margin: 0 auto var(--space-6);
    animation: floatPrinter 4s ease-in-out infinite;
}

@keyframes floatPrinter {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.printer-3d {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Frame Structure */
.printer-frame {
    position: absolute;
    width: 100%;
    height: 100%;
}

.frame-top {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 12px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.frame-pillar {
    position: absolute;
    width: 10px;
    height: 180px;
    background: linear-gradient(180deg, #4f46e5, #6366f1);
    border-radius: 5px;
    top: 6px;
}

.frame-pillar.left {
    left: 10%;
}

.frame-pillar.right {
    right: 10%;
}

/* Hotend / Extruder */
.printer-hotend {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 35px;
    background: linear-gradient(180deg, #334155, #1e293b);
    border-radius: 4px 4px 0 0;
    animation: hotendMove 3s ease-in-out infinite, hotendRise 5s ease-in-out infinite;
    z-index: 10;
}

@keyframes hotendMove {

    0%,
    100% {
        left: 35%;
    }

    25% {
        left: 65%;
    }

    50% {
        left: 55%;
    }

    75% {
        left: 40%;
    }
}

/* Hotend rises as layers are printed */
@keyframes hotendRise {
    0% {
        top: 110px;
    }

    20% {
        top: 100px;
    }

    40% {
        top: 90px;
    }

    60% {
        top: 80px;
    }

    80% {
        top: 70px;
    }

    100% {
        top: 60px;
    }
}

.nozzle {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #f59e0b;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

.filament-drop {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: linear-gradient(180deg, #f59e0b, #6366f1);
    border-radius: 2px;
    animation: filamentDrip 0.8s ease-in infinite;
    opacity: 0.9;
}

@keyframes filamentDrip {
    0% {
        height: 0;
        opacity: 1;
    }

    50% {
        height: 15px;
        opacity: 0.8;
    }

    100% {
        height: 0;
        opacity: 0;
    }
}

/* Print Bed */
.print-bed {
    position: absolute;
    bottom: 10px;
    left: 15%;
    width: 70%;
    height: 15px;
    background: linear-gradient(90deg, #374151, #4b5563, #374151);
    border-radius: 3px;
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 -2px 0 rgba(255, 255, 255, 0.1);
}

.bed-surface {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    border-radius: 2px;
    animation: bedGlow 2s ease-in-out infinite alternate;
}

@keyframes bedGlow {
    0% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
    }

    100% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
    }
}

/* Printed Object - Layers */
.print-object {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
}

.layer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    transform: scaleX(0);
    animation: printLayer 5s ease-out infinite;
}

.layer-1 {
    bottom: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    animation-delay: 0s;
}

.layer-2 {
    bottom: 8px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    animation-delay: 1s;
}

.layer-3 {
    bottom: 16px;
    background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
    animation-delay: 2s;
}

.layer-4 {
    bottom: 24px;
    background: linear-gradient(90deg, #a78bfa, #ddd6fe);
    animation-delay: 3s;
}

.layer-5 {
    bottom: 32px;
    background: linear-gradient(90deg, #c4b5fd, #ede9fe);
    animation-delay: 4s;
}

@keyframes printLayer {
    0% {
        opacity: 0;
        transform: scaleX(0);
        box-shadow: none;
    }

    10% {
        opacity: 1;
        transform: scaleX(1);
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    }

    90% {
        opacity: 1;
        transform: scaleX(1);
    }

    100% {
        opacity: 0;
        transform: scaleX(0.8);
    }
}

/* Glow Effect */
.printer-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: printerGlow 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes printerGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.login-image-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--space-5);
    line-height: 1.4;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textFadeUp 0.8s ease-out 0.5s both;
}

@keyframes textFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-image-content p {
    font-size: 0.9rem;
    margin-top: var(--space-2);
    color: #94a3b8;
    line-height: 1.5;
    animation: textFadeUp 0.8s ease-out 0.6s both;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    padding: var(--space-4);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    animation: slideIn var(--transition-normal);
}

.toast.success {
    border-left: 4px solid var(--success-500);
}

.toast.error {
    border-left: 4px solid var(--error-500);
}

.toast.warning {
    border-left: 4px solid var(--warning-500);
}

.toast.info {
    border-left: 4px solid var(--info-500);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .login-image-side {
        display: none;
    }

    .login-form-side {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 280px !important;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
    }

    .sidebar.mobile-open {
        left: 0 !important;
    }

    .main-content {
        margin-left: 0;
    }

    .btn-menu-toggle {
        display: block;
    }

    /* Login form mobile fixes */
    .login-form-side {
        padding: var(--space-4);
        max-width: 100%;
    }

    .login-form {
        padding: var(--space-5);
        margin: 0 var(--space-2);
    }

    .login-brand h1 {
        font-size: var(--font-size-2xl);
    }
}

/* Mobile Portrait - Login Screen PREMIUM */
@media (max-width: 480px) {
    .login-screen {
        background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
        overflow: hidden;
    }

    /* Animated background particles */
    .login-screen::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:
            radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 40%);
        animation: bgPulse 8s ease-in-out infinite;
        pointer-events: none;
    }

    @keyframes bgPulse {

        0%,
        100% {
            opacity: 0.8;
            transform: scale(1);
        }

        50% {
            opacity: 1;
            transform: scale(1.1);
        }
    }

    .login-container {
        flex-direction: column;
        padding: var(--space-4);
        position: relative;
        z-index: 1;
    }

    .login-form-side {
        padding: var(--space-3);
        width: 100%;
        max-width: 100%;
    }

    .login-brand {
        margin-bottom: var(--space-5);
        animation: fadeSlideDown 0.8s ease-out;
    }

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

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-brand .brand-logo {
        font-size: 3rem;
        animation: floatLogo 3s ease-in-out infinite;
    }

    @keyframes floatLogo {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-8px);
        }
    }

    .login-brand h1 {
        font-size: var(--font-size-2xl);
        background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .login-brand p {
        font-size: var(--font-size-sm);
        color: #94a3b8;
    }

    .login-form {
        background: rgba(30, 41, 59, 0.85);
        padding: var(--space-6);
        border-radius: var(--radius-2xl);
        border: 1px solid rgba(99, 102, 241, 0.2);
        backdrop-filter: blur(20px);
        box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.4),
            0 0 40px rgba(99, 102, 241, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        animation: formAppear 0.6s ease-out 0.2s both;
        position: relative;
        overflow: hidden;
    }

    /* Gradient border animation */
    .login-form::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
        background-size: 400% 400%;
        border-radius: calc(var(--radius-2xl) + 2px);
        z-index: -1;
        opacity: 0.4;
        animation: borderGlow 4s ease infinite;
    }

    @keyframes borderGlow {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    @keyframes formAppear {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .login-form .form-group {
        animation: fieldFadeIn 0.5s ease-out both;
    }

    .login-form .form-group:nth-child(1) {
        animation-delay: 0.3s;
    }

    .login-form .form-group:nth-child(2) {
        animation-delay: 0.4s;
    }

    .login-form .form-group:nth-child(3) {
        animation-delay: 0.5s;
    }

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

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .login-form .form-group label {
        color: #e2e8f0;
        font-weight: 500;
        font-size: var(--font-size-sm);
    }

    .login-form .form-group input {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        border-radius: var(--radius-lg);
        padding: var(--space-4);
        transition: all 0.3s ease;
    }

    .login-form .form-group input::placeholder {
        color: #64748b;
    }

    .login-form .form-group input:focus {
        border-color: #6366f1;
        box-shadow:
            0 0 0 3px rgba(99, 102, 241, 0.2),
            0 0 20px rgba(99, 102, 241, 0.15);
        background: rgba(0, 0, 0, 0.5);
    }

    .login-form .form-row {
        animation: fieldFadeIn 0.5s ease-out 0.5s both;
    }

    .login-form .checkbox-label {
        color: #94a3b8;
    }

    .login-form .link-forgot {
        color: #818cf8;
    }

    .login-form .login-divider {
        color: #64748b;
        animation: fieldFadeIn 0.5s ease-out 0.55s both;
    }

    .login-form .login-divider::before,
    .login-form .login-divider::after {
        background: rgba(255, 255, 255, 0.1);
    }

    .login-form .login-register {
        color: #94a3b8;
        animation: fieldFadeIn 0.5s ease-out 0.65s both;
    }

    .login-form .btn-primary {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
        border: none;
        padding: var(--space-4);
        border-radius: var(--radius-lg);
        font-weight: 600;
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        animation: fieldFadeIn 0.5s ease-out 0.6s both;
    }

    /* Shine effect on button */
    .login-form .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .login-form .btn-primary:hover::before {
        left: 100%;
    }

    .login-form .btn-primary:active {
        transform: scale(0.98);
    }

    /* Google button for dark theme */
    .login-form .btn-google {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: var(--space-4);
        border-radius: var(--radius-lg);
        font-weight: 500;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        animation: fieldFadeIn 0.5s ease-out 0.58s both;
    }

    .login-form .btn-google:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    .login-form .btn-google svg {
        width: 20px;
        height: 20px;
    }
}