/* ==============================================
   PROFESSIONAL DARK UI — FULL REWRITE
   ============================================== */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.9);
    --bg-card-solid: #111827;
    --bg-input: #1a2236;
    --bg-input-hover: #1f2a42;
    --bg-elevated: #1e293b;
    --border: #1f2a42;
    --border-light: #2a3654;
    --border-focus: #3b82f6;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-glow: rgba(59, 130, 246, 0.3);
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: rgba(239, 68, 68, 0.2);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.2);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --purple: #8b5cf6;
    --purple-soft: rgba(139, 92, 246, 0.12);
    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.12);
    --scrollbar-thumb: #2a3654;
    --scrollbar-track: #111827;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==============================================
   SCROLLBAR
   ============================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b4f6b; }

/* ==============================================
   UTILITY CLASSES
   ============================================== */
.hidden { display: none !important; }
.text-danger { font-size: 12px; color: var(--error); margin-top: 6px; display: block; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* ==============================================
   ANIMATED BACKGROUND
   ============================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 100%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ==============================================
   SHARED BUTTON STYLES
   ============================================== */
.submit-button,
.logout-button,
.action-button,
button {
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition);
}

/* ==============================================
   SHARED INPUT STYLES
   ============================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
.filter-input {
    font-family: inherit;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-apxpearance: none;
}

input:focus,
select:focus,
.filter-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

input::placeholder { color: var(--text-muted); }

select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6) brightness(1.3);
    cursor: pointer;
}

/* ==============================================
   REGISTRATION PAGE — SPLIT LAYOUT
   ============================================== */
body.register-page {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.register-left {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: linear-gradient(160deg, #0f172a 0%, #1a1040 40%, #0c1a3a 100%);
    position: relative;
    overflow: hidden;
}

.register-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: -80px;
    right: -120px;
    animation: floatBlob 8s ease-in-out infinite alternate;
}

.register-left::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    bottom: -60px;
    left: -80px;
    animation: floatBlob 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.08); }
}

.register-left-content {
    position: relative;
    z-index: 2;
    max-width: 340px;
}

.register-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 24px;
    margin-bottom: 28px;
}

.register-left h2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-left p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.register-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.register-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.register-features li .feat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    font-size: 15px;
}

.feat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.feat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.feat-icon.cyan { background: var(--cyan-soft); color: var(--cyan); }

/* Right Panel — Form */
.register-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.register-form-wrapper {
    width: 100%;
    max-width: 460px;
}

.register-form-wrapper .form-header {
    margin-bottom: 26px;
    text-align: center;
}

.register-form-wrapper .form-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.register-form-wrapper .form-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Success Message */
.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--success-bg);
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--success-border);
    margin-bottom: 20px;
}

.success-message::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

/* Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.input-group label .required {
    color: var(--error);
    margin-left: 2px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
    transition: color var(--transition);
}

.input-icon-wrapper input,
.input-icon-wrapper select {
    padding-left: 36px;
}

.input-icon-wrapper:focus-within i {
    color: var(--accent);
}

/* Phone Group */
.phone-group .phone-fields {
    display: grid;
    grid-template-columns: 42px 90px 1fr;
    align-items: center;
    gap: 8px;
}

#flagIcon { font-size: 26px; }

.code-select {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.number-input {
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
}

.code-select:focus,
.number-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

/* Submit Button */
.submit-button {
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35);
}

.submit-button:hover::before {
    opacity: 1;
}

.submit-button:active {
    transform: translateY(0);
}

/* Custom Country Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.custom-select-trigger i {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-select-wrapper.open .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-options {
    list-style: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px 0;
    z-index: 9999;
    display: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-options li {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition);
}

.custom-options li:hover,
.custom-options li.active {
    background-color: var(--accent);
    color: #fff;
}

.custom-options::-webkit-scrollbar { width: 5px; }
.custom-options::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ==============================================
   ADMIN LOGIN PAGE
   ============================================== */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 44px 36px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.login-logo img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
}

.login-card h1 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-card .login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form .input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    height: 48px;
}

.login-form button {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
    transition: all var(--transition);
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--error);
    background: var(--error-bg);
    padding: 12px 16px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    border: 1px solid var(--error-border);
    text-align: center;
    justify-content: center;
}

/* ==============================================
   ADMIN DASHBOARD — PROFESSIONAL PANEL
   ============================================== */
body.dashboard-page {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Top Navbar */
.dash-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.dash-nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
}

.dash-nav-brand h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.dash-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-nav-right .nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.logout-button {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.logout-button:hover {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
    transform: none;
    box-shadow: none;
}

/* Main Content */
.dash-main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 32px 40px;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-glow);
}

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

.stat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.cyan { background: var(--cyan-soft); color: var(--cyan); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Filter Section */
.filter-section {
    margin-bottom: 24px;
}

.filter-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section-title i {
    color: var(--accent);
    font-size: 14px;
}

.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
}

.filter-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
}

.filter-input {
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
    min-width: 0;
}

.filter-controls select.filter-input {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%227%22%20viewBox%3D%220%200%2010%207%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200l5%207%205-7H0z%22%20fill%3D%22%2394a3b8%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 7px;
    padding-right: 36px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-shrink: 0;
    white-space: nowrap;
}

.action-button {
    height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg-input);
    border-color: var(--border-light);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

/* Table Section */
.table-section {
    margin-bottom: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-header h3 i {
    color: var(--accent);
    font-size: 14px;
}

.table-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-input);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

#userTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

#userTable th,
#userTable td {
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
}

#userTable th {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}

#userTable td {
    color: var(--text-primary);
    border-bottom: 1px solid rgba(31, 42, 66, 0.6);
    vertical-align: middle;
}

#userTable tbody tr {
    transition: background var(--transition);
}

#userTable tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

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

/* User name cell with avatar */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}

.avatar-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.avatar-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.avatar-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.avatar-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar-pink { background: linear-gradient(135deg, #ec4899, #db2777); }

/* Language badge */
.lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.lang-english { background: var(--accent-soft); color: var(--accent); }
.lang-tamil { background: var(--purple-soft); color: var(--purple); }
.lang-hindi { background: var(--cyan-soft); color: var(--cyan); }

/* Email cell */
.email-cell {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Phone cell */
.phone-cell {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Country cell */
.country-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-dim);
    margin-bottom: 16px;
    display: block;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.pagination {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination .page-item {
    border-radius: var(--radius-xs);
}

.pagination .page-link {
    color: var(--text-secondary) !important;
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: transparent;
    transition: all var(--transition);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.pagination .page-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
    font-weight: 700;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-dim) !important;
    background: transparent;
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 0.4;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.text-muted { color: var(--text-muted) !important; }

/* ==============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================== */
@media (max-width: 768px) {
    /* Register Page */
    body.register-page {
        flex-direction: column;
    }

    .register-left {
        display: none;
    }

    .register-right {
        padding: 28px 18px;
        min-height: 100vh;
    }

    .register-form-wrapper {
        max-width: 100%;
    }

    .register-form-wrapper .form-header h1 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .phone-group .phone-fields {
        grid-template-columns: 38px 75px 1fr;
        gap: 6px;
    }

    #flagIcon { font-size: 22px; }

    /* Dashboard */
    .dash-navbar {
        padding: 12px 16px;
    }

    .dash-nav-brand h2 {
        font-size: 15px;
    }

    .dash-nav-right .nav-user span {
        display: none;
    }

    .dash-main {
        padding: 20px 16px 32px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .stat-info h3 {
        font-size: 22px;
    }

    .filter-controls {
        flex-wrap: wrap;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .action-button {
        flex: 1;
        justify-content: center;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #userTable th,
    #userTable td {
        font-size: 12px;
        padding: 10px 12px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
    }
}

/* ==============================================
   RESPONSIVE — TABLET (769px – 1024px)
   ============================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-controls {
        flex-wrap: wrap;
    }

    .filter-group {
        min-width: 140px;
    }
}

/* ==============================================
   RESPONSIVE — LARGE SCREENS (≥ 1600px)
   ============================================== */
@media (min-width: 1600px) {
    .register-left {
        flex: 0 0 480px;
        padding: 56px 48px;
    }

    .register-left h2 {
        font-size: 34px;
    }

    .register-form-wrapper {
        max-width: 480px;
    }

    .register-form-wrapper .form-header h1 {
        font-size: 28px;
    }

    .dash-main {
        padding: 32px 48px 48px;
    }

    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }

    .stat-card {
        padding: 26px 28px;
    }

    .stat-info h3 {
        font-size: 32px;
    }
}
