/* ============================================
   EduCenter - Custom CSS
   Arabic RTL Educational Center Management
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    --primary: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #4338CA;
    --primary-50: #EEF2FF;
    --primary-100: #E0E7FF;
    --primary-200: #C7D2FE;

    --sidebar-dark: #0F172A;
    --sidebar-light: #1E293B;
    --sidebar-hover: #334155;
    --sidebar-active: #4F46E5;

    --success: #10B981;
    --success-light: #D1FAE5;
    --success-dark: #059669;

    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-dark: #D97706;

    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-dark: #DC2626;

    --gray: #6B7280;
    --gray-light: #F3F4F6;
    --gray-dark: #374151;

    --bg: #F8FAFC;
    --card: #FFFFFF;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

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

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    --font-family: 'IBM Plex Sans Arabic', sans-serif;
    --sidebar-width: 16rem;
}

/* ---- Base / Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- RTL-Specific Styles ---- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .ltr-text {
    direction: ltr;
    unicode-bidi: isolate;
}

[dir="rtl"] input[type="number"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"] {
    direction: ltr;
    text-align: right;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #94A3B8;
    border-radius: 3px;
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #94A3B8 var(--gray-light);
}

/* ============================================
   Sidebar Styles
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-dark) 0%, var(--sidebar-light) 100%);
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-brand-text {
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.sidebar-brand-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    display: block;
    margin-top: -2px;
}

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

.sidebar-section-title {
    padding: 0.75rem 1.25rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    border-right: 3px solid transparent;
    margin: 1px 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-link.active {
    background: rgba(79, 70, 229, 0.15);
    color: #FFFFFF;
    border-right-color: var(--primary);
}

.sidebar-link.active .sidebar-link-icon {
    color: var(--primary-light);
}

.sidebar-link-icon {
    width: 1.375rem;
    height: 1.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
}

.sidebar-link:hover .sidebar-link-icon {
    transform: scale(1.15);
}

.sidebar-link-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    min-width: 1.25rem;
    text-align: center;
    line-height: 1.4;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

.sidebar-user-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ---- Mobile Sidebar ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 45;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

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

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

    .main-content {
        margin-right: 0 !important;
    }
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--transition-slow);
    min-width: 0;
}

/* ============================================
   Header Styles
   ============================================ */
.top-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.header-search {
    position: relative;
    max-width: 20rem;
}

.header-search input {
    background: var(--gray-light);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.85rem;
    width: 100%;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--gray-light);
    color: var(--text);
}

.header-btn .badge-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-lg);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-dropdown-toggle:hover {
    background: var(--gray-light);
}

.user-dropdown-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-dropdown-info {
    text-align: right;
}

.user-dropdown-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.user-dropdown-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 12rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all var(--transition-normal);
    z-index: 100;
    overflow: hidden;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a,
.user-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-family);
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
    background: var(--gray-light);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

/* ---- Mobile Menu Toggle ---- */
.mobile-menu-btn {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: flex;
    }

    .header-search {
        display: none;
    }
}

/* ============================================
   Stats Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1279px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(1.5rem, -1.5rem);
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.stat-card:hover::before {
    opacity: 0.1;
}

.stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.stat-card-change.up {
    background: var(--success-light);
    color: var(--success-dark);
}

.stat-card-change.down {
    background: var(--danger-light);
    color: var(--danger-dark);
}

/* Color Variants */
.stat-card.primary::before { background: var(--primary); }
.stat-card.primary .stat-card-icon { background: var(--primary-50); color: var(--primary); }

.stat-card.success::before { background: var(--success); }
.stat-card.success .stat-card-icon { background: var(--success-light); color: var(--success-dark); }

.stat-card.warning::before { background: var(--warning); }
.stat-card.warning .stat-card-icon { background: var(--warning-light); color: var(--warning-dark); }

.stat-card.danger::before { background: var(--danger); }
.stat-card.danger .stat-card-icon { background: var(--danger-light); color: var(--danger-dark); }

.stat-card.gray::before { background: var(--gray); }
.stat-card.gray .stat-card-icon { background: var(--gray-light); color: var(--gray-dark); }

.stat-card.purple::before { background: #7C3AED; }
.stat-card.purple .stat-card-icon { background: #F5F3FF; color: #7C3AED; }

.stat-card.blue::before { background: #3B82F6; }
.stat-card.blue .stat-card-icon { background: #EFF6FF; color: #3B82F6; }

/* ============================================
   Tables
   ============================================ */
.table-container {
    background: var(--card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.table-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

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

.data-table thead th {
    background: #F8FAFC;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.02);
}

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

/* Responsive Table → Card View on Mobile */
@media (max-width: 767px) {
    .data-table.responsive thead {
        display: none;
    }

    .data-table.responsive tbody tr {
        display: block;
        padding: 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    .data-table.responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: none;
        font-size: 0.85rem;
    }

    .data-table.responsive tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        flex-shrink: 0;
        margin-left: 1rem;
    }
}

/* ============================================
   Status Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-paid,
.badge-active,
.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}
.badge-paid .badge-dot,
.badge-active .badge-dot,
.badge-success .badge-dot {
    background: var(--success);
}

.badge-partial,
.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}
.badge-partial .badge-dot,
.badge-warning .badge-dot {
    background: var(--warning);
}

.badge-unpaid,
.badge-inactive,
.badge-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
}
.badge-unpaid .badge-dot,
.badge-inactive .badge-dot,
.badge-danger .badge-dot {
    background: var(--danger);
}

.badge-cancelled,
.badge-gray {
    background: var(--gray-light);
    color: var(--gray-dark);
}
.badge-cancelled .badge-dot,
.badge-gray .badge-dot {
    background: var(--gray);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-dark);
}
.badge-primary .badge-dot {
    background: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}
.btn-success:hover:not(:disabled) {
    background: var(--success-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover:not(:disabled) {
    background: var(--danger-dark);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover:not(:disabled) {
    background: var(--warning-dark);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover:not(:disabled) {
    background: var(--gray-light);
    border-color: #CBD5E1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--gray-light);
    color: var(--text);
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 0.65rem 1.75rem;
    font-size: 0.95rem;
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
}

/* ============================================
   Form Styles
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.form-label .required {
    color: var(--danger);
    margin-right: 0.125rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
    font-family: var(--font-family);
    color: var(--text);
    background: var(--card);
    border: 1px solid #CBD5E1; /* Clearer, visible border */
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Soft depth shadow */
    transition: all var(--transition-fast);
    line-height: 1.5;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #94A3B8; /* Slate 400 on hover */
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Enhanced focus ring */
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94A3B8;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-textarea {
    min-height: 5rem;
    resize: vertical;
}

.input-group {
    position: relative;
}

.input-group .form-input {
    padding-right: 2.75rem;
}

.input-group-icon {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
}

.input-group .input-addon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #F1F5F9;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.input-group .form-input.has-addon {
    padding-left: 3rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #FAFBFC;
}

/* Glassmorphism Card */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
   Alerts / Flash Messages
   ============================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
    position: relative;
    border: 1px solid transparent;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 0.05rem;
}

.alert-content {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0.25rem;
    font-size: 1rem;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--primary-100);
    color: var(--primary-dark);
    border-color: rgba(79, 70, 229, 0.2);
}

/* ============================================
   Animation Keyframes
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-sm {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 24rem;
    width: 100%;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    animation: slideInLeft 0.35s ease-out;
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast-success::after { background: var(--success); }
.toast-error::after { background: var(--danger); }
.toast-warning::after { background: var(--warning); }
.toast-info::after { background: var(--primary); }

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--primary); }

.toast-content {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.125rem;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text);
}

.toast-exit {
    animation: fadeOut 0.25s ease-in forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-1rem);
    }
}

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-sm { max-width: 24rem; }
.modal-md { max-width: 32rem; }
.modal-lg { max-width: 48rem; }
.modal-xl { max-width: 64rem; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.modal-close:hover {
    background: var(--gray-light);
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #FAFBFC;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: var(--font-family);
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: var(--gray-light);
    border-color: #CBD5E1;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeIn 0.5s ease;
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 24rem;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--gray-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s ease;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.progress-bar-fill.success { background: linear-gradient(90deg, var(--success) 0%, #34D399 100%); }
.progress-bar-fill.warning { background: linear-gradient(90deg, var(--warning) 0%, #FBBF24 100%); }
.progress-bar-fill.danger { background: linear-gradient(90deg, var(--danger) 0%, #F87171 100%); }

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

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

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb-separator {
    color: #CBD5E1;
}

/* ============================================
   Filter Panel
   ============================================ */
.filter-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: background var(--transition-fast);
}

.filter-toggle:hover {
    background: rgba(79, 70, 229, 0.02);
}

.filter-body {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: none;
}

.filter-body.show {
    display: block;
    animation: slideDown 0.25s ease;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #312E81 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    top: -10rem;
    right: -10rem;
    border-radius: 50%;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 25rem;
    height: 25rem;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    bottom: -10rem;
    left: -10rem;
    border-radius: 50%;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 2rem;
    animation: scaleIn 0.4s ease-out;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.auth-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    transition: color var(--transition-fast);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text);
}

/* ============================================
   Action buttons for tables
   ============================================ */
.action-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.action-btn.edit:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.action-btn.toggle:hover {
    border-color: var(--warning);
    color: var(--warning);
    background: var(--warning-light);
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--card);
}

/* ============================================
   Collection Rate Card
   ============================================ */
.collection-card {
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.collection-card::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: -2rem;
    width: 8rem;
    height: 8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.collection-card::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    right: -3rem;
    width: 10rem;
    height: 10rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.collection-rate-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.collection-progress {
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 1rem;
}

.collection-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    transition: width 1s ease;
}

/* ============================================
   Utility Classes
   ============================================ */
.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-slide-right { animation: slideInRight 0.4s ease-out; }
.animate-slide-left { animation: slideInLeft 0.4s ease-out; }
.animate-slide-down { animation: slideDown 0.3s ease-out; }
.animate-slide-up { animation: slideUp 0.3s ease-out; }
.animate-scale-in { animation: scaleIn 0.3s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 0.7s linear infinite; }

.transition-all { transition: all var(--transition-normal); }
.transition-fast { transition: all var(--transition-fast); }

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.currency::before {
    content: '₪';
    margin-left: 0.25rem;
    font-weight: 500;
}

.hover-lift {
    transition: all var(--transition-normal);
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sidebar,
    .sidebar-overlay,
    .top-header,
    .main-footer,
    .toast-container,
    .modal-backdrop,
    .modal,
    .btn,
    .action-btns,
    .filter-panel,
    .pagination,
    .mobile-menu-btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card,
    .table-container {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .data-table tbody td {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    .badge {
        border: 1px solid currentColor !important;
    }

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

/* ============================================
   Page Transition
   ============================================ */
.page-content {
    animation: fadeIn 0.4s ease;
}

/* ============================================
   Confirm Dialog
   ============================================ */
.confirm-dialog {
    text-align: center;
    padding: 1.5rem 0;
}

.confirm-dialog-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.confirm-dialog-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

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

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--sidebar-dark);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Global Form Input Premium Overrides
   ============================================ */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    border: 1.5px solid #CBD5E1 !important; /* Softer, elegant Slate-300 border for a gentler look */
    color: #1E293B !important; /* Deep Slate-800 text color for absolute clarity */
    background-color: #FFFFFF !important;
    font-weight: 500 !important; /* Medium font weight for high readability */
    font-size: 0.925rem !important; /* Clearer, slightly larger font size */
    padding: 0.75rem 1rem !important; /* Roomier, wider, more comfortable padding */
    border-radius: 0.625rem !important; /* Gentler, softer rounded corners */
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03), inset 0 1px 2px 0 rgba(15, 23, 42, 0.02) !important; /* High-end subtle depth */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important; /* Ultra-smooth interaction */
    line-height: 1.5 !important;
}

/* Hover state: interactive feedback */
input[type="text"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
select:hover,
textarea:hover {
    border-color: #94A3B8 !important; /* Slate-400 on hover for clear feedback */
    box-shadow: 0 2px 5px 0 rgba(15, 23, 42, 0.05), inset 0 1px 2px 0 rgba(15, 23, 42, 0.01) !important;
}

/* Focus state: gorgeous glowing focus ring */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #4F46E5 !important; /* Premium Indigo-600 */
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), 0 2px 4px 0 rgba(79, 70, 229, 0.04) !important; /* Gentle, premium glow */
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
    color: #94A3B8 !important; /* Slate-400 placeholder for clear placeholder visibility */
    opacity: 0.8 !important;
}

