/**
 * Flexi Access Bank - Main Stylesheet
 * Theme: Corporate Red & Dark Professional
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary: #DC2626;
    --primary-dark: #B91C1C;
    --primary-light: #FEE2E2;
    --primary-hover: #991B1B;
    --secondary: #1F1F1F;
    --secondary-light: #374151;
    --accent: #F59E0B;
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --dark: #111827;
    --dark-800: #1F2937;
    --dark-700: #374151;
    --gray: #6B7280;
    --gray-light: #9CA3AF;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--secondary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(220,38,38,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220,38,38,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    max-height: 70px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.login-logo p {
    color: var(--gray);
    font-size: 13px;
    margin-top: 4px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--secondary);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

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

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

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

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #DC2626;
}

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

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

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

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

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

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

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--secondary);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

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

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

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 2px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand img {
    height: 40px;
}

.sidebar-brand-text {
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
}

.sidebar-brand-text span {
    color: var(--primary);
}

.sidebar-nav {
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-light);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

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

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

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius);
}

.user-mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

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

.user-mini-name {
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-role {
    color: var(--gray-light);
    font-size: 11px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    padding: 8px;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

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

.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-icon-btn:hover {
    background: var(--gray-200);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.header-user:hover {
    background: var(--gray-100);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

.header-user-info {
    line-height: 1.3;
}

.header-user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--secondary);
}

.header-user-role {
    font-size: 11px;
    color: var(--gray);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    padding: 32px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

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

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

.stat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

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

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

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

.stat-card-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.stat-card-change {
    font-size: 12px;
    font-weight: 600;
}

.stat-card-change.positive {
    color: var(--success);
}

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

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================================
   BALANCE DISPLAY
   ============================================ */
.balance-card {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark-800) 100%);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220,38,38,0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-card-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.balance-card-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.balance-card-meta {
    display: flex;
    gap: 24px;
}

.balance-card-meta-item {
    display: flex;
    flex-direction: column;
}

.balance-card-meta-label {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-card-meta-value {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
}

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

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--secondary);
    vertical-align: middle;
}

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

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

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.success {
    background: var(--success-light);
    color: #059669;
}

.status-badge.pending {
    background: var(--warning-light);
    color: #D97706;
}

.status-badge.danger {
    background: var(--danger-light);
    color: #DC2626;
}

.status-badge.info {
    background: var(--info-light);
    color: #2563EB;
}

.status-badge.secondary {
    background: var(--gray-100);
    color: var(--gray);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

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

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

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-lg {
    max-width: 800px;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================================
   ALERTS / TOASTS
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: var(--success-light);
    color: #059669;
    border: 1px solid #A7F3D0;
}

.alert-danger {
    background: var(--danger-light);
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: var(--warning-light);
    color: #D97706;
    border: 1px solid #FDE68A;
}

.alert-info {
    background: var(--info-light);
    color: #2563EB;
    border: 1px solid #BFDBFE;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   PIN INPUT
   ============================================ */
.pin-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.pin-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* ============================================
   COPY TO CLIPBOARD
   ============================================ */
.copy-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-field input {
    flex: 1;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.copy-btn {
    padding: 10px 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ============================================
   QR CODE SECTION
   ============================================ */
.qr-section {
    text-align: center;
    padding: 24px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload {
    border: 2px dashed var(--gray-200);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload input {
    display: none;
}

.file-upload-icon {
    font-size: 40px;
    color: var(--gray);
    margin-bottom: 12px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--gray);
}

.file-upload-text span {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray);
    transition: var(--transition);
}

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

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

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

.step.active .step-label {
    color: var(--primary);
}

/* ============================================
   GATE INPUT SECTIONS
   ============================================ */
.gate-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.gate-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gate-section h4 .icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   POPUP OVERLAY
   ============================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-box {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: popupIn 0.4s ease;
}

@keyframes popupIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--warning-light);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.popup-message {
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================
   TICKET STYLES
   ============================================ */
.ticket-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

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

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

.ticket-id {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.ticket-subject {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ticket-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray);
}

.ticket-reply {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 12px;
    margin-left: 24px;
}

.ticket-reply.admin {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

/* ============================================
   KYC STATUS
   ============================================ */
.kyc-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 13px;
}

.kyc-status.pending {
    background: var(--warning-light);
    color: #D97706;
}

.kyc-status.verified {
    background: var(--success-light);
    color: #059669;
}

.kyc-status.rejected {
    background: var(--danger-light);
    color: #DC2626;
}

/* ============================================
   INVESTMENT TIERS
   ============================================ */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.investment-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.investment-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.investment-card.featured {
    border-color: var(--primary);
    position: relative;
}

.investment-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 4px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
}

.investment-tier {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.investment-rate {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.investment-rate span {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

.investment-duration {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 20px;
}

.investment-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.investment-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.investment-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   LOAN APPLICATION
   ============================================ */
.loan-calculator {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 24px;
}

.loan-result {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
}

.loan-result-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.loan-result-label {
    font-size: 13px;
    opacity: 0.9;
}

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

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

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

.loading {
    animation: pulse 1.5s ease infinite;
}

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

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--gray);
    font-size: 32px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.empty-state p {
    color: var(--gray);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   SEARCH
   ============================================ */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.pagination a {
    background: var(--white);
    color: var(--secondary);
    border: 1px solid var(--gray-200);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination span {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .header-user-info {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 28px;
    }
    
    .balance-card-value {
        font-size: 28px;
    }
    
    .modal {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .balance-card-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   DARK MODE OVERRIDES (if needed)
   ============================================ */
body.dark-mode {
    background: var(--dark);
    color: var(--gray-200);
}

body.dark-mode .card,
body.dark-mode .stat-card {
    background: var(--dark-800);
    border-color: var(--dark-700);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
