/* ============================================
   CORTEX Rec - Design System
   Recenseamento Inteligente
   ============================================ */

:root {
    /* Brand Colors - Extraídas da Logo */
    --primary: #E63946;
    --primary-dark: #C62A36;
    --primary-light: #FF6B6B;
    --primary-rgb: 230, 57, 70;

    --secondary: #2D3748;
    --secondary-dark: #1A202C;
    --secondary-light: #4A5568;
    --secondary-rgb: 45, 55, 72;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F7FAFC;
    --gray-100: #EDF2F7;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E0;
    --gray-400: #A0AEC0;
    --gray-500: #718096;
    --gray-600: #4A5568;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --gray-900: #171923;

    /* Semantic Colors */
    --success: #38A169;
    --success-light: #C6F6D5;
    --warning: #D69E2E;
    --warning-light: #FEFCBF;
    --danger: #E53E3E;
    --danger-light: #FED7D7;
    --info: #3182CE;
    --info-light: #BEE3F8;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted { color: var(--gray-500) !important; }

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white) !important;
    box-shadow: var(--shadow-md), 0 4px 14px 0 rgba(var(--primary-rgb), 0.4);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg), 0 6px 20px 0 rgba(var(--primary-rgb), 0.4);
    color: var(--white) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white) !important;
    box-shadow: var(--shadow-md);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    transform: translateY(-1px);
    color: var(--white) !important;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #2F855A 100%);
    color: var(--white);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #C53030 100%);
    color: var(--white);
    border: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-100);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
}

/* Stats Cards */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }
.stat-card.secondary::before { background: var(--secondary); }

.stat-card .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.primary .stat-icon { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
.stat-card.success .stat-icon { background: rgba(56, 161, 105, 0.1); color: var(--success); }
.stat-card.warning .stat-icon { background: rgba(214, 158, 46, 0.1); color: var(--warning); }
.stat-card.info .stat-icon { background: rgba(49, 130, 206, 0.1); color: var(--info); }
.stat-card.secondary .stat-icon { background: rgba(var(--secondary-rgb), 0.1); color: var(--secondary); }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   Forms
   ============================================ */

.form-label {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

.input-group {
    position: relative;
}

.input-group .input-group-text {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-right: none;
    color: var(--gray-500);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-color: var(--gray-200);
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

.input-group:focus-within .form-control {
    border-color: var(--primary);
}

/* ============================================
   Navigation & Sidebar
   ============================================ */

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    padding: 0 1rem;
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

.nav-link i {
    width: 1.5rem;
    text-align: center;
    font-size: 1.125rem;
}

.nav-section {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--gray-50);
}

.top-header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-content {
    padding: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Navbar */
.navbar {
    background: var(--white) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 50%, var(--secondary-light) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    text-align: center;
}

.login-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 2rem;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.login-divider span {
    padding: 0 1rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.login-form .btn-primary {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Portal do Segurado
   ============================================ */

.portal-header {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    padding: 1.5rem 2rem;
    color: var(--white);
}

.portal-logo {
    height: 50px;
    filter: brightness(0) invert(1);
}

.portal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.portal-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.portal-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
}

.portal-card-body {
    padding: 2rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-500);
    position: relative;
}

.step.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

.step.completed {
    background: var(--success);
    color: var(--white);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: var(--gray-200);
}

.step.completed:not(:last-child)::after {
    background: var(--success);
}

.portal-step {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    transition: all var(--transition-base);
}

.portal-step.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.portal-step.completed {
    border-color: var(--success);
    background: rgba(56, 161, 105, 0.05);
}

.portal-step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.portal-step.active .portal-step-number {
    background: var(--primary);
    color: var(--white);
}

.portal-step.completed .portal-step-number {
    background: var(--success);
    color: var(--white);
}

/* ============================================
   Tables
   ============================================ */

.table {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Badges & Status
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary,
.bg-primary {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary) !important;
}

.badge-success,
.bg-success-subtle {
    background: rgba(56, 161, 105, 0.1) !important;
    color: var(--success) !important;
}

.badge-warning,
.bg-warning-subtle {
    background: rgba(214, 158, 46, 0.1) !important;
    color: var(--warning) !important;
}

.badge-danger,
.bg-danger-subtle {
    background: rgba(229, 62, 62, 0.1) !important;
    color: var(--danger) !important;
}

.badge-info,
.bg-info-subtle {
    background: rgba(49, 130, 206, 0.1) !important;
    color: var(--info) !important;
}

.badge-secondary,
.bg-secondary-subtle {
    background: rgba(var(--secondary-rgb), 0.1) !important;
    color: var(--secondary) !important;
}

/* Status Badges específicos */
.badge.status-pendente {
    background-color: rgba(214, 158, 46, 0.1);
    color: var(--warning);
}

.badge.status-em-andamento {
    background-color: rgba(49, 130, 206, 0.1);
    color: var(--info);
}

.badge.status-concluido {
    background-color: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.badge.status-pendencia {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

/* Status indicators */
.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.success { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.danger { background: var(--danger); }
.status-dot.info { background: var(--info); }

/* ============================================
   Progress
   ============================================ */

.progress {
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success) 0%, #2F855A 100%) !important;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: none;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    color: #22543D;
}

.alert-warning {
    background: var(--warning-light);
    color: #744210;
}

.alert-danger {
    background: var(--danger-light);
    color: #742A2A;
}

.alert-info {
    background: var(--info-light);
    color: #2A4365;
}

/* ============================================
   Modals
   ============================================ */

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--secondary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
}

/* ============================================
   Camera / Biometria
   ============================================ */

.camera-container,
.biometria-container {
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.camera-container video,
.biometria-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.biometria-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
}

.camera-overlay,
.biometria-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 280px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

.face-guide {
    width: 200px;
    height: 260px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.face-guide.detected {
    border-color: var(--success);
    border-style: solid;
    box-shadow: 0 0 20px rgba(56, 161, 105, 0.5);
}

.camera-status,
.biometria-status {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 280px;
    justify-content: center;
}

.camera-status .spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   User Avatar
   ============================================ */

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

/* ============================================
   Dropdown
   ============================================ */

.dropdown-menu {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gray-100);
}

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

/* ============================================
   Utilities
   ============================================ */

.bg-primary-solid { background-color: var(--primary) !important; color: var(--white) !important; }
.bg-secondary-solid { background-color: var(--secondary) !important; color: var(--white) !important; }
.bg-success-solid { background-color: var(--success) !important; color: var(--white) !important; }
.bg-warning-solid { background-color: var(--warning) !important; }
.bg-danger-solid { background-color: var(--danger) !important; color: var(--white) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-secondary { border-color: var(--secondary) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ============================================
   Animations
   ============================================ */

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.slide-up {
    animation: slideUp 0.3s ease;
}

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

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

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

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-logo {
        max-width: 220px;
    }

    .page-content {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .portal-container {
        padding: 1rem;
    }
}

/* ============================================
   Print
   ============================================ */

@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

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

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}
