/* ========================================
   VAS2Nets Shortcode Portal - Main Styles
   ======================================== */

/* CSS Variables */
:root {
    --accent: #aa0000;
    --accent-2: #cc3333;
    --primary: #2c3e50;
    --secondary: #34495e;
    --bg: #ffffff;
    --muted: #666;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --border-color: #e0e0e0;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   Layout Components
   ======================================== */

/* Split Screen Layout (Login/OTP pages) */
.split-container {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden; /* Fix layout to viewport on desktop */
}

.image-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Use margin: auto on child for safe centering that allows scroll */
    justify-content: flex-start; 
    align-items: center;
    padding: 60px;
    background: #fff;
    height: 100%;
    overflow-y: auto; /* Internal scroll for form side */
}

.form-container {
    width: 100%;
    max-width: 420px;
    margin: auto; /* Vertically center safely */
}

/* ========================================
   Form Header & Titles (Login/OTP)
   ======================================== */

.form-header {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease;
}

.form-header img {
    height: 60px;
    width: auto;
    margin-bottom: 16px;
    display: inline-block;
}

.form-subtitle {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.form-sub {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* OTP specific titles */
.otp-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.otp-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Form entry animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-item {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-item:hover,
.navbar-item.active {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   Cards & Sections
   ======================================== */

.card,
.section-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header,
.section-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title,
.section-title {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Welcome/Page Header */
.page-header,
.welcome-section {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.page-title,
.welcome-title {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 5px;
}

.welcome-title {
    font-size: 28px;
}

.page-subtitle,
.welcome-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.welcome-subtitle {
    font-size: 16px;
}

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

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(170, 0, 0, 0.1);
}

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

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    z-index: 1;
}

.form-control.has-icon {
    padding-left: 44px;
}

/* Required field indicator */
.required {
    color: var(--danger);
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(170, 0, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #2563eb);
    color: white;
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 114, 128, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

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

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

.data-table,
.logs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td,
.logs-table th,
.logs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th,
.logs-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.data-table tr:hover,
.logs-table tr:hover {
    background: #f8f9fa;
}

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

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-enable,
.status-active,
.status-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-disable,
.status-inactive,
.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ========================================
   Alerts & Flash Messages
   ======================================== */

.flash,
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

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

.flash-success,
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #155724;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.flash-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #721c24;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-info,
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #0c5460;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-change.negative {
    color: var(--danger);
}

/* ========================================
   Quick Actions
   ======================================== */

.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(170, 0, 0, 0.2);
    text-decoration: none;
}

.action-btn i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.action-btn-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.action-btn-desc {
    font-size: 12px;
    opacity: 0.8;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination button:hover {
    background: #f8f9fa;
}

.pagination button.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Search & Filter Controls
   ======================================== */

.search-filter-row,
.logs-controls,
.query-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dropdown-select {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

/* ========================================
   Result Display
   ======================================== */

.query-results {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.query-results.active {
    display: block;
}

.result-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--primary);
}

.result-value {
    color: #666;
}

/* ========================================
   DND Status
   ======================================== */

.dnd-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.dnd-active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dnd-inactive {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* ========================================
   Issues List
   ======================================== */

.issues-list {
    list-style: none;
    padding: 0;
}

.issues-list li {
    padding: 10px 15px;
    background: #fff3cd;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.issues-list li.resolved {
    background: #d4edda;
}

/* ========================================
   Demo OTP Box
   ======================================== */

.demo-otp {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}

.demo-otp strong {
    color: var(--accent);
    font-size: 16px;
}

/* ========================================
   Demo Credentials Box
   ======================================== */

.demo-credentials {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 13px;
    color: #0369a1;
}

.demo-credentials strong {
    color: #0284c7;
}

/* ========================================
   User Data Dump (var_dump display)
   ======================================== */

.user-data-dump {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.var-dump {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #d4d4d4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Syntax highlighting for var_dump output */
.var-dump .string { color: #ce9178; }
.var-dump .number { color: #b5cea8; }
.var-dump .boolean { color: #569cd6; }
.var-dump .null { color: #569cd6; }
.var-dump .key { color: #9cdcfe; }
.var-dump .array-brackets { color: #ffd700; }

/* ========================================
   Section Actions
   ======================================== */

.section-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.log-count {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

/* ========================================
   Operator Badges
   ======================================== */

.operator-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.operator-mtn {
    background: #ffcc00;
    color: #000;
}

.operator-airtel {
    background: #ff0000;
    color: #fff;
}

.operator-glo {
    background: #00aa00;
    color: #fff;
}

.operator-9mobile,
.operator-9mobile {
    background: #99cc00;
    color: #000;
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* ========================================
   Modal
   ======================================== */

.logs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.hidden {
    display: none !important;
}

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

@media (max-width: 900px) {
    .split-container {
        flex-direction: column;
        height: 100svh;
        min-height: 100svh;
    }
    
    .image-panel {
        flex: 0 0 40svh;
        height: auto;
    }
    
    .form-panel {
        padding: 40px 24px;
        flex: 1 1 auto;
        min-height: auto;
    }
    
    .form-container {
        max-width: 100%;
    }

    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .user-info {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 15px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title,
    .welcome-title {
        font-size: 24px;
    }
    
    .otp-title {
        font-size: 22px;
    }
    
    .form-panel {
        padding: 30px 20px;
    }
    
    .logs-table {
        font-size: 14px;
    }
    
    .logs-table th,
    .logs-table td {
        padding: 10px 8px;
    }
}

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

.action-dropdown {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    background: white;
}

/* ========================================
   Remember Me & Toggle Password
   ======================================== */

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 15px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.forgot-link:hover {
    text-decoration: underline;
}

#togglePwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    font-size: 14px;
    transition: color 0.2s ease;
}

#togglePwd:hover {
    color: var(--accent);
}

/* ========================================
   Code/Monospace elements
   ======================================== */

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* ========================================
   Font Awesome fix
   ======================================== */

[class^="fas"],
[class*=" fas"] {
    display: inline-block;
    width: 1em;
    text-align: center;
}

/* ========================================
   Action Buttons (User Management)
   ======================================== */

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.action-buttons .btn {
    padding: 6px 8px;
    min-width: 32px;
    border-radius: 6px;
}

.action-buttons .btn i {
    margin: 0;
    font-size: 12px;
}

/* ========================================
   Role Badges
   ======================================== */

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-normal,
.role-user {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.role-bizadmin {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.role-techadmin {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.role-admin {
    background: rgba(170, 0, 0, 0.1);
    color: var(--accent);
}

/* ========================================
   Maintenance Page
   ======================================== */
.maintenance-page {
    background: #f8fafc;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    color: #1e293b;
}
.maintenance-page .top-header {
    background: #ffffff;
    padding: 20px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}
.maintenance-page .top-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.maintenance-page .top-header .logo img {
    height: 45px;
    width: auto;
}
.maintenance-page .top-header .logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a5f;
}
.maintenance-page .main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.maintenance-page .maintenance-container {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out;
}
.maintenance-page .icon-container {
    margin-bottom: 24px;
    position: relative;
}
.maintenance-page .maintenance-icon {
    width: 100px;
    height: 100px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}
.maintenance-page .maintenance-icon svg {
    width: 50px;
    height: 50px;
    fill: #d97706;
}
.maintenance-page .gear-icon {
    width: 40px;
    height: 40px;
    background: #fff7ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: absolute;
    bottom: -10px;
    right: 35%;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: spin 5s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.maintenance-page .gear-icon svg {
    width: 20px;
    height: 20px;
    fill: #f59e0b;
}
.maintenance-page .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff7ed;
    border: 1px solid #fde68a;
    color: #b45309;
    border-radius: 9999px;
    margin: 10px 0 16px;
}
.maintenance-page .status-badge .dot {
    width: 10px;
    height: 10px;
    background: #d97706;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.maintenance-page .status-badge span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.maintenance-page .login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.maintenance-page .login-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}
.maintenance-page .login-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.maintenance-page .contact-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    text-align: left;
}
.maintenance-page .contact-info h3 {
    margin-bottom: 10px;
    color: #1e293b;
}
.maintenance-page .contact-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.maintenance-page .contact-info a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.maintenance-page .contact-info a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.maintenance-page .bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.maintenance-page .bg-decoration::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@media (max-width: 768px) {
    .maintenance-page .top-header { padding: 16px 20px; }
    .maintenance-page .top-header .logo img { height: 38px; }
    .maintenance-page .top-header .logo span { font-size: 1rem; }
    .maintenance-page .main-content { padding: 30px 16px; }
    .maintenance-page .maintenance-container { padding: 0 10px; }
    .maintenance-page .title { font-size: 1.6rem; }
    .maintenance-page .subtitle { font-size: 1rem; }
    .maintenance-page .maintenance-icon { width: 90px; height: 90px; }
    .maintenance-page .maintenance-icon svg { width: 45px; height: 45px; }
}
/* ========================================
   Auth Pages Additions (OTP/Reset/Update/Login)
   ======================================== */

/* OTP Inputs */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: nowrap;
}
.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    line-height: 1.2;
    caret-color: var(--accent);
}
.otp-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(170, 0, 0, 0.1);
}
.otp-digit.error {
    border-color: #ef4444;
    background: #fff0f0;
}
.otp-inputs input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}
.otp-inputs input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(170, 0, 0, 0.1);
}
.otp-inputs input.error {
    border-color: #ef4444;
    background: #fff0f0;
}

@media (max-width: 640px) {
    .otp-inputs { gap: 8px; }
    .otp-digit,
    .otp-inputs input {
        width: 44px;
        height: 56px;
        font-size: 22px;
    }
}

/* OTP Verify Button */
.btn-verify {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(170, 0, 0, 0.3);
}
.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.resend-link {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
}
.resend-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.resend-link a:hover {
    text-decoration: underline;
}
.back-link {
    text-align: center;
    margin-top: 16px;
}
.back-link a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}
.back-link a:hover {
    color: var(--accent);
}
.otp-timer {
    text-align: center;
    margin-bottom: 24px;
    font-size: 15px;
    color: var(--muted);
}
.otp-timer span {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}
.otp-timer.expiring span {
    color: #f59e0b;
}
.otp-timer.expired {
    color: #ef4444;
}
.otp-timer.expired span {
    color: #ef4444;
}
.otp-expired-message {
    display: none;
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    margin-bottom: 24px;
    color: #dc2626;
}
.otp-expired-message.show {
    display: block;
}

/* Reset Password */
.btn-reset {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-reset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.reset-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 32px;
}
.link-box {
    background: #f8fafc;
    border: 2px dashed #2563eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}
.link-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
}
.link-url {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #1e293b;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
    margin-bottom: 12px;
}
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.copy-btn:hover { background: #1d4ed8; }
.copy-btn.copied { background: #16a34a; }
.token-display {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}
.token-label {
    font-size: 13px;
    color: #92400e;
    margin-bottom: 8px;
    display: block;
}
.token-value {
    font-size: 24px;
    font-weight: bold;
    color: #b45309;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}
.reset-instruction {
    font-size: 13px;
    color: #64748b;
    margin-top: 16px;
    text-align: center;
}

/* Update Password */
.update-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 32px;
}
.btn-update {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(170, 0, 0, 0.3);
}
.btn-update:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.email-display {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin: 16px 0;
    font-size: 14px;
    color: #64748b;
}
.email-display strong { color: #1e293b; }
.password-requirements { font-size: 12px; color: #666; margin-top: 4px; }
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.toggle-password:hover { color: #64748b; }
.token-display input {
    text-align: center;
    font-size: 18px;
    letter-spacing: 2px;
}
.token-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Responsive overrides for Auth pages */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .image-panel {
        display: none !important;
        flex: none;
        height: 200px;
    }
    
    .form-panel {
        flex: 1;
        padding: 24px;
        width: 100%;
        min-height: 100vh;
        /* Ensure scrolling if content overflows */
        overflow-y: auto;
        justify-content: flex-start; /* Align to top to prevent center-cut-off */
        padding-top: 40px;
    }
    
    .form-container {
        width: 100%;
        max-width: 100%;
        margin-bottom: 40px; /* Space for bottom elements */
    }
}
