/* Modern white-theme login — shared by admin + applicant portal */

body.hlf-login-page {
    font-family: var(--hlf-font, 'Inter', sans-serif);
    background: #f7f9fc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px 16px;
    color: #1a1f36;
    overflow-x: hidden;
    position: relative;
}

.hlf-login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hlf-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: hlfOrbFloat 18s ease-in-out infinite;
}

.hlf-login-orb--1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.12) 0%, transparent 70%);
    top: -120px;
    right: -80px;
}

.hlf-login-orb--2 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(14, 21, 60, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -60px;
    animation-delay: -6s;
}

.hlf-login-orb--3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(232, 177, 60, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
}

.hlf-login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(14, 21, 60, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 21, 60, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 100%);
}

@keyframes hlfOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -18px) scale(1.05); }
    66% { transform: translate(-16px, 12px) scale(0.96); }
}

.hlf-login-wrap {
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    animation: hlfCardEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hlf-login-wrap.hlf-portal-wide {
    max-width: 980px;
}

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

.hlf-login-brand {
    text-align: center;
    margin-bottom: 28px;
    animation: hlfLogoEnter 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hlf-login-brand img {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(14, 21, 60, 0.08));
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hlf-login-brand img:hover {
    transform: scale(1.02) translateY(-2px);
}

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

.hlf-login-card {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 1px 2px rgba(14, 21, 60, 0.04),
        0 8px 32px rgba(14, 21, 60, 0.08),
        0 0 0 1px rgba(14, 21, 60, 0.04);
    padding: 32px 32px 28px;
    box-sizing: border-box;
    overflow: hidden;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.hlf-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0e153c, #007bff, #e8b13c, #007bff, #0e153c);
    background-size: 200% 100%;
    animation: hlfShimmerBar 6s linear infinite;
}

@keyframes hlfShimmerBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hlf-login-card:hover {
    box-shadow:
        0 2px 4px rgba(14, 21, 60, 0.05),
        0 16px 48px rgba(14, 21, 60, 0.1),
        0 0 0 1px rgba(0, 123, 255, 0.06);
}

.hlf-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #007bff;
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.15);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 16px;
}

.hlf-login-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
    animation: hlfPulseDot 2s ease-in-out infinite;
}

@keyframes hlfPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.hlf-login-card h1 {
    color: #0e153c;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    text-align: left;
}

.hlf-login-subtitle,
.hlf-portal-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0 0 24px;
    padding: 0;
}

.hlf-login-form {
    margin-top: 0;
}

.hlf-login-field,
.hlf-input-group {
    margin-bottom: 20px;
}

.hlf-login-field {
    display: block;
}

.hlf-login-card .form-label,
.hlf-input-group > .form-label {
    display: block;
    color: #475569;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    text-align: left;
    padding: 0;
    transition: color 0.25s ease;
}

.hlf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hlf-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
    transition: color 0.25s ease, transform 0.25s ease;
    z-index: 1;
}

.hlf-login-card .form-control,
.hlf-input-modern {
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    height: 48px;
    padding: 0 16px 0 44px;
    font-size: 0.9375rem;
    color: #1a1f36;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        transform 0.2s ease;
}

.hlf-login-card .form-control::placeholder {
    color: #94a3b8;
}

.hlf-input-wrap:focus-within .form-control,
.hlf-login-card .form-control:focus {
    border-color: #007bff;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(0, 123, 255, 0.12),
        0 2px 8px rgba(0, 123, 255, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.hlf-input-wrap:focus-within .hlf-input-icon {
    color: #007bff;
    transform: translateY(-50%) scale(1.08);
}

.hlf-input-wrap.is-filled .hlf-input-icon {
    color: #64748b;
}

.hlf-login-meta {
    display: block;
    margin: 4px 0 24px;
}

.hlf-remember-me {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.hlf-remember-me:hover {
    color: #0e153c;
}

.hlf-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #007bff;
    cursor: pointer;
}

.hlf-login-actions {
    display: block;
}

.hlf-login-actions-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.hlf-login-actions .btn-hlf-primary,
.hlf-btn-glow {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 12px 24px;
    color: #fff;
    background: linear-gradient(135deg, #0e153c 0%, #1a3a6e 50%, #007bff 100%);
    background-size: 200% 200%;
    box-shadow:
        0 4px 14px rgba(14, 21, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition:
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s ease,
        background-position 0.4s ease;
}

.hlf-login-actions .btn-hlf-primary::after,
.hlf-btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hlf-login-actions .btn-hlf-primary:hover,
.hlf-btn-glow:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 123, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background-position: 100% 50%;
}

.hlf-login-actions .btn-hlf-primary:hover::after,
.hlf-btn-glow:hover::after {
    transform: translateX(100%);
}

.hlf-login-actions .btn-hlf-primary:active,
.hlf-btn-glow:active {
    transform: translateY(0) scale(0.98);
}

.hlf-login-actions .btn-hlf-primary:disabled,
.hlf-btn-glow:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.hlf-login-forgot-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #007bff;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.hlf-login-forgot-link:hover {
    color: #0e153c;
    letter-spacing: 0.01em;
}

.hlf-login-back-link {
    font-size: 0.8125rem;
    color: #64748b;
    background: none;
    border: none;
    padding: 0;
    margin-top: 12px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hlf-login-back-link:hover {
    color: #007bff;
    transform: translateX(-3px);
}

/* Security question reveal */
.hlf-login-security-question {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.04) 0%, rgba(14, 21, 60, 0.03) 100%);
    border: 1px solid rgba(0, 123, 255, 0.12);
    border-radius: 14px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 0.5s ease,
        margin 0.4s ease,
        padding 0.4s ease;
}

#portal-security-block.is-visible .hlf-login-security-question,
.hlf-login-security-question.is-visible {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}

.hlf-login-security-question .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #007bff;
    margin-bottom: 8px;
}

.portal-question-text {
    margin: 0;
    font-weight: 600;
    color: #0e153c;
    font-size: 0.9375rem;
    line-height: 1.45;
}

#portal-security-block {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}

#portal-security-block.is-visible {
    max-height: 400px;
    opacity: 1;
}

#portal-security-block.is-visible .hlf-login-field {
    animation: hlfFieldSlide 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

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

/* Step indicator */
.hlf-login-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.hlf-login-step {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    transition: background 0.3s ease;
}

.hlf-login-step.is-active {
    background: #e2e8f0;
}

.hlf-login-step.is-active::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0e153c, #007bff);
    border-radius: inherit;
    animation: hlfStepFill 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hlf-login-step.is-done {
    background: linear-gradient(90deg, #0e153c, #007bff);
}

@keyframes hlfStepFill {
    from { width: 0; }
    to { width: 100%; }
}

/* Alerts */
.hlf-login-card .alert-danger,
#portal-error {
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    background: rgba(220, 53, 69, 0.06);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.hlf-login-card .alert-danger.is-shake,
#portal-error.is-shake {
    animation: hlfShake 0.45s ease;
}

@keyframes hlfShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Portal dashboard — application list & detail */
.hlf-portal-dashboard {
    padding-top: 8px;
}

.hlf-portal-dashboard > h1 {
    margin-bottom: 4px;
}

.hlf-portal-dashboard .hlf-login-badge {
    margin-bottom: 12px;
}

.hlf-portal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f7;
}

.hlf-portal-header-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.9375rem;
}

.hlf-portal-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0e153c;
    letter-spacing: -0.02em;
}

.hlf-portal-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0e153c;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 8px 14px;
}

.hlf-portal-count-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0e153c, #007bff);
    color: #fff;
    font-size: 0.75rem;
    padding: 0 6px;
}

.hlf-app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.hlf-app-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    overflow: hidden;
    transition:
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    animation: hlfCardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    cursor: pointer;
}

.hlf-app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 123, 255, 0.25);
    box-shadow: 0 12px 32px rgba(14, 21, 60, 0.1);
}

.hlf-app-card-accent {
    height: 4px;
    background: linear-gradient(90deg, #0e153c, #007bff);
}

.hlf-app-card-accent--draft { background: linear-gradient(90deg, #64748b, #94a3b8); }
.hlf-app-card-accent--success { background: linear-gradient(90deg, #059669, #34d399); }
.hlf-app-card-accent--danger { background: linear-gradient(90deg, #dc2626, #f87171); }
.hlf-app-card-accent--info { background: linear-gradient(90deg, #0e153c, #007bff); }

.hlf-app-card-body {
    padding: 20px;
}

.hlf-app-card-title {
    margin: 0 0 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0e153c;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.hlf-app-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.hlf-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
}

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

.hlf-status-pill--secondary { color: #475569; background: #f1f5f9; }
.hlf-status-pill--info { color: #0369a1; background: rgba(0, 123, 255, 0.1); }
.hlf-status-pill--success { color: #047857; background: rgba(16, 185, 129, 0.12); }
.hlf-status-pill--danger { color: #b91c1c; background: rgba(239, 68, 68, 0.1); }

.hlf-stage-tag {
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 5px 10px;
}

.hlf-app-card-date {
    margin: 0 0 16px;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.hlf-app-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #007bff;
    background: none;
    border: none;
    padding: 0;
    transition: gap 0.2s ease, color 0.2s ease;
}

.hlf-app-card:hover .hlf-app-card-action {
    gap: 10px;
    color: #0e153c;
}

.hlf-portal-empty {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px dashed #dbe3ee;
    border-radius: 16px;
}

.hlf-portal-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.hlf-portal-empty h3 {
    margin: 0 0 8px;
    font-size: 1.125rem;
    color: #0e153c;
}

.hlf-portal-empty p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.9375rem;
}

.hlf-portal-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

.hlf-portal-toolbar .btn-outline-primary {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 18px;
}

.hlf-portal-toolbar .btn-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.hlf-portal-toolbar .btn-link:hover {
    color: #007bff;
}

/* Detail view */
.hlf-detail-view {
    animation: hlfCardEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hlf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hlf-back-btn:hover {
    color: #007bff;
    border-color: rgba(0, 123, 255, 0.3);
    background: #fff;
    transform: translateX(-3px);
}

.hlf-detail-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 50%, rgba(0, 123, 255, 0.04) 100%);
    border: 1px solid #e8edf4;
    border-radius: 16px;
}

.hlf-detail-eyebrow {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #007bff;
}

.hlf-detail-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: #0e153c;
    letter-spacing: -0.02em;
}

.hlf-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.hlf-stat-chip {
    min-width: 120px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(14, 21, 60, 0.04);
}

.hlf-stat-chip span {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

.hlf-stat-chip strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0e153c;
}

.hlf-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hlf-detail-section {
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.hlf-detail-section:hover {
    box-shadow: 0 4px 16px rgba(14, 21, 60, 0.06);
}

.hlf-detail-section-title {
    margin: 0;
    padding: 14px 18px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0e153c;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.hlf-detail-section-body {
    padding: 0;
}

.hlf-detail-repeaters {
    /* separates scalar fields from repeater blocks when both exist */
}

.hlf-detail-section-body > .hlf-detail-grid + .hlf-detail-repeaters {
    border-top: 1px solid #eef2f7;
}

.hlf-detail-repeater {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.hlf-detail-repeater:last-child {
    border-bottom: none;
}

.hlf-detail-repeater-title {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-transform: capitalize;
}

.hlf-detail-table-wrap {
    overflow-x: auto;
    border: 1px solid #e8edf4;
    border-radius: 10px;
}

.hlf-detail-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.hlf-detail-table thead {
    background: #f8fafc;
}

.hlf-detail-table th {
    padding: 10px 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    text-align: left;
    border-bottom: 1px solid #e8edf4;
    white-space: nowrap;
}

.hlf-detail-table td {
    padding: 10px 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.hlf-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.hlf-detail-table tbody tr:hover td {
    background: rgba(0, 123, 255, 0.03);
}

.hlf-detail-list {
    margin: 0;
    padding: 0 0 0 20px;
    color: #1e293b;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.hlf-detail-list li {
    margin-bottom: 4px;
}

.hlf-detail-list li:last-child {
    margin-bottom: 0;
}

.hlf-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
}

.hlf-detail-field {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
}

.hlf-detail-field dt {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: capitalize;
}

.hlf-detail-field dd {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
    word-break: break-word;
}

.hlf-detail-field dd pre {
    margin: 0;
    font-size: 0.8125rem;
    white-space: pre-wrap;
    font-family: inherit;
    color: #475569;
}

.hlf-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    padding: 16px 18px;
}

.hlf-doc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hlf-doc-card:hover {
    background: #fff;
    border-color: rgba(0, 123, 255, 0.25);
}

.hlf-doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hlf-doc-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.125rem;
}

.hlf-doc-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0e153c;
    line-height: 1.3;
    word-break: break-word;
}

.hlf-doc-download {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.hlf-doc-download:hover {
    background: #007bff;
    color: #fff;
}

.hlf-detail-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

.hlf-loading-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 32px 0;
    color: #64748b;
    font-size: 0.9375rem;
}

.hlf-loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: hlfSpin 0.7s linear infinite;
}

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

@media (max-width: 576px) {
    .hlf-app-cards {
        grid-template-columns: 1fr;
    }

    .hlf-detail-hero {
        padding: 18px;
    }

    .hlf-detail-grid {
        grid-template-columns: 1fr;
    }

    .hlf-detail-field {
        border-right: none;
    }
}

@media (max-width: 576px) {
    body.hlf-login-page {
        padding: 20px 14px;
    }

    .hlf-login-card {
        padding: 24px 20px 22px;
        border-radius: 16px;
    }

    .hlf-login-brand img {
        max-width: 220px;
    }

    .hlf-login-card h1 {
        font-size: 1.25rem;
    }
}

/* Scholarship offer panel (applicant portal) */
.hlf-offer-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 6px;
}
.hlf-offer-badge--action {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.hlf-offer-badge--accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.hlf-offer-badge--declined {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
}
.hlf-app-card--offer {
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25), 0 8px 24px rgba(15, 23, 42, 0.08);
}
.hlf-offer-panel {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.hlf-offer-intro {
    color: #4b5563;
    font-size: 0.9375rem;
    margin-bottom: 14px;
}
.hlf-offer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.hlf-offer-sign-form {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 16px;
}
.hlf-offer-signed-note {
    margin: 0;
    font-size: 0.9375rem;
}
.hlf-offer-pdf-modal .modal-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.hlf-offer-pdf-frame {
    width: 100%;
    height: min(78vh, 820px);
    border: 0;
    background: #f3f4f6;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
