﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FPC PORTAL â€” Premium Design System v4.0
   Forces Pay Corps Personnel Data Management Portal
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

:root {
    /* Primary Colors */
    --color-primary: #0A0F1E;
    --color-secondary: #C8102E;
    --color-accent: #FACC15;

    /* Theme Colors */
    --color-bg: #F0F2F5;
    --color-surface: #FFFFFF;
    --color-text: #0F172A;
    --color-text-muted: #64748B;

    /* Premium Accents */
    --glow-accent: rgba(250, 204, 21, 0.35);
    --glow-primary: rgba(10, 15, 30, 0.12);
    --glow-danger: rgba(200, 16, 46, 0.25);

    /* UI Elements */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(10, 15, 30, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.12), 0 12px 20px -8px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px var(--glow-accent), 0 0 40px rgba(250, 204, 21, 0.1);
    --border-radius: 14px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* â”€â”€â”€ Reset & Base â”€â”€â”€ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
.font-heading {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* â”€â”€â”€ Layouts â”€â”€â”€ */

.login-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-sidebar {
    flex: 1;
    background: linear-gradient(160deg, #020408 0%, #0A0F1E 40%, #111a32 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-right: 3px solid var(--color-accent);
}

/* Animated sidebar particles */
.login-sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(250, 204, 21, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 16, 46, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(250, 204, 21, 0.02) 0%, transparent 50%);
    animation: sidebarGlow 12s ease-in-out infinite alternate;
}

.login-sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes sidebarGlow {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.brand {
    position: relative;
    z-index: 1;
}

.logo-image-container {
    width: 85px;
    height: 85px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(250, 204, 21, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(250, 204, 21, 0.1);
    }

    50% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), 0 0 25px rgba(250, 204, 21, 0.25);
    }
}

.main-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.brand h1 {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(250, 204, 21, 0.2);
}

.brand p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
}

.sidebar-footer p {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.login-form-container {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    position: relative;
}

/* subtle grid dots background */
.login-form-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(10, 15, 30, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 3rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    position: relative;
}

.subtitle {
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* â”€â”€â”€ Glass Panel â”€â”€â”€ */

.glass-panel {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* â”€â”€â”€ Category Selector â”€â”€â”€ */

.category-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.cat-btn {
    flex: 1;
    padding: 1.25rem 1rem;
    border: 2px solid var(--glass-border);
    background: var(--color-surface);
    border-radius: 16px;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cat-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent), #f59e0b);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.cat-btn i {
    width: 26px;
    height: 26px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.cat-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.cat-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(250, 204, 21, 0.08);
}

.cat-btn.active {
    background: var(--color-primary);
    border-color: var(--color-accent);
    color: #FFFFFF;
    box-shadow: 0 8px 25px rgba(10, 15, 30, 0.25), 0 0 15px rgba(250, 204, 21, 0.1);
    transform: translateY(-2px);
}

.cat-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--color-accent);
    border-radius: 3px 3px 0 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 40%;
        opacity: 1;
    }
}

/* â”€â”€â”€ Form & Inputs â”€â”€â”€ */

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-left: 0.5rem;
    transition: var(--transition-fast);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1.25rem;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    transition: var(--transition);
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    background: var(--color-surface);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.input-wrapper input:hover {
    border-color: rgba(10, 15, 30, 0.18);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--glow-accent), 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Added elevated shadow */
}

.input-wrapper input:focus::placeholder {
    opacity: 0.3;
    transform: translateX(4px);
}

.input-wrapper input:focus~i,
.input-wrapper input:focus+i {
    color: var(--color-accent);
    transform: scale(1.1);
}

/* â”€â”€â”€ Buttons â”€â”€â”€ */

.btn-primary {
    margin-top: 0.75rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2440 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md), 0 4px 15px rgba(10, 15, 30, 0.15);
    /* Richer baseline shadow */
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 8px 25px rgba(10, 15, 30, 0.3), 0 0 20px rgba(250, 204, 21, 0.2);
    background: linear-gradient(135deg, #111a32 0%, #1f2a4a 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-outline {
    padding: 0.85rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    /* Soft background */
    backdrop-filter: blur(4px);
    border: 2px solid rgba(10, 15, 30, 0.15);
    /* Softer semi-transparent border */
    color: var(--color-primary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-radius: inherit;
}

.btn-outline>* {
    position: relative;
    z-index: 1;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 4px 15px rgba(10, 15, 30, 0.1);
}

.btn-outline:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-ghost {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
    border-radius: 8px;
}

.btn-ghost:hover {
    color: var(--color-accent);
    background: rgba(250, 204, 21, 0.06);
}

.btn-small {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(250, 204, 21, 0.1);
    /* Soft tinted background */
    color: #bfa100;
    /* Darker accent for contrast */
    border: 1.5px solid rgba(250, 204, 21, 0.4);
    /* Softer border */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-small:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    border-color: var(--color-accent);
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
}

.btn-small:active {
    transform: scale(0.98);
}

/* Dedicated CSS for dynamic Row Remove Buttons */
.btn-remove {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    /* Circular pill shape */
    font-size: 1.2rem !important;
    font-weight: bold;
    background: rgba(200, 16, 46, 0.05) !important;
    color: var(--color-secondary) !important;
    border: 2px solid rgba(200, 16, 46, 0.2) !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: var(--color-secondary) !important;
    color: #FFFFFF !important;
    border-color: var(--color-secondary) !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3) !important;
}

.btn-remove:active {
    transform: scale(0.9) rotate(90deg) !important;
}

/* â”€â”€â”€ Onboarding Layout â”€â”€â”€ */

.onboarding-header {
    background: var(--color-surface);
    border-bottom: 3px solid var(--color-accent);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.onboarding-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.logo-accent {
    width: 28px;
    height: 28px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    background: var(--color-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.category-tag {
    background: linear-gradient(135deg, var(--color-secondary), #e01e3a);
    color: #FFFFFF;
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.2);
}

.user-info-text {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.onboarding-main {
    padding-top: 3rem;
    padding-bottom: 5rem;
    background: var(--color-bg);
}

.form-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
}

/* â”€â”€â”€ Stepper â”€â”€â”€ */

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--glass-border), rgba(10, 15, 30, 0.15), var(--glass-border));
    border-radius: 3px;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
}

.step span {
    position: absolute;
    top: 54px;
    white-space: nowrap;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.step.active {
    border-color: var(--color-accent);
    background: var(--color-primary);
    color: #FFFFFF;
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(10, 15, 30, 0.2), 0 0 15px var(--glow-accent);
}

.step.active span {
    color: var(--color-accent);
    font-weight: 700;
}

/* â”€â”€â”€ Onboarding Card â”€â”€â”€ */

.onboarding-card {
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.onboarding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary), var(--color-accent));
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
}

@keyframes gradientSlide {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: stepFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-content h3 {
    margin-bottom: 2rem;
    color: var(--color-primary);
    font-size: 1.4rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.dense-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.dynamic-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    animation: popIn 0.3s var(--transition-bounce);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.section-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 1.5rem 0 0.5rem 0;
}

.section-title {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 4px;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* â”€â”€â”€ Onboarding Inputs (Premium) â”€â”€â”€ */

.onboarding-card input,
.onboarding-card select,
.onboarding-card textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--color-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.onboarding-card input::placeholder,
.onboarding-card select::placeholder {
    color: #94a3b8;
    transition: var(--transition-fast);
}

.onboarding-card input:hover,
.onboarding-card select:hover,
.onboarding-card textarea:hover {
    border-color: rgba(10, 15, 30, 0.12);
    background: #FFFFFF;
}

.onboarding-card input:focus,
.onboarding-card select:focus,
.onboarding-card textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--glow-accent), inset 0 1px 2px rgba(0, 0, 0, 0.01);
}

.onboarding-card input:focus::placeholder {
    opacity: 0.3;
}

.onboarding-card input[readonly] {
    background: #F1F5F9;
    cursor: not-allowed;
    border-color: transparent;
    opacity: 0.7;
}

.onboarding-card input[type="file"] {
    padding: 0.6rem 0.8rem;
    background: var(--color-bg);
    cursor: pointer;
    font-size: 0.82rem;
}

.onboarding-card input[type="file"]::-webkit-file-upload-button {
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 1rem;
    transition: var(--transition);
}

.onboarding-card input[type="file"]::-webkit-file-upload-button:hover {
    background: #1a2440;
}

.onboarding-card select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* â”€â”€â”€ File Upload Zone â”€â”€â”€ */

.file-upload-zone {
    border: 2px dashed rgba(10, 15, 30, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.file-upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.03), rgba(200, 16, 46, 0.02));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.file-upload-zone:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-upload-zone:hover::before {
    opacity: 1;
}

.file-upload-zone i {
    width: 48px;
    height: 48px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.file-upload-zone:hover i {
    color: var(--color-accent);
    transform: scale(1.1);
}

.file-upload-zone p {
    position: relative;
    z-index: 1;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.preview-container img {
    max-width: 150px;
    border-radius: 12px;
    border: 3px solid var(--color-accent);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.15);
}

/* â”€â”€â”€ Form Actions â”€â”€â”€ */

.form-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* â”€â”€â”€ Responsive â”€â”€â”€ */

@media (max-width: 992px) {
    .login-layout {
        flex-direction: column;
    }

    .login-sidebar {
        min-height: auto;
        padding: 2.5rem 1.5rem;
        border-right: none;
        border-bottom: 3px solid var(--color-accent);
    }

    .login-form-container {
        padding: 2rem 1rem;
    }

    .login-card {
        padding: 2rem;
    }

    .brand h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stepper {
        margin-bottom: 4rem;
    }

    .step {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .step span {
        font-size: 0.6rem;
        top: 44px;
    }

    .stepper::before {
        top: 18px;
    }

    .onboarding-main {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }

    .onboarding-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        padding: 1rem;
    }

    .user-badge {
        padding: 0.35rem 0.6rem;
    }

    .user-email {
        display: none;
    }

    .section-title {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .brand h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .brand p {
        font-size: 1rem;
    }

    .login-card {
        padding: 1.5rem;
        width: 100%;
    }

    .login-card h2 {
        font-size: 1.4rem;
    }

    .category-selector {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cat-btn {
        width: 100%;
        padding: 0.85rem;
        flex-direction: row;
        justify-content: center;
    }

    .dense-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .onboarding-brand span {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-accent {
        width: 20px;
        height: 20px;
    }

    .file-upload-zone {
        padding: 2rem 1rem;
    }

    /* Prevents iOS auto-zoom */
    .input-wrapper input {
        font-size: 16px;
    }
}

/* â”€â”€â”€ Animations â”€â”€â”€ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered entrance for input groups */
.step-content.active .input-group {
    animation: inputSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.step-content.active .input-group:nth-child(1) {
    animation-delay: 0.02s;
}

.step-content.active .input-group:nth-child(2) {
    animation-delay: 0.04s;
}

.step-content.active .input-group:nth-child(3) {
    animation-delay: 0.06s;
}

.step-content.active .input-group:nth-child(4) {
    animation-delay: 0.08s;
}

.step-content.active .input-group:nth-child(5) {
    animation-delay: 0.10s;
}

.step-content.active .input-group:nth-child(6) {
    animation-delay: 0.12s;
}

.step-content.active .input-group:nth-child(7) {
    animation-delay: 0.14s;
}

.step-content.active .input-group:nth-child(8) {
    animation-delay: 0.16s;
}

.step-content.active .input-group:nth-child(9) {
    animation-delay: 0.18s;
}

.step-content.active .input-group:nth-child(10) {
    animation-delay: 0.20s;
}

@keyframes inputSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* â”€â”€â”€ Custom Scrollbar â”€â”€â”€ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary), #1a2440);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* â”€â”€â”€ Validation â”€â”€â”€ */

.input-error {
    border-color: var(--color-secondary) !important;
    background-color: rgba(200, 16, 46, 0.04) !important;
    box-shadow: 0 0 0 4px var(--glow-danger) !important;
    animation: inputShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes inputShake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-3px);
    }

    40%,
    60% {
        transform: translateX(3px);
    }
}

.input-error:focus {
    box-shadow: 0 0 0 4px var(--glow-danger) !important;
}

.required-asterisk {
    color: var(--color-secondary);
    margin-left: 2px;
    font-weight: bold;
    font-size: 1.1em;
}

.hidden {
    display: none !important;
}

/* â”€â”€â”€ Selection Color â”€â”€â”€ */

::selection {
    background: var(--color-accent);
    color: var(--color-primary);
}

::-moz-selection {
    background: var(--color-accent);
    color: var(--color-primary);
}

/* â”€â”€â”€ Review Screen â”€â”€â”€ */

.review-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-header {
    text-align: center;
    padding: 1.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 2px solid var(--color-accent);
    margin-bottom: 0.5rem;
}

.review-header h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    display: block;
}

.review-section {
    background: var(--color-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.review-section-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.review-section-header i {
    color: var(--color-accent);
}

.review-rows {
    display: flex;
    flex-direction: column;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 1.25rem;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.88rem;
    transition: background 0.15s;
}

.review-row:last-child {
    border-bottom: none;
}

.review-row:nth-child(even) {
    background: rgba(10, 15, 30, 0.025);
}

.review-label {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 160px;
    flex-shrink: 0;
}

.review-value {
    color: var(--color-text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.review-notice {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 10px;
    font-size: 0.83rem;
    color: var(--color-text-muted);
    gap: 0.5rem;
}

.review-notice i {
    color: var(--color-accent);
    flex-shrink: 0;
}

/* â”€â”€â”€ PDF Preview Banner (Review Step) â”€â”€â”€ */

.review-pdf-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb, 198, 160, 79), 0.08), rgba(var(--color-accent-rgb, 198, 160, 79), 0.03));
    border: 1px solid var(--color-accent);
    border-radius: 12px;
    flex-wrap: wrap;
}

.review-pdf-banner--warn {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.4);
    gap: 0.75rem;
}

.review-pdf-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.review-pdf-banner-inner strong {
    display: block;
    font-size: 0.95rem;
    color: var(--color-primary);
}

.btn-pdf-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.btn-pdf-preview:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   OFFICER RECORD CARD  â€” PDF-like Preview (Step 4)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.officer-record-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Top action bar above the card */
.record-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: rgba(10, 15, 30, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.record-action-bar p {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    margin: 0;
}

.btn-print-record {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-print-record:hover {
    background: #1a2440;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-hrm-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-hrm-pdf:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* The white paper card */
.officer-record {
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12px;
    color: #000;
    line-height: 1.4;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* â”€â”€ Document Header â”€â”€ */
.record-doc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 3px double #000;
    background: #f8f8f8;
}

.record-doc-header-center {
    text-align: center;
    flex: 1;
}

.record-doc-header-center .record-main-title {
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 2px;
    font-family: 'Times New Roman', serif;
}

.record-doc-header-center .record-subtitle {
    font-size: 11px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 3px;
}

.record-doc-header-center .record-form-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: 2px solid #000;
    display: inline-block;
    padding: 3px 12px;
    margin-top: 4px;
}

.record-crest {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.record-crest img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.record-crest-placeholder {
    width: 65px;
    height: 65px;
    border: 2px solid #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    text-align: center;
    color: #555;
    font-weight: bold;
    line-height: 1.2;
}

/* â”€â”€ Identity + Photo Block â”€â”€ */
.record-identity-block {
    display: flex;
    border-bottom: 1px solid #000;
}

.record-identity-table {
    flex: 1;
    border-collapse: collapse;
}

.record-identity-table td {
    border: 1px solid #000;
    padding: 4px 7px;
    vertical-align: middle;
    font-size: 11.5px;
}

.record-identity-table td.rec-label {
    font-weight: bold;
    background: #f0f0f0;
    white-space: nowrap;
    width: 38%;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.4px;
}

.record-identity-table td.rec-value {
    font-size: 12px;
    font-weight: bold;
    color: #111;
}

.record-photo-cell {
    width: 110px;
    min-width: 110px;
    border-left: 2px solid #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: #fafafa;
}

.record-photo-cell img {
    width: 96px;
    height: 118px;
    object-fit: cover;
    border: 1px solid #666;
    display: block;
}

.record-photo-cell .photo-label {
    font-size: 9px;
    text-align: center;
    color: #555;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* â”€â”€ Section headers inside the record â”€â”€ */
.record-section-bar {
    background: #0A0F1E;
    color: #FACC15;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 8px;
    border-bottom: 1px solid #000;
}

/* â”€â”€ Generic bordered tables inside record â”€â”€ */
.record-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.record-data-table th {
    background: #e8e8e8;
    border: 1px solid #000;
    padding: 4px 7px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.4px;
    text-align: left;
}

.record-data-table td {
    border: 1px solid #999;
    padding: 4px 7px;
    vertical-align: top;
}

.record-data-table tr:nth-child(even) td {
    background: #fafafa;
}

.record-data-table td.td-label {
    font-weight: bold;
    background: #f0f0f0;
    white-space: nowrap;
    font-size: 10px;
    text-transform: uppercase;
    width: 30%;
}

.record-data-table td.td-empty {
    color: #bbb;
    font-style: italic;
    font-size: 10px;
}

/* â”€â”€ Two-column sub-grid for family / NOK â”€â”€ */
.record-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #000;
}

.record-two-col>div {
    border-right: 1px solid #000;
}

.record-two-col>div:last-child {
    border-right: none;
}

/* â”€â”€ Signature / declaration strip â”€â”€ */
.record-footer-strip {
    border-top: 2px double #000;
    padding: 8px 14px;
    background: #f8f8f8;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.record-footer-strip .declaration {
    font-style: italic;
    color: #333;
    max-width: 60%;
}

.record-footer-strip .sig-block {
    text-align: center;
}

.record-footer-strip .sig-line {
    border-top: 1px solid #000;
    width: 180px;
    margin: 18px auto 3px;
}

.record-footer-strip .sig-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

/* â”€â”€ Passport Upload Sample Guide â”€â”€ */
.passport-guide {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.passport-guide-sample {
    flex-shrink: 0;
    width: 72px;
    height: 88px;
    border: 1.5px solid #d97706;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.passport-guide-sample svg {
    width: 100%;
    height: 100%;
}

.passport-guide-text {
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.5;
}

.passport-guide-text strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    color: #78350f;
}

.passport-guide-text ul {
    margin: 0.25rem 0 0 1rem;
    padding: 0;
}

/* â”€â”€ Print Styles â€” show only the record card â”€â”€ */
@media print {
    body>* {
        display: none !important;
    }

    .officer-record-print-target {
        display: block !important;
    }

    .officer-record-wrapper {
        display: block;
    }

    .record-action-bar {
        display: none !important;
    }

    .officer-record {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ── Mobile Responsive Overrides ── */
@media (max-width: 768px) {

    /* Prevent horizontal wrap and scrolling globally */
    html,
    body,
    .app-container {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }

    /* Adjust padding safely to avoid pushing containers out of bounds */
    .form-container {
        padding: 0 0.5rem !important;
    }

    .onboarding-card {
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Convert all dense grids to vertical flex columns */
    .dense-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    /* Force all dynamic arrays (JHS, SHS, Units, etc) to stack instead of attempting inline grids */
    .row-fields {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
        border: 1px solid var(--glass-border) !important;
        padding: 1rem !important;
        border-radius: 8px !important;
        background: rgba(10, 15, 30, 0.02) !important;
        box-sizing: border-box !important;
    }

    /* Remove flex layouts from review rows so text wraps neatly downward */
    .review-row {
        flex-direction: column !important;
        gap: 0.2rem !important;
        padding: 0.75rem 1rem !important;
    }

    .review-label {
        min-width: 0 !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 2px !important;
    }

    .review-value {
        text-align: left !important;
        width: 100% !important;
    }

    /* Input overrides for sanity */
    input,
    select,
    textarea {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Login Layout collapsing */
    .login-layout {
        flex-direction: column !important;
    }

    .login-sidebar {
        padding: 2rem 1.5rem !important;
        border-right: none !important;
        border-bottom: 3px solid var(--color-accent) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .login-form-container {
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .login-card {
        padding: 2rem 1rem !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    /* Stepper scaling */
    .stepper {
        padding: 0 !important;
        margin-bottom: 2rem !important;
    }

    .step {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }

    .step span {
        display: none !important;
        /* Hide label texts to preserve viewport width */
    }

    .stepper::before {
        top: 16px !important;
        left: 16px !important;
        right: 16px !important;
    }

    /* Footer buttons */
    .onboarding-footer {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem !important;
    }

    .onboarding-footer button {
        width: 100% !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    /* Record Preview overrides to prevent PDF mockup from breaking mobile width */
    .officer-record-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
    }

    .officer-record {
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: unset !important;
        font-size: 10px !important;
    }

    .record-identity-block {
        flex-direction: column !important;
    }

    .record-identity-table td.rec-label {
        width: auto !important;
        white-space: normal !important;
    }

    .record-photo-cell {
        width: 100% !important;
        min-width: 0 !important;
        border-left: none !important;
        border-top: 2px solid #000 !important;
    }

    .record-crest img {
        width: 45px !important;
        height: 45px !important;
    }

    .record-doc-header-center .record-main-title {
        font-size: 13px !important;
    }

    .record-data-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

/* ─── Progress Bar ─── */
.progress-container {
    width: 100%;
    background: rgba(10, 15, 30, 0.05);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.5rem;
    display: none;
    /* Hidden by default */
    border: 1px solid var(--glass-border);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes progressPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.progress-bar.active {
    animation: progressPulse 1.5s infinite ease-in-out;
}

/* ─── Custom Modal & Overlay ─── */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 90%;
    max-width: 400px;
}

.custom-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.custom-modal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Dark mode support for modal */
@media (prefers-color-scheme: dark) {
    .custom-modal .modal-content {
        background: rgba(30, 41, 59, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
    }
}

.modal-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(10, 15, 30, 0.05);
    /* Default */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-icon-container i {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.custom-modal h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.custom-modal p {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Button overrides for modal specifically */
.custom-modal .btn-primary {
    width: 100%;
    margin: 0;
}

/* ─── State Modifiers for Modal ─── */

.custom-modal.error .modal-icon-container {
    background: rgba(200, 16, 46, 0.1);
}

.custom-modal.error .modal-icon-container i {
    color: var(--color-secondary);
}

.custom-modal.warning .modal-icon-container {
    background: rgba(250, 204, 21, 0.15);
}

.custom-modal.warning .modal-icon-container i {
    color: #eab308;
}

.custom-modal.success .modal-icon-container {
    background: rgba(34, 197, 94, 0.1);
}

.custom-modal.success .modal-icon-container i {
    color: #22c55e;
}

/* ─── Multi-File Upload Widget ─── */

.multi-file-upload-widget {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    background: rgba(10, 15, 30, 0.02);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.multi-file-upload-widget:hover {
    border-color: rgba(10, 15, 30, 0.25);
}

.mfu-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 1.25rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.mfu-drop-area:hover {
    background: rgba(250, 204, 21, 0.05);
}

.mfu-drag-active {
    background: rgba(250, 204, 21, 0.08) !important;
    border-color: var(--color-accent) !important;
}

.mfu-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--glass-border);
}

.mfu-file-list:empty {
    border-top: none;
}

.mfu-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(10, 15, 30, 0.04);
    font-size: 0.82rem;
    color: var(--color-text);
    transition: background 0.15s ease;
}

.mfu-file-item:last-child {
    border-bottom: none;
}

.mfu-file-item:hover {
    background: rgba(10, 15, 30, 0.02);
}

.mfu-file-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.mfu-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.mfu-file-size {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.mfu-remove-btn {
    flex-shrink: 0;
    background: rgba(200, 16, 46, 0.06);
    border: 1.5px solid rgba(200, 16, 46, 0.2);
    color: var(--color-secondary);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.mfu-remove-btn:hover {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
    transform: rotate(90deg) scale(1.1);
}