:root {
    --primary: #7C3AED;
    --primary-dark: #6D28D9;
    --primary-light: #8B5CF6;
    --secondary: #EC4899;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --dark: #1F2937;
    --light: #F9FAFB;
    --gray: #6B7280;
    --gray-light: #E5E7EB;
    --gray-dark: #374151;
    --sidebar-width: 280px;
    --topbar-height: 70px;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   AUTH SCREENS - MODERNIZED
   ============================================ */

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-light) 100%);
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-container {
    max-width: 480px;
    margin: 0 auto;
}

.register-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   LOGIN DESIGN
   ============================================ */

.auth-brand {
    text-align: center;
    margin-bottom: 40px;
}

.brand-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.brand-icon i {
    font-size: 40px;
    color: white;
}

.brand-name {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.brand-tagline {
    color: var(--gray);
    font-size: 15px;
    font-weight: 500;
}

.welcome-text {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.welcome-text p {
    color: var(--gray);
    font-size: 15px;
}

/* ============================================
   MODERN INPUT DESIGN
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 20px;
    transition: var(--transition);
    z-index: 2;
}

.input-group input,
.input-group select,
.input-group textarea,
.form-control {
    width: 100%;
    padding: 16px 18px 16px 52px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 15px;
    background: white;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.input-group input:focus ~ .input-icon,
.input-group select:focus ~ .input-icon {
    color: var(--primary);
}

.input-group label {
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
    background: white;
    padding: 0 8px;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.input-group select ~ .select-label,
.input-group .time-label {
    top: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: var(--transition);
}

.input-group input:focus ~ .input-border,
.input-group select:focus ~ .input-border {
    width: 100%;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   FORM OPTIONS & CHECKBOXES
   ============================================ */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: auto;
    padding: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.checkmark::after {
    content: '\ea10';
    font-family: 'boxicons';
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 14px;
    color: var(--gray-dark);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #F472B6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #F87171 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #FBBF24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #60A5FA 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-light {
    background: white;
    color: var(--gray-dark);
    border: 2px solid var(--gray-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-light:hover:not(:disabled) {
    background: var(--light);
    border-color: var(--gray);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 20px;
}

/* ============================================
   AUTH DIVIDER
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

.auth-divider span {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   AUTH FOOTER
   ============================================ */

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 12px;
}

.link-register {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.link-register:hover {
    color: var(--primary-dark);
    gap: 10px;
}

.link-register i {
    font-size: 18px;
}

/* ============================================
   REGISTER - PROGRESS STEPS
   ============================================ */

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gray);
    transition: var(--transition);
    position: relative;
}

.step-check {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.step.active .step-circle {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    animation: stepPulse 2s ease-in-out infinite;
}

.step.completed .step-circle {
    border-color: var(--primary);
}

.step.completed .step-check {
    opacity: 1;
    transform: scale(1);
}

@keyframes stepPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.2);
    }
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-align: center;
}

.step.active .step-label {
    color: var(--primary);
}

.step-line {
    flex: 1;
    height: 3px;
    background: var(--gray-light);
    position: relative;
    margin: 0 -10px;
}

.step-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.5s ease;
}

.step.completed ~ .step-line::after {
    width: 100%;
}

/* ============================================
   REGISTER HEADER
   ============================================ */

.register-header {
    text-align: center;
    margin-bottom: 35px;
}

.brand-icon-small {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon-small i {
    font-size: 26px;
    color: white;
}

.register-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.register-header p {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   FORM STEPS
   ============================================ */

.form-step {
    display: none;
    animation: fadeInLeft 0.4s ease;
}

.form-step.active {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   INFO CARDS & ALERTS
   ============================================ */

.info-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-card.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.info-card i {
    font-size: 32px;
    color: var(--primary);
    flex-shrink: 0;
}

.info-card.success i {
    color: var(--success);
}

.info-card p {
    color: var(--gray-dark);
    font-size: 14px;
    font-weight: 500;
}

.alert-info {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    gap: 12px;
}

.alert-info i {
    font-size: 24px;
    color: var(--info);
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    color: var(--dark);
    font-size: 14px;
    margin-bottom: 4px;
}

.alert-content p {
    color: var(--gray);
    font-size: 13px;
    margin: 0;
}

.alert-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle-group {
    padding: 20px;
    background: rgba(124, 58, 237, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 54px;
    height: 28px;
    background: var(--gray-light);
    border-radius: 14px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-slider {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-container input[type="checkbox"]:checked ~ .toggle-switch {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.toggle-container input[type="checkbox"]:checked ~ .toggle-switch .toggle-slider {
    left: 29px;
}

.toggle-labels {
    flex: 1;
}

.toggle-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.toggle-subtitle {
    display: block;
    font-size: 13px;
    color: var(--gray);
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   FORM NAVIGATION
   ============================================ */

.form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-nav {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-prev {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-prev:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-5px);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.btn-next:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.4);
}

.btn-submit-register {
    background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-submit-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.btn-nav i {
    font-size: 18px;
}

.register-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-light);
}

.terms-check {
    padding: 15px;
    background: rgba(124, 58, 237, 0.03);
    border-radius: var(--border-radius);
}

.code-input input {
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 600;
}

/* ============================================
   MAIN APP - SIDEBAR & LAYOUT
   ============================================ */

#mainApp {
    display: block;
    min-height: 100vh;
}

.sidebar {
    background: white;
    border-right: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    width: var(--sidebar-width);
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-header i {
    font-size: 32px;
    color: var(--primary);
}

nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(124, 58, 237, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
}

.nav-item i {
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.user-info i {
    font-size: 36px;
    color: var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.user-role {
    font-size: 12px;
    color: var(--gray);
}

.btn-logout {
    background: linear-gradient(135deg, var(--danger) 0%, #F87171 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

.btn-logout i {
    font-size: 20px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--light);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.btn-toggle-sidebar {
    background: white;
    border: 2px solid var(--gray-light);
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-sidebar:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.business-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    margin-bottom: 30px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.page-title i {
    color: var(--primary);
    font-size: 36px;
}

.page-subtitle {
    color: var(--gray);
    font-size: 16px;
    padding-left: 51px;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid rgba(124, 58, 237, 0.05);
    transition: var(--transition);
    animation: cardFadeIn 0.5s ease;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(124, 58, 237, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
    font-size: 24px;
}

.card-body {
    color: var(--gray-dark);
}

/* ============================================
   STATS GRID
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid rgba(124, 58, 237, 0.05);
    animation: statCardSlide 0.5s ease;
}

@keyframes statCardSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.1) 100%);
    color: var(--success);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: var(--warning);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: var(--danger);
}

.stat-icon.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.1) 100%);
    color: var(--info);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.stat-info small {
    font-size: 12px;
    color: var(--gray);
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

thead th:first-child {
    border-top-left-radius: var(--border-radius);
}

thead th:last-child {
    border-top-right-radius: var(--border-radius);
}

tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--gray-light);
    font-size: 14px;
    color: var(--gray-dark);
}

tbody tr {
    transition: var(--transition);
    background: white;
}

tbody tr:hover {
    background: rgba(124, 58, 237, 0.03);
    transform: scale(1.01);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.primary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
}

.badge.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.1) 100%);
    color: var(--success);
}

.badge.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: var(--warning);
}

.badge.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: var(--danger);
}

.badge.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.1) 100%);
    color: var(--info);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, transparent 100%);
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: var(--gray-light);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-size: 24px;
    color: var(--gray-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid var(--gray-light);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: rgba(124, 58, 237, 0.02);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.form-group small {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

/* ============================================
   PRODUCT CARDS (POS)
   ============================================ */

.product-card {
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, transparent 100%);
}

.product-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 10px;
}

/* ============================================
   LOADING & TOAST
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 340px;
    animation: toastSlideIn 0.4s ease;
    border-left: 4px solid var(--primary);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast i {
    font-size: 26px;
    flex-shrink: 0;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

/* Form Controls in Modals */
.modal-body .form-control,
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body input[type="tel"],
.modal-body input[type="date"],
.modal-body input[type="time"],
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
    font-family: inherit;
}

.modal-body .form-control:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(126, 58, 242, 0.1);
}

.modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .register-card {
        padding: 35px;
    }
    
    .progress-steps {
        margin-bottom: 30px;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 35px 25px;
    }
    
    .register-card {
        padding: 30px 20px;
    }
    
    .brand-icon {
        width: 70px;
        height: 70px;
    }
    
    .brand-icon i {
        font-size: 35px;
    }
    
    .brand-name {
        font-size: 30px;
    }
    
    .welcome-text h2 {
        font-size: 24px;
    }
    
    .input-row,
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .step {
        flex: 1;
        min-width: calc(50% - 10px);
    }
    
    .step-line {
        display: none;
    }
    
    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-nav {
        width: 100%;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .page-title i {
        font-size: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-screen {
        padding: 15px;
    }
    
    .auth-card {
        padding: 25px 20px;
    }
    
    .register-card {
        padding: 25px 15px;
    }
    
    .brand-icon {
        width: 60px;
        height: 60px;
    }
    
    .brand-icon i {
        font-size: 30px;
    }
    
    .brand-name {
        font-size: 26px;
    }
    
    .welcome-text h2 {
        font-size: 20px;
    }
    
    .register-header h2 {
        font-size: 20px;
    }
    
    .progress-steps {
        gap: 10px;
    }
    
    .step {
        min-width: calc(50% - 5px);
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-label {
        font-size: 9px;
    }
    
    .input-group input,
    .input-group select {
        padding: 14px 16px 14px 48px;
        font-size: 14px;
    }
    
    .input-icon {
        left: 14px;
        font-size: 18px;
    }
    
    .input-group label {
        left: 48px;
        font-size: 14px;
    }
    
    .btn-submit,
    .btn-nav {
        padding: 13px 20px;
        font-size: 14px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .toast-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-title i {
        font-size: 26px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
}

/* Desktop Layout - Asegurar que el sidebar siempre esté visible */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
        position: fixed;
        left: 0;
        top: 0;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
    
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
}

/* Mobile Layout - Sidebar colapsado por defecto */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}