:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --primary-navy: #1e3a8a;
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --color-red: #dc2626;
    --color-red-bg: #fef2f2;
    --color-red-border: #fecaca;
    --color-red-text: #991b1b;

    --color-orange: #d97706;
    --color-orange-bg: #fffbeb;
    --color-orange-border: #fde68a;
    --color-orange-text: #92400e;

    --color-blue: #2563eb;
    --color-blue-bg: #eff6ff;
    --color-blue-border: #bfdbfe;
    --color-blue-text: #1e40af;

    --color-green: #059669;
    --color-green-bg: #ecfdf5;
    --color-green-border: #a7f3d0;
    --color-green-text: #065f46;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
    --font-en: 'Inter', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: var(--font-ar);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.font-en {
    font-family: var(--font-en);
    letter-spacing: -0.01em;
}

/* Header */
.app-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

.brand-info h1 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

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

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

.current-date-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
}

.current-date-box i {
    color: var(--primary-blue);
}

/* Main Layout */
.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Alerts Banner */
.alerts-banner {
    background: #fff;
    border: 1px solid #fecaca;
    border-right: 5px solid var(--color-red);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease;
}

.banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-red-bg);
    color: var(--color-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-red-text);
    margin-bottom: 2px;
}

.banner-text p {
    font-size: 13px;
    color: var(--text-body);
}

.btn-banner-filter {
    background: var(--color-red);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-banner-filter:hover {
    background: #b91c1c;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

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

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

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-slate { background: #f1f5f9; color: #475569; }
.icon-green { background: #ecfdf5; color: #059669; }
.icon-indigo { background: #e0e7ff; color: #4338ca; }
.icon-red { background: #fef2f2; color: #dc2626; }
.icon-orange { background: #fffbeb; color: #d97706; }

.kpi-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-dim);
}

/* Card Special Highlight States */
.card-alert-red {
    border-color: #fca5a5;
    background: #fffafa;
}

.card-alert-orange {
    border-color: #fde68a;
    background: #fffdf5;
}

.card-highlight-green {
    border-color: #a7f3d0;
}

.collection-progress {
    margin-top: 6px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-green);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-green);
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Table Toolbar */
.table-toolbar {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #fafafa;
}

.search-box {
    position: relative;
    width: 380px;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 40px 10px 36px;
    font-family: var(--font-ar);
    font-size: 13.5px;
    color: var(--text-heading);
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-search-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.filter-pills-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-body);
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s;
}

.pill-btn:hover {
    border-color: var(--border-hover);
    background: #f8fafc;
}

.pill-btn.active {
    background: var(--primary-navy);
    color: #ffffff;
    border-color: var(--primary-navy);
}

.pill-btn.pill-red.active {
    background: var(--color-red);
    border-color: var(--color-red);
}

.pill-btn.pill-orange.active {
    background: var(--color-orange);
    border-color: var(--color-orange);
}

.pill-btn.pill-blue.active {
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.pill-btn.pill-green.active {
    background: var(--color-green);
    border-color: var(--color-green);
}

.pill-badge {
    background: rgba(0, 0, 0, 0.08);
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-family: var(--font-en);
    font-weight: 700;
}

.pill-btn.active .pill-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

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

.tenants-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 13.5px;
}

.tenants-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.tenants-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-body);
    vertical-align: middle;
}

.tenants-table tbody tr {
    transition: background-color 0.15s;
}

.tenants-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Row Highlights based on status */
.tr-overdue {
    background-color: #fffbfb !important;
}

.tr-urgent {
    background-color: #fffef9 !important;
}

/* Tenant Column */
.tenant-cell-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tenant-name-link {
    font-weight: 700;
    color: var(--text-heading);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.tenant-name-link:hover {
    color: var(--primary-blue);
}

.tenant-unit-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.tenant-unit-tag i {
    color: var(--text-dim);
}

/* Phone Cell */
.phone-cell {
    font-weight: 600;
    color: var(--text-body);
    direction: ltr;
    text-align: right;
}

/* Amounts & Balances */
.amount-main {
    font-weight: 700;
    color: var(--text-heading);
}

.payment-cycle-badge {
    font-size: 11px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.balance-split {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paid-indicator {
    font-size: 12px;
    color: var(--color-green);
    font-weight: 600;
}

.remaining-indicator {
    font-size: 12px;
    color: var(--color-red);
    font-weight: 700;
}

.mini-progress {
    width: 90px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: var(--color-green);
    border-radius: 2px;
}

/* Due Date Cell */
.due-date-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.due-date-val {
    font-weight: 600;
    color: var(--text-heading);
}

.due-countdown-tag {
    font-size: 11.5px;
    font-weight: 700;
}

/* Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-red {
    background: var(--color-red-bg);
    color: var(--color-red-text);
    border: 1px solid var(--color-red-border);
}

.badge-orange {
    background: var(--color-orange-bg);
    color: var(--color-orange-text);
    border: 1px solid var(--color-orange-border);
}

.badge-blue {
    background: var(--color-blue-bg);
    color: var(--color-blue-text);
    border: 1px solid var(--color-blue-border);
}

.badge-emerald {
    background: var(--color-green-bg);
    color: var(--color-green-text);
    border: 1px solid var(--color-green-border);
}

.badge-slate {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Action Buttons */
.action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-body);
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-action:hover {
    border-color: var(--border-hover);
    background: #f8fafc;
}

.btn-action-whatsapp {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
}

.btn-action-whatsapp:hover {
    background: #1ebc59;
    border-color: #1ebc59;
    color: #ffffff;
}

.btn-action-pay {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-action-pay:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.btn-action-more {
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-dim);
}

.btn-action-more:hover {
    color: var(--text-heading);
}

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

.empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Standard Buttons */
.btn-primary {
    background: var(--primary-navy);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.btn-success {
    background: var(--color-green);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}

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

.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-whatsapp:hover {
    background: #1ebc59;
}

.btn-light {
    background: #f1f5f9;
    color: var(--text-body);
    border: 1px solid var(--border-color);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-light:hover {
    background: #e2e8f0;
}

.btn-outline {
    background: #ffffff;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}

.modal-box-sm {
    max-width: 480px;
}

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

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-green-bg { background: #ecfdf5; }
.icon-wa-bg { background: #f0fdf4; }
.text-wa { color: #25d366; }

.modal-title-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-title-group p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-heading);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 75vh;
    overflow-y: auto;
}

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

/* Forms */
.form-row {
    display: flex;
    gap: 14px;
}

.flex-1 {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
}

.required {
    color: var(--color-red);
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--font-ar);
    font-size: 13.5px;
    color: var(--text-heading);
    outline: none;
    transition: all 0.15s;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.textarea-sm {
    height: 70px;
    resize: vertical;
}

/* Summary Box in Payment Modal */
.summary-box-soft {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12.5px;
}

.summary-item span {
    color: var(--text-muted);
}

.summary-item strong {
    font-size: 14px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 4px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-body);
}

.custom-checkbox input {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* WhatsApp Preview Bubble */
.wa-preview-card {
    background: #efeae2;
    background-image: radial-gradient(#d1d7db 1px, transparent 1px);
    background-size: 16px 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid #d1d7db;
}

.wa-chat-bubble {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 8px;
    border-top-right-radius: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    font-size: 13.5px;
    line-height: 1.7;
    color: #111b21;
    white-space: pre-line;
}

.wa-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -6px;
}

/* Details Modal Grid & History */
.details-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.d-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.d-label {
    font-size: 11.5px;
    color: var(--text-muted);
}

.d-stat strong {
    font-size: 13.5px;
    color: var(--text-heading);
}

.payments-history-section {
    margin-top: 10px;
}

.payments-history-section h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: right;
}

.history-table th {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* Text Utilities */
.text-red { color: var(--color-red) !important; }
.text-red-dark { color: var(--color-red-text) !important; }
.text-orange { color: var(--color-orange) !important; }
.text-green { color: var(--color-green) !important; }
.text-center { text-align: center; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== LOGIN PAGE STYLES (Clean White Executive Theme) ==================== */
.login-body {
    background: #f8fafc;
    background-image: 
        radial-gradient(#e2e8f0 1px, transparent 1px),
        linear-gradient(to bottom, #ffffff, #f1f5f9);
    background-size: 24px 24px, 100% 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page-container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    margin: auto;
}

.login-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    padding: 36px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-box {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-blue));
    color: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.login-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 6px;
}

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

.login-error-alert {
    background: var(--color-red-bg);
    border: 1px solid var(--color-red-border);
    color: var(--color-red-text);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

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

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

.form-group-login label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-hint-pill {
    font-size: 11px;
    background: #eff6ff;
    color: var(--primary-blue);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-dim);
    font-size: 15px;
    pointer-events: none;
}

.login-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 11px 42px 11px 40px;
    font-family: var(--font-ar);
    font-size: 14px;
    color: var(--text-heading);
    outline: none;
    transition: all 0.2s;
}

.login-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.password-toggle-btn {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

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

.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
}

.btn-login-submit {
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-blue));
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
    transition: all 0.2s;
    margin-top: 6px;
}

.btn-login-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35);
}

.login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.security-badge-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.login-outer-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

/* User Profile Badge in Header */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
}

.btn-logout {
    color: var(--color-red);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #fee2e2;
    background: #fffafa;
    transition: all 0.15s;
}

.btn-logout:hover {
    background: var(--color-red-bg);
    border-color: var(--color-red-border);
}
