/* ============================================
   Xirfadeeye Learning Center - Main Stylesheet
   ============================================ */

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

:root {
    --primary: #4F46E5;
    --primary-light: #4F46E522;
    --primary-dark: #4338CA;
    --secondary: #7C3AED;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --dark: #1F2937;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px 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);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ---- Admin Wrapper ---- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-section {
    padding: 16px 20px 6px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

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

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 6px;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.content-wrapper {
    padding: 24px;
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-header .subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 20px;
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: #EFF6FF; color: #3B82F6; }
.stat-icon.green { background: #ECFDF5; color: #10B981; }
.stat-icon.purple { background: #F5F3FF; color: #8B5CF6; }
.stat-icon.orange { background: #FFF7ED; color: #F97316; }
.stat-icon.red { background: #FEF2F2; color: #EF4444; }
.stat-icon.teal { background: #F0FDFA; color: #14B8A6; }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}
.btn-whatsapp:hover {
    background: #1DA851;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

/* ---- Tables ---- */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    background: var(--gray-50);
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

table tbody td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

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

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

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success { background: #ECFDF5; color: #059669; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-danger { background: #FEF2F2; color: #DC2626; }
.badge-info { background: #EFF6FF; color: #2563EB; }
.badge-purple { background: #F5F3FF; color: #7C3AED; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ---- Toggle Switch ---- */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ---- Color Picker ---- */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

/* ---- Alert Messages ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ---- Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

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

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* ---- Invite Link Box ---- */
.invite-link-box {
    background: var(--gray-50);
    border: 1.5px dashed var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.invite-link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    color: var(--gray-600);
    font-family: 'Courier New', monospace;
}

.invite-link-box .copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.invite-link-box .copy-btn:hover {
    background: var(--primary-dark);
}

/* ---- Progress Bar ---- */
.progress-bar {
    background: var(--gray-200);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ---- Field Builder ---- */
.field-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.field-item:hover {
    border-color: var(--primary);
}

.field-item .drag-handle {
    color: var(--gray-400);
    cursor: grab;
    font-size: 1rem;
}

.field-item .field-info {
    flex: 1;
}

.field-item .field-info .field-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.field-item .field-info .field-type {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.field-item .field-actions {
    display: flex;
    gap: 6px;
}

.field-item .field-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-400);
    border-radius: 4px;
}

.field-item .field-actions button:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ---- Public Registration Form ---- */
.public-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--white));
}

.registration-form-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
}

.form-card-header {
    padding: 32px 32px 24px;
    text-align: center;
}

.form-card-header .form-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: var(--primary);
}

.form-card-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.form-card-header p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.form-card-body {
    padding: 0 32px 32px;
}

.form-card-body .form-group {
    margin-bottom: 16px;
}

.form-card-body .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-card-body .form-control {
    border-radius: 10px;
    padding: 12px 14px;
}

.form-card-body .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 8px;
}

.required-mark {
    color: var(--danger);
    margin-left: 2px;
}

/* ---- Success Page ---- */
.success-page {
    text-align: center;
    padding: 48px 32px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #ECFDF5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: var(--success);
}

.success-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.success-page p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ---- WhatsApp Chat ---- */
.whatsapp-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.whatsapp-sent {
    background: #DCF8C6;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.whatsapp-received {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
}

/* ---- Tab Navigation ---- */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ---- Search & Filter Bar ---- */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-bar .search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
}

.filter-bar .search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-bar .search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    text-align: center;
}

.login-card .login-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.login-card h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.login-card .subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 28px;
}

.login-card .form-group {
    text-align: left;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar .search-box {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .registration-form-card {
        border-radius: 0;
    }
    
    .form-card-header, .form-card-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-bottom: 6px;
    z-index: 100;
}

/* ---- Print Styles ---- */
@media print {
    .sidebar, .topbar, .btn, .filter-bar { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
}
