/* ==========================================
   CSS DESIGN SYSTEM: TUSAIDIANE - OLELE KWANZA
   ========================================== */

/* Variables and Tokens */
:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(99, 102, 241, 0.4);
    --glow-color: rgba(99, 102, 241, 0.15);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: var(--bg-gradient);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0 0 0;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 2rem 1rem;
    perspective: 1000px;
}

/* Form Card (Glassmorphism) */
.form-card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    padding: 2.5rem;
    width: 100%;
    transition: var(--transition-smooth);
}

/* Header Area */
.form-header {
    margin-bottom: 2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, #a855f7 100%);
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area h2 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 1px;
}

/* Progress bar */
.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    width: 20%;
    background: linear-gradient(to right, var(--color-primary), #a855f7);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps Indicators */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.step-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.step-badge.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

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

/* Form Steps Layout */
.form-step {
    display: none;
    animation: slideIn 0.4s ease-out forwards;
}

.form-step.active {
    display: block;
}

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

.step-title {
    margin-bottom: 2rem;
    border-left: 3px solid var(--color-primary);
    padding-left: 1rem;
}

.step-title h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: white;
    margin-bottom: 0.4rem;
}

.step-title p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Input Fields and Forms */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.required {
    color: var(--color-danger);
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="password"],
select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--input-focus);
    background: rgba(15, 23, 42, 0.8);
}

input.uppercase {
    text-transform: uppercase;
}

::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 2rem;
    padding: 0.6rem 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    -webkit-user-select: none;
    user-select: none;
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--input-border);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: var(--transition-smooth);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--color-primary);
}

.radio-label input:checked + .radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Photo Upload Box */
.photo-upload-box {
    width: 180px;
    height: 210px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-md);
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
}

.photo-upload-box:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--glow-color);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 0.5rem;
    pointer-events: none;
}

.upload-placeholder svg {
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.photo-upload-box:hover .upload-placeholder svg {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.upload-placeholder .small-text {
    font-size: 0.7rem;
    opacity: 0.7;
}

.photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    position: absolute;
    top: 0;
    left: 0;
}

.remove-photo-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 15;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
}

.remove-photo-btn:hover {
    background: var(--color-danger-hover);
}

.hidden {
    display: none !important;
}

/* Dependents List */
.dependents-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dependent-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.dependent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dependent-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

.remove-dependent-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

.remove-dependent-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

/* Tables in Step 4 */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    background: rgba(15, 23, 42, 0.3);
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(30, 41, 59, 0.6);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.data-table input {
    background: transparent;
    border: none;
    padding: 0.4rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 0;
    font-size: 0.9rem;
}

.data-table input:focus {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--color-primary);
    box-shadow: none;
}

/* Declaration and signature */
.declaration-box {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: center;
}

.declaration-box p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
}

.signature-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.signature-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.signature-pad-container {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.signature-pad-container canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.pad-instruction {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Utility classes */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}
.flex-column {
    flex-direction: column;
}

/* Button UI */
.btn {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: #334155;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.05);
}

.btn-secondary:hover {
    background: #475569;
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: white;
    background: rgba(255, 255, 255, 0.02);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--color-success-hover) 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--color-danger-hover) 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Status Loading Spinner */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-md);
    margin: 1.5rem 0;
    border: 1px solid rgba(255,255,255,0.05);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#statusMessage {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .span-8, .span-6, .span-4, .span-3 {
        grid-column: span 12;
    }
    body {
        padding: 1rem 0.5rem;
    }
    .form-card {
        padding: 1.5rem;
    }
    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    .photo-upload-box {
        margin: 1rem auto;
    }
    .form-actions {
        flex-direction: column-reverse;
        gap: 1rem;
        width: 100%;
    }
    .form-actions button {
        width: 100%;
    }
}


/* ==========================================================================
   PDF DOCUMENT REPLICATION STYLES (Strict A4 Layout, Black & White Print Theme)
   ========================================================================== */

#pdf-template {
    background: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10.5pt;
    line-height: 1.35;
    width: 794px; /* A4 printable area width */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pdf-page {
    width: 794px;
    padding: 40px 50px; /* Traditional page margins */
    box-sizing: border-box;
    position: relative;
    background: #ffffff;
    page-break-after: always; /* Force break after each page */
}

/* Page Break */
.pdf-page-break {
    page-break-after: always;
    height: 0;
    border: none;
    margin: 0;
    padding: 0;
}

/* Header */
.pdf-header {
    margin-bottom: 22px;
    border-bottom: 3px double #000000;
    padding-bottom: 8px;
}

.pdf-title-main {
    font-size: 16pt;
    font-weight: bold;
    color: #000000;
    margin: 0 0 3px 0;
    letter-spacing: 0.5px;
}

.pdf-title-sub {
    font-size: 12pt;
    font-weight: bold;
    color: #000000;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Sections */
.pdf-section {
    margin-bottom: 16px;
}

.pdf-section-title {
    font-size: 10.5pt;
    font-weight: bold;
    color: #000000; /* Pure black text */
    margin: 0 0 4px 0;
    text-transform: uppercase;
    border-bottom: 1px solid #000000;
    padding-bottom: 2px;
    display: inline-block;
    width: 100%;
}

.pdf-subsection-title {
    font-size: 9.5pt;
    font-weight: bold;
    color: #000000;
    margin: 10px 0 6px 0;
    text-transform: uppercase;
}

.pdf-section-instruction {
    font-size: 8.5pt;
    font-style: italic;
    margin: 0 0 8px 0;
    color: #444444;
}

/* Row elements */
.pdf-row-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

/* Tables styles for PDF */
.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 9.5pt;
    color: #000000;
}

.pdf-table td {
    padding: 5px 6px;
    vertical-align: middle;
}

/* Borderless inputs table */
.borderless-table td {
    border: none;
    padding: 3px 4px;
}

/* Lines for text inputs in printable forms */
.pdf-value {
    display: inline-block;
    border-bottom: 1px solid #000000; /* Solid black underline */
    min-height: 18px;
    min-width: 120px;
    padding: 0 4px;
    font-weight: bold;
    color: #000000; /* Pure black text */
}

.pdf-checkbox-box {
    font-weight: bold;
    font-family: monospace;
    font-size: 11pt;
    color: #000000;
}

/* Info fields with dots/lines matching original */
.info-line-table td {
    border: none;
    padding: 5px 4px;
}

/* Photo Box */
.pdf-photo-box-wrapper {
    width: 130px;
    display: flex;
    justify-content: flex-end;
}

.pdf-photo-box {
    width: 110px;
    height: 130px;
    border: 1px solid #000000;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pdf-photo-label {
    font-size: 7.5pt;
    color: #444444;
    padding: 4px;
    pointer-events: none;
    line-height: 1.2;
}

.pdf-inserted-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Grid data tables (with actual solid black lines) */
.pdf-data-grid,
.pdf-dependents-table {
    width: 100%;
    margin-top: 6px;
    border: 1px solid #000000;
}

.pdf-data-grid th,
.pdf-data-grid td,
.pdf-dependents-table th,
.pdf-dependents-table td {
    border: 1px solid #000000;
    padding: 5px 6px;
}

.pdf-data-grid th,
.pdf-dependents-table th {
    background: #f8fafc;
    font-weight: bold;
    color: #000000; /* Black font for headers */
    text-align: left;
    font-size: 9pt;
}

.pdf-dependents-table th {
    text-align: center;
}

/* Dependent photo slot inside PDF table */
.pdf-dep-photo-slot {
    width: 35px;
    height: 45px;
    border: 1px solid #000000;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.pdf-dep-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-dep-photo-placeholder {
    font-size: 5.5pt;
    color: #555555;
    text-align: center;
}

/* Signatures section */
.pdf-declaration-text {
    font-size: 9.5pt;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 15px;
    font-style: italic;
    color: #000000;
}

.pdf-signature-block {
    margin-top: 10px;
}

.compact-table td {
    padding: 6px 4px;
}

.pdf-sig-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.pdf-signature-img {
    position: absolute;
    bottom: 2px;
    left: 20px;
    height: 30px;
    max-width: 180px;
    object-fit: contain;
}

.pdf-dotted-line {
    font-weight: normal;
    color: #000000; /* Pure black dots */
    font-size: 11pt;
    letter-spacing: 0.5px;
}

.pdf-flex-1 {
    flex: 1;
}

/* Make sure pdf values stand out in bold pure black */
.pdf-value, .pdf-checkbox-box {
    color: #000000;
}

/* Bold span values inside A4 data grid tables */
.pdf-data-grid td span,
.pdf-dependents-table td span {
    font-weight: bold;
}

/* ==========================================
   ADMIN PORTAL STYLES (ADDED IN ACT MODE)
   ========================================== */

/* Floating Admin Button */
.admin-float-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 0.6rem 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.admin-float-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Modal Overlay & Login Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.modal-card {
    background: #1e293b;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-premium);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Admin Dashboard Specifics */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Actions in Admin Table */
.admin-actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* === Inline style cleanup additions === */

#pdf-container-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 794px;
    z-index: -1000;
    opacity: 0;
    pointer-events: none;
}

.admin-header-flex {
    justify-content: space-between;
    width: 100%;
    display: flex;
    align-items: center;
}

.admin-logo-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.admin-logout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.admin-search-bar {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.admin-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
}

.admin-table-container {
    margin-top: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.modal-input-no-transform {
    text-transform: none;
}

.admin-error-message {
    color: var(--color-danger);
    font-size: 0.85rem;
    font-weight: 500;
}

.admin-btn-icon {
    margin-right: 6px;
}

.add-dep-icon {
    margin-right: 8px;
}

.signature-date-wrapper {
    max-width: 250px;
}

/* --- Success Page Styles --- */
.success-header-center {
    text-align: center;
}

.success-logo-area {
    justify-content: center;
    flex-direction: column;
}

.success-logo-icon {
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    font-size: 30px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.success-title {
    color: var(--color-success);
    font-size: 1.8rem;
    margin-top: 10px;
}

.success-content-wrapper {
    padding: 2rem;
    text-align: center;
}

.success-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.success-payment-details {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    max-width: 450px;
    margin: 0 auto 2rem auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.success-payment-row {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.success-payment-row.last {
    margin-bottom: 0;
}

.success-payment-value {
    font-weight: 600;
}

.success-next-steps {
    background: rgba(11, 34, 101, 0.05);
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    text-align: left;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 0 8px 8px 0;
}

.success-next-steps-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

.success-primary-text {
    color: var(--color-primary);
}

.success-actions-wrapper {
    margin-top: 2.5rem;
}

/* Floating Admin Portal Button */
.admin-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.85);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-float-btn:hover {
    background: rgba(79, 70, 229, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-icon {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* === Inline style cleanup additions === */

#pdf-container-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 794px;
    z-index: -1000;
    opacity: 0;
    pointer-events: none;
}

.admin-header-flex {
    justify-content: space-between;
    width: 100%;
    display: flex;
    align-items: center;
}

.admin-logo-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.admin-logout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.admin-search-bar {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.admin-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
}

.admin-table-container {
    margin-top: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.modal-input-no-transform {
    text-transform: none;
}

.admin-error-message {
    color: var(--color-danger);
    font-size: 0.85rem;
    font-weight: 500;
}

.admin-btn-icon {
    margin-right: 6px;
}

.add-dep-icon {
    margin-right: 8px;
}

.signature-date-wrapper {
    max-width: 250px;
}

/* --- Success Page Styles --- */
.success-header-center {
    text-align: center;
}

.success-logo-area {
    justify-content: center;
    flex-direction: column;
}

.success-logo-icon {
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    font-size: 30px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.success-title {
    color: var(--color-success);
    font-size: 1.8rem;
    margin-top: 10px;
}

.success-content-wrapper {
    padding: 2rem;
    text-align: center;
}

.success-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.success-payment-details {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    max-width: 450px;
    margin: 0 auto 2rem auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.success-payment-row {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.success-payment-row.last {
    margin-bottom: 0;
}

.success-payment-value {
    font-weight: 600;
}

.success-next-steps {
    background: rgba(11, 34, 101, 0.05);
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    text-align: left;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 0 8px 8px 0;
}

.success-next-steps-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

.success-primary-text {
    color: var(--color-primary);
}

.success-actions-wrapper {
    margin-top: 2.5rem;
}

/* Floating Admin Portal Button */
.admin-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.85);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-float-btn:hover {
    background: rgba(79, 70, 229, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.admin-btn-icon {
    flex-shrink: 0;
}

.success-description {
    font-size: 1.1rem;
    line-height: 1.6;
}

.saini-mwenyekiti-img {
    max-height: 40px;
    margin-bottom: -15px;
}
