/* ============================================================
   eAppointment Portal - Modern Portal UI
   Shared across all applicant-facing pages
   ============================================================ */

:root {
    --primary: #174ea6;
    --primary-dark: #133d82;
    --primary-soft: #edf4ff;
    --primary-glow: rgba(23, 78, 166, 0.16);
    --success: #1f9d67;
    --success-soft: #e7f8f0;
    --warning: #d9851c;
    --warning-soft: #fff4df;
    --danger: #d84d58;
    --danger-soft: #ffedf0;
    --info: #1693b8;
    --info-soft: #e8f8fd;
    --secondary-soft: #eef2f7;
    --nav-bg: rgba(11, 31, 69, 0.84);
    --nav-border: rgba(255, 255, 255, 0.12);
    --body-bg: #f4f7fb;
    --body-gradient:
        radial-gradient(circle at top left, rgba(23, 78, 166, 0.08), transparent 34%),
        radial-gradient(circle at top right, rgba(31, 157, 103, 0.06), transparent 28%),
        linear-gradient(180deg, #f9fbff 0%, #f4f7fb 44%, #eef3f9 100%);
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(173, 188, 214, 0.32);
    --text-strong: #18324d;
    --text-soft: #60758d;
    --text-muted: #6c7f96;
    --radius-xs: 12px;
    --radius-sm: 16px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --shadow-xs: 0 8px 20px rgba(19, 41, 79, 0.06);
    --shadow-sm: 0 16px 38px rgba(19, 41, 79, 0.08);
    --shadow-md: 0 24px 60px rgba(19, 41, 79, 0.12);
    --shadow-lg: 0 36px 80px rgba(19, 41, 79, 0.14);
    --transition: all 0.24s ease;
}

html {
    scroll-behavior: smooth;
}

body.portal-body,
body.login-body {
    background: var(--body-gradient);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    color: var(--text-strong);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.login-split-body {
    background:
        radial-gradient(circle at top left, rgba(23, 78, 166, 0.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(31, 157, 103, 0.08), transparent 26%),
        linear-gradient(135deg, #eef4fb 0%, #f8fbff 45%, #eef3f9 100%);
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text-strong);
    min-height: 100vh;
    margin: 0;
}

a,
.btn,
.action-card,
.portal-section-card,
.wizard-step-content,
.doc-upload-card,
.status-badge,
.cal-day,
.page-header-badge,
.ack-card {
    transition: var(--transition);
}

.portal-content {
    padding: 2rem 0 3rem;
    flex: 1;
}

.portal-navbar {
    background: linear-gradient(135deg, rgba(9, 28, 62, 0.92), rgba(23, 78, 166, 0.88));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 16px 40px rgba(10, 21, 48, 0.16);
    padding: 0.85rem 0;
}

.portal-navbar .container {
    align-items: center;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-nav-meta .nav-link {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.portal-main-nav {
    margin-left: auto;
    margin-right: 0.75rem;
    gap: 0.35rem;
}

.portal-main-nav .nav-link {
    color: rgba(255, 255, 255, 0.84);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
}

.portal-main-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.portal-logout-btn {
    border-radius: 999px !important;
    padding-inline: 1rem !important;
}

.portal-page-header {
    padding: 1.4rem 0 0.5rem;
}

.page-header-shell {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.15rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
        linear-gradient(135deg, rgba(237, 244, 255, 0.96), rgba(247, 251, 255, 0.84));
    border: 1px solid rgba(189, 204, 229, 0.4);
    box-shadow: var(--shadow-sm);
}

.page-header-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(23, 78, 166, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.8rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-strong);
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 1rem;
    max-width: 720px;
    line-height: 1.7;
}

.page-header-accent {
    position: relative;
    min-width: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.page-header-badge {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(189, 204, 229, 0.55);
    box-shadow: var(--shadow-xs);
    color: var(--primary-dark);
    font-weight: 700;
    white-space: nowrap;
}

.page-header-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
}

.orb-one {
    width: 120px;
    height: 120px;
    right: 0;
    top: 0;
    background: rgba(23, 78, 166, 0.14);
}

.orb-two {
    width: 72px;
    height: 72px;
    right: 90px;
    bottom: 6px;
    background: rgba(31, 157, 103, 0.16);
}

.portal-footer {
    margin-top: 2rem;
    background: linear-gradient(180deg, rgba(15, 28, 54, 0.96), rgba(9, 18, 38, 0.98));
    color: rgba(255, 255, 255, 0.78);
    padding: 1.4rem 0;
}

.login-split-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.login-hero-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: inherit;
}

.login-hero-overlay {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    background:
        linear-gradient(180deg, rgba(9, 28, 62, 0.42), rgba(7, 18, 38, 0.78)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 30%);
    color: #fff;
}

.login-hero-photo-overlay {
    background: linear-gradient(180deg, rgba(9, 28, 62, 0.42), rgba(7, 18, 38, 0.78)),
                radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 30%);
    overflow: hidden;
}

.login-hero-photo-overlay > * {
    max-height: 100vh;
}

.hero-gov-brand,
.hero-badge,
.hero-feature-item,
.hero-footer-note,
.login-form-gov-tag,
.maupass-notice,
.login-demo-box {
    backdrop-filter: blur(12px);
}

.hero-gov-brand {
    align-self: flex-start;
    padding: 1rem 1.15rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-sm);
}

.hero-gov-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
}

/* The MPF logo in the login page badge (2026-11-29, was a car icon). */
.hero-gov-icon img {
    height: 46px;
    width: auto;
}

.hero-gov-name {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.hero-gov-dept {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-main-content {
    max-width: 560px;
    animation: fadeUp 0.55s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.6rem, 2rem + 1.6vw, 4.2rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-feature-list {
    display: grid;
    gap: 0.75rem;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 600;
}

.hero-feature-item i {
    color: #9be6bf;
    font-size: 1rem;
}

.hero-footer-note {
    align-self: flex-start;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.25rem;
    background:
        radial-gradient(circle at top, rgba(23, 78, 166, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 253, 0.92));
}

.login-form-inner {
    width: 100%;
    max-width: 520px;
    animation: fadeUp 0.45s ease;
}

.login-form-gov-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(196, 209, 229, 0.5);
}

.login-logo-ring {
    width: 78px;
    height: 78px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 22px 40px rgba(23, 78, 166, 0.22);
}

/* The MPF logo above "Applicant Sign In" (replaces the person icon in .login-logo-ring, 2026-10-18). */
.login-logo {
    height: 104px;
    width: auto;
    filter: drop-shadow(0 12px 22px rgba(23, 78, 166, 0.18));
}

.login-form-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-strong);
}

.login-form-card {
    border-radius: 28px;
    padding: 1.75rem;
}

.btn-login-main {
    min-height: 54px;
    font-size: 1rem;
}

.maupass-notice,
.login-demo-box {
    border-radius: 22px;
    border: 1px solid rgba(196, 209, 229, 0.48);
    box-shadow: var(--shadow-xs);
}

.maupass-notice {
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.78);
}

.login-demo-box {
    padding: 1.1rem 1.15rem;
    background: linear-gradient(180deg, #fffaf0, #fff5e4);
}

.demo-credential-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.45rem 0;
    font-size: 0.88rem;
}

.demo-label {
    font-weight: 700;
    color: var(--text-soft);
}

.demo-credential-row code {
    background: rgba(15, 28, 54, 0.06);
    color: var(--primary-dark);
    border-radius: 10px;
    padding: 0.2rem 0.45rem;
}

.portal-section-card,
.wizard-step-content,
.ack-card,
.doc-upload-card,
.action-card,
.login-form-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}

.portal-section-card {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.portal-section-card:hover,
.wizard-step-content:hover,
.ack-card:hover {
    box-shadow: var(--shadow-md);
}

.portal-section-header {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(242, 247, 253, 0.92));
    border-bottom: 1px solid rgba(211, 221, 238, 0.55);
    padding: 1.25rem 1.35rem;
}

.portal-section-header h6 {
    font-size: 0.98rem;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}

.portal-section-body {
    padding: 1.35rem;
}

.empty-state {
    padding: 2.2rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, #f2f6fc, #e9eff8);
    color: var(--primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
    gap: 1.4rem;
    padding: 1.7rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top left, rgba(23, 78, 166, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(18, 49, 97, 0.95), rgba(24, 78, 145, 0.94));
    color: #fff;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.65rem;
    animation: fadeUp 0.5s ease;
}

.profile-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    gap: 1.3rem;
    padding: 1.7rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top left, rgba(23, 78, 166, 0.16), transparent 32%),
        linear-gradient(135deg, rgba(18, 49, 97, 0.94), rgba(24, 78, 145, 0.92));
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.profile-avatar-card {
    min-width: 150px;
    padding: 1rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-align: center;
}

.profile-avatar {
    width: 94px;
    height: 94px;
    margin: 0 auto 0.85rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(227, 236, 250, 0.92));
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.profile-avatar-note {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 700;
}

.profile-hero-copy h2 {
    font-size: clamp(2rem, 1.5rem + 1.2vw, 3rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.profile-hero-copy p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    max-width: 700px;
}

.profile-hero-stats {
    display: grid;
    gap: 0.9rem;
}

.profile-stat-sm {
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-word;
}

.profile-detail-list {
    display: grid;
    gap: 0.95rem;
}

.profile-detail-item,
.profile-summary-card {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(243, 247, 253, 0.92));
    border: 1px solid rgba(205, 217, 234, 0.56);
    box-shadow: var(--shadow-xs);
}

.profile-detail-item strong,
.profile-summary-card strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-strong);
    line-height: 1.6;
}

.profile-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 800;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.profile-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.profile-admin-item {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(243, 247, 253, 0.92));
    border: 1px solid rgba(205, 217, 234, 0.56);
    box-shadow: var(--shadow-xs);
}

.profile-admin-item strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-strong);
    line-height: 1.55;
}

.profile-admin-item-wide {
    grid-column: span 2;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -100px -100px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero h2 {
    font-size: clamp(1.7rem, 1.35rem + 1vw, 2.45rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-hero p {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
    max-width: 620px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.hero-point {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}

.hero-side-stack {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.9rem;
}

.hero-stat {
    padding: 1.05rem 1.1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 700;
}

.hero-stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 0.3rem;
}

.dashboard-bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.8rem;
}

.bento-span-8 {
    grid-column: span 8;
}

.bento-span-4 {
    grid-column: span 4;
}

.bento-span-12 {
    grid-column: span 12;
}

.dashboard-mini-card {
    padding: 1.15rem 1.2rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.88));
    border: 1px solid rgba(198, 210, 230, 0.42);
    box-shadow: var(--shadow-xs);
}

.dashboard-mini-card h6 {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.dashboard-mini-card strong {
    font-size: 1.55rem;
    color: var(--text-strong);
    letter-spacing: -0.03em;
}

.action-card-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card-wrap {
    grid-column: span 4;
}

.action-card {
    position: relative;
    height: 100%;
    padding: 1.45rem;
    border-radius: 26px;
    overflow: hidden;
}

.action-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 44%);
    pointer-events: none;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-card-disabled {
    opacity: 0.58;
    pointer-events: none;
}

.action-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.bg-primary-soft { background: var(--primary-soft); }
.bg-success-soft { background: var(--success-soft); }
.bg-warning-soft { background: var(--warning-soft); }
.bg-info-soft { background: var(--info-soft); }
.bg-secondary-soft { background: var(--secondary-soft); }

.action-card-body h6 {
    font-size: 1rem;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}

.action-card-body p {
    line-height: 1.7;
    color: var(--text-soft);
}

.app-wizard {
    border: none;
    background: transparent;
}

.wizard-step-content {
    border-radius: var(--radius-md);
    padding: 2rem;
    animation: fadeUp 0.4s ease;
}

/* ── PrimeFaces wizard step titles (Disclaimer, Personal Details, …) ── */
.ui-wizard .ui-wizard-step-titles,
.app-wizard .ui-wizard-step-titles {
    font-weight: 800 !important;
}

.ui-wizard .ui-wizard-step-titles .ui-wizard-step-title,
.app-wizard .ui-wizard-step-titles .ui-wizard-step-title,
.ui-wizard .ui-wizard-step-titles li,
.app-wizard .ui-wizard-step-titles li {
    font-weight: 800 !important;
    letter-spacing: 0.01em;
}

.ui-wizard .ui-wizard-step-titles .ui-state-highlight,
.app-wizard .ui-wizard-step-titles .ui-state-highlight,
.ui-wizard .ui-wizard-step-titles .ui-state-default,
.app-wizard .ui-wizard-step-titles .ui-state-default,
.ui-wizard .ui-wizard-step-titles .ui-state-disabled,
.app-wizard .ui-wizard-step-titles .ui-state-disabled {
    font-weight: 800 !important;
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid rgba(226, 234, 245, 0.72);
    padding-bottom: 1.1rem;
    margin-bottom: 1.4rem;
}

.step-number {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(23, 78, 166, 0.22);
    flex-shrink: 0;
}

.step-header h5 {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 800;
}

.wizard-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 234, 245, 0.72);
}

/* Summary step (2026-10-01) - read-only review of every step before Confirm & Pay, each with an Edit button. */
.summary-section {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.9rem;
}

.summary-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.summary-section-header h6 {
    color: var(--text-strong);
    font-weight: 800;
}

.summary-list {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.summary-list dt {
    color: var(--text-soft);
    font-weight: 600;
}

.summary-list dd {
    margin: 0;
    color: var(--text-strong);
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .summary-list {
        grid-template-columns: 1fr;
    }

    .summary-list dd {
        margin-bottom: 0.4rem;
    }
}

.wizard-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 0 0.2rem;
}

.wizard-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 92px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5ebf4;
    color: var(--text-soft);
    border: 2px solid #e5ebf4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.wizard-progress-step.active .step-dot {
    background: #fff;
    color: var(--primary);
    border-color: rgba(23, 78, 166, 0.28);
    box-shadow: 0 0 0 6px rgba(23, 78, 166, 0.1);
}

.wizard-progress-step.completed .step-dot {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.step-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 800;
}

.wizard-progress-step.active .step-label {
    color: var(--primary-dark);
}

.step-connector {
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, #d6e0ef, #e9eef6);
    margin-bottom: 22px;
}

.conditional-panel,
.disclaimer-box,
.payment-summary-box,
.calendar-panel {
    border-radius: 22px;
}

.conditional-panel {
    background: linear-gradient(180deg, #fffaf0, #fff7e8);
    border: 1px solid rgba(237, 194, 113, 0.42);
    padding: 1.3rem;
    margin-top: 0.6rem;
}

.conditional-panel-header {
    display: flex;
    align-items: center;
    color: #9a5c14;
    font-weight: 700;
}

.disclaimer-box {
    background: linear-gradient(180deg, #f3f8ff, #eef4fe);
    border: 1px solid rgba(189, 204, 229, 0.44);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 1.4rem 1.5rem;
    line-height: 1.8;
    font-weight: 600;
}

.disclaimer-box p {
    font-weight: 600;
}

/* A disclaimer block (DisclaimerConstants, 2026-11-12): its line breaks, blank lines and indent are kept; long lines
   still wrap to the box. */
.disclaimer-text {
    white-space: pre-wrap;
    font-weight: 600;
}

.disclaimer-box h6 {
    font-weight: 800 !important;
}

.disclaimer-box strong {
    font-weight: 800;
}

.calendar-panel {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(244, 248, 253, 0.94));
    border: 1px solid rgba(206, 217, 234, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.42rem;
    max-width: 470px;
}

.cal-dow {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0.4rem 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cal-day {
    min-height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}

.cal-day:hover {
    transform: translateY(-2px);
}

.cal-pad {
    background: transparent;
    border: none;
    cursor: default;
}

.cal-day-available { background: #dbf7ea; color: #086844; border-color: #9fe3c0; }
.cal-day-available:hover { background: #c6f2de; }
.cal-day-limited { background: #fff3d8; color: #9d5e11; border-color: #f0ca7a; }
.cal-day-limited:hover { background: #ffeabf; }
.cal-day-full { background: #ffe3e7; color: #b43647; border-color: #f2aab6; cursor: not-allowed; pointer-events: none; }
.cal-day-none { background: #eef2f7; color: #9aa8ba; cursor: not-allowed; pointer-events: none; }
.cal-day-selected { box-shadow: 0 0 0 3px var(--primary-glow); border-color: rgba(23, 78, 166, 0.4); }

.cal-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

.cal-available { background: #dbf7ea; color: #086844; }
.cal-limited { background: #fff3d8; color: #9d5e11; }
.cal-full { background: #ffe3e7; color: #b43647; }
/* Two-state legend pill — pairs with .cal-available */
.cal-not-available { background: #ffe3e7; color: #b43647; }

/* ─── Two-state calendar availability ───────────────────────────
   Standard styling for the simplified Available / Not Available
   calendar used on the portal booking pages. Apply by adding
   the `not-available-date` class to a `.cal-day` cell rendered
   for an unbookable date. The cell becomes visually disabled
   and shows a red cross (❌) overlay in the top-right corner.
   ───────────────────────────────────────────────────────────── */
.cal-day.not-available-date {
    color: #b43647;
    background: #fff5f5;
    border-color: #f2aab6;
    position: relative;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.78;
}
.cal-day.not-available-date::after {
    content: '\274C';   /* ❌ red cross */
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    line-height: 1;
}

.time-slot-radio .ui-radiobutton-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    background: #f2f6fb;
    border-radius: 14px;
    border: 1px solid #cfd9e8;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.time-slot-radio .ui-radiobutton.ui-state-checked + label {
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(23, 78, 166, 0.2);
}

.payment-summary-box {
    background: linear-gradient(135deg, rgba(237, 244, 255, 0.95), rgba(247, 251, 255, 0.92));
    border: 1px solid rgba(194, 207, 227, 0.58);
    padding: 1.3rem 1.45rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.maucas-qr-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 240px;
    gap: 1.4rem;
    align-items: center;
    padding: 1.3rem 1.45rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(237, 244, 255, 0.94));
    border: 1px solid rgba(194, 207, 227, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.maucas-qr-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(23, 78, 166, 0.08);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.maucas-qr-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.maucas-qr-meta-item {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(194, 207, 227, 0.42);
}

.maucas-qr-meta-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.maucas-countdown {
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
}

.maucas-qr-note {
    align-self: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.maucas-qr-visual {
    display: flex;
    justify-content: center;
}

.maucas-qr-frame {
    width: 220px;
    height: 220px;
    padding: 0.9rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(194, 207, 227, 0.52);
    box-shadow: 0 16px 30px rgba(23, 78, 166, 0.08);
}

.maucas-qr-image {
    display: block;
    width: 100%;
    height: 100%;
}

.doc-upload-card {
    border-radius: 24px;
    border-style: dashed;
    border-width: 1.5px;
    border-color: rgba(163, 181, 209, 0.62);
    padding: 1.6rem;
    text-align: center;
}

.doc-upload-card:hover {
    transform: translateY(-3px);
    border-color: rgba(23, 78, 166, 0.5);
    box-shadow: var(--shadow-md);
}

.selection-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.selection-card-grid-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

.selection-card-grid-compact .selection-card {
    min-height: 72px;
    padding: 0.6rem 0.4rem;
    gap: 0.35rem;
    border-radius: 16px;
}

.selection-card-grid-compact .selection-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: 1rem;
}

.selection-card-grid-compact .selection-card-label {
    font-size: 0.74rem;
    line-height: 1.2;
}

.selection-card-grid-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.selection-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 108px;
    padding: 1rem 0.85rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 249, 255, 0.88));
    border: 1px solid rgba(199, 211, 230, 0.72);
    border-radius: 22px;
    box-shadow: var(--shadow-xs);
}

.selection-card-rich {
    min-height: 116px;
}

.selection-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: rgba(23, 78, 166, 0.36);
    color: var(--primary-dark);
}

.selection-card.selected {
    background: linear-gradient(135deg, rgba(23, 78, 166, 0.12), rgba(255, 255, 255, 0.98));
    border-color: rgba(23, 78, 166, 0.58);
    box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.08), var(--shadow-sm);
    color: var(--primary-dark);
}

.selection-card-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(23, 78, 166, 0.08);
    color: var(--primary);
    font-size: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.selection-card.selected .selection-card-icon {
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
}

/* Vehicle Type tiles mix Bootstrap Icons glyphs with fixed-black PNG motorcycle
   icons (no CSS color control over a raster image) - forces the glyphs to the
   same black instead of the usual --primary blue so every tile reads uniformly. */
.vehicle-type-icon-box {
    color: #000;
}

.selection-card.selected .vehicle-type-icon-box {
    color: #fff;
}

.selection-card-label {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
}

.inline-icon-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.inline-icon-label i {
    font-size: 1rem;
    color: var(--primary);
}

.inline-icon-label-soft {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(23, 78, 166, 0.06);
    border: 1px solid rgba(195, 208, 227, 0.55);
}

.ack-card {
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.ack-icon {
    font-size: 4rem;
}

.ack-ref-box {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #f6f9ff, #edf4ff);
    border: 1px dashed rgba(145, 167, 204, 0.85);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-draft { background: #edf2f8; color: #6a798d; }
.status-submitted { background: #e1ecff; color: #2450a5; }
.status-pending-payment { background: #fff0d3; color: #9a5a11; }
.status-pending-approval { background: #fff2e5; color: #b55e1d; }
.status-approved { background: #dff7ea; color: #0f7a4e; }
.status-rejected { background: #ffe6ea; color: #bb3e4d; }
.status-cancelled { background: #edf2f8; color: #5f6f82; }
.status-completed { background: #e5faf0; color: #0d8353; }
.status-confirmed { background: #dff7ea; color: #0f7a4e; }
.status-pending { background: #fff8d9; color: #8b6812; }
.status-failed { background: #ffe5e8; color: #c1374a; }
.status-postponed { background: #ece8ff; color: #5b3bb8; }
/* APPLICATIONS_STG statuses set by ApplicationStatusSyncService / pay-to-book (status class = lowercased APPL_STATUS) */
.status-processing { background: #fff2e5; color: #b55e1d; }
.status-issued { background: #e5faf0; color: #0d8353; }
.status-pending_pay { background: #fff0d3; color: #9a5a11; }

.form-label {
    font-size: 0.86rem;
    margin-bottom: 0.45rem;
    color: var(--text-strong);
    font-weight: 700;
}

/* ============================================================
   Feedback: alerts & p:messages
   Bootstrap's flat default alert boxes clash with this design's
   rounded, soft-color card language and don't clearly separate a
   quiet FYI from a hard stop (e.g. a Test Path rule rejecting the
   selection). Every alert gets a soft tinted fill, a solid left
   accent bar to scan at a glance, and a colour-matched icon; danger
   gets extra weight (thicker bar, bolder border) since those are
   the ones actually blocking the applicant from continuing.
   ============================================================ */
.alert {
    display: flex !important;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: var(--radius-sm) !important;
    border: 1px solid transparent !important;
    border-left-width: 5px !important;
    padding: 0.95rem 1.15rem !important;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-strong) !important;
    box-shadow: var(--shadow-xs) !important;
}

.alert > i:first-child,
.alert > .bi:first-child {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1.55;
}

.alert strong {
    font-weight: 800;
}

.alert-info {
    background: var(--info-soft) !important;
    border-color: rgba(22, 147, 184, 0.22) !important;
    border-left-color: var(--info) !important;
}
.alert-info > i:first-child,
.alert-info > .bi:first-child {
    color: var(--info);
}

.alert-warning {
    background: var(--warning-soft) !important;
    border-color: rgba(217, 133, 28, 0.24) !important;
    border-left-color: var(--warning) !important;
}
.alert-warning > i:first-child,
.alert-warning > .bi:first-child {
    color: var(--warning);
}

.alert-success {
    background: var(--success-soft) !important;
    border-color: rgba(31, 157, 103, 0.22) !important;
    border-left-color: var(--success) !important;
}
.alert-success > i:first-child,
.alert-success > .bi:first-child {
    color: var(--success);
}

/* Blocking/validation-fail state (e.g. "not eligible under the Test Path
   rules") - deliberately the most visually assertive alert so it reads as
   a hard stop, not just another notice. */
.alert-danger {
    background: var(--danger-soft) !important;
    border-color: rgba(216, 77, 88, 0.32) !important;
    border-left-color: var(--danger) !important;
    border-left-width: 6px !important;
    color: #7a1c26 !important;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(216, 77, 88, 0.14) !important;
}
.alert-danger > i:first-child,
.alert-danger > .bi:first-child {
    color: var(--danger);
}

.alert-light {
    background: #fbfcfe !important;
    border: 1px solid rgba(189, 204, 229, 0.55) !important;
    border-left-color: rgba(147, 165, 197, 0.85) !important;
    color: var(--text-soft) !important;
    box-shadow: none !important;
}
.alert-light > i:first-child,
.alert-light > .bi:first-child {
    color: var(--text-soft);
}

.alert-secondary {
    background: var(--secondary-soft) !important;
    border-color: rgba(96, 117, 141, 0.2) !important;
    border-left-color: var(--text-soft) !important;
    color: var(--text-strong) !important;
}

.alert .btn-close {
    margin-left: auto;
}

/* p:messages / growl - same treatment for FacesMessage-driven validation
   feedback (e.g. the real backend Test Path rejection reasons surfaced by
   ValidationService at booking time). */
.ui-messages {
    box-shadow: none !important;
}

.ui-messages > ul {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ui-messages-error,
.ui-messages-fatal {
    background: var(--danger-soft) !important;
    border: 1px solid rgba(216, 77, 88, 0.32) !important;
    border-left: 6px solid var(--danger) !important;
    border-radius: var(--radius-sm) !important;
    color: #7a1c26 !important;
    font-weight: 600;
    padding: 0.95rem 1.15rem !important;
}

.ui-messages-warn {
    background: var(--warning-soft) !important;
    border: 1px solid rgba(217, 133, 28, 0.24) !important;
    border-left: 5px solid var(--warning) !important;
    border-radius: var(--radius-sm) !important;
    color: #6d4409 !important;
    padding: 0.95rem 1.15rem !important;
}

.ui-messages-info {
    background: var(--info-soft) !important;
    border: 1px solid rgba(22, 147, 184, 0.22) !important;
    border-left: 5px solid var(--info) !important;
    border-radius: var(--radius-sm) !important;
    color: #0d4a5c !important;
    padding: 0.95rem 1.15rem !important;
}

.ui-messages-error-icon,
.ui-messages-warn-icon,
.ui-messages-info-icon,
.ui-messages-fatal-icon {
    font-size: 1.15rem !important;
}

.form-control,
.form-select,
.ui-inputfield,
.ui-selectonemenu,
.ui-selectonemenu-label,
.ui-selectonemenu-trigger,
.ui-inputtextarea,
.ui-button,
.ui-dialog,
.ui-dialog .ui-dialog-titlebar,
.ui-datatable table,
.ui-tabs .ui-tabs-nav li a {
    border-radius: 16px !important;
}

.form-control,
.form-select,
.ui-inputfield,
.ui-selectonemenu,
.ui-inputtextarea {
    min-height: 46px;
    border: 1px solid rgba(185, 198, 218, 0.9) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.ui-inputtextarea {
    min-height: 110px;
}

.form-control:focus,
.form-select:focus,
.ui-inputfield:focus,
.ui-state-focus {
    border-color: rgba(23, 78, 166, 0.62) !important;
    box-shadow: 0 0 0 0.28rem rgba(23, 78, 166, 0.12) !important;
}

/* Read-only/disabled fields were rendering on the same near-white fill as
   editable ones (the base .form-control background above always won over
   the "bg-light" utility class), so a locked field gave no visual cue it
   couldn't be edited. Make that state unmistakable instead. */
.form-control[readonly],
.form-control:disabled,
.ui-inputfield[readonly],
.ui-state-disabled.ui-inputfield {
    background: #eef2f7 !important;
    border-color: rgba(185, 198, 218, 0.55) !important;
    color: var(--text-soft) !important;
    box-shadow: none;
    cursor: not-allowed;
}

.btn,
.ui-button {
    border-radius: var(--radius-xs) !important;
    font-weight: 700 !important;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    padding: 0.6rem 1.1rem !important;
    box-shadow: none;
}

/* Small/table-row action buttons - the base padding above reads as
   oversized and "bulbous" at this size (e.g. Pay Now inside a data table
   row), so scale it down instead of using one padding for every button. */
.btn-sm,
.ui-button.ui-button-sm,
.table .btn,
.ui-datatable .ui-button {
    padding: 0.4rem 0.85rem !important;
    font-size: 0.8rem;
    border-radius: 10px !important;
}

/* Icon-only buttons (e.g. the "view details" eye icon in a data table) -
   a real circle sized to the icon, not the pill-shaped default stretched
   by horizontal padding meant for icon+label buttons. */
.ui-button-icon-only,
.btn.icon-only {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table .ui-button-icon-only,
.ui-datatable .ui-button-icon-only {
    width: 34px !important;
    height: 34px !important;
}

.btn-primary,
.ui-button.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    border-color: transparent !important;
    box-shadow: 0 8px 16px rgba(23, 78, 166, 0.2);
}

.btn-success,
.ui-button.btn-success,
.btn-submit {
    background: linear-gradient(135deg, var(--success), #0f7a4e) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 16px rgba(31, 157, 103, 0.18);
}

.btn-outline-secondary,
.btn-outline-info,
.btn-outline-light,
.btn-outline-primary {
    background: rgba(255, 255, 255, 0.85);
}

.btn:hover,
.ui-button:hover {
    transform: translateY(-1px);
}

.table,
.ui-datatable table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th,
.ui-datatable thead th {
    background: linear-gradient(180deg, #f9fbff, #eff4fb) !important;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(205, 217, 234, 0.72) !important;
    padding: 0.95rem 1rem !important;
}

.table td,
.ui-datatable tbody td {
    padding: 1rem !important;
    vertical-align: middle;
    border-bottom: 1px solid rgba(232, 237, 244, 0.85) !important;
    color: var(--text-strong);
}

.table-hover tbody tr:hover,
.ui-datatable tbody tr:hover {
    background: rgba(243, 248, 255, 0.86) !important;
}

.badge.bg-light {
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    background: #f4f7fc !important;
}

.ui-tabs .ui-tabs-nav {
    border: none;
    display: flex;
    gap: 0.55rem;
    background: transparent;
}

.ui-tabs .ui-tabs-nav li {
    margin: 0;
}

.ui-tabs .ui-tabs-nav li a {
    padding: 0.8rem 1rem !important;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(205, 217, 234, 0.72) !important;
    color: var(--text-soft) !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
    background: linear-gradient(135deg, var(--primary-soft), #fff) !important;
    color: var(--primary-dark) !important;
    border-color: rgba(23, 78, 166, 0.32) !important;
}

.ui-dialog {
    overflow: hidden;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid rgba(194, 206, 225, 0.5) !important;
}

.ui-dialog .ui-dialog-titlebar {
    background: linear-gradient(180deg, #fbfdff, #eff5fc) !important;
    border-bottom: 1px solid rgba(205, 217, 234, 0.72) !important;
    padding: 1rem 1.25rem !important;
}

.ui-messages,
.ui-growl-item-container {
    border-radius: 18px !important;
    overflow: hidden;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .action-card-wrap {
        grid-column: span 6;
    }

    .dashboard-bento {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .bento-span-8,
    .bento-span-4,
    .bento-span-12 {
        grid-column: span 6;
    }
}

@media (max-width: 992px) {
    .page-header-shell,
    .dashboard-hero,
    .profile-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .page-header-accent {
        min-width: auto;
        justify-content: flex-start;
    }

    .portal-content {
        padding-top: 1.4rem;
    }

    .login-split-wrapper {
        grid-template-columns: 1fr;
    }

    .login-hero-panel {
        min-height: 460px;
    }

    .login-form-panel {
        padding-top: 0;
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .profile-admin-grid {
        grid-template-columns: 1fr;
    }

    .profile-admin-item-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .portal-navbar {
        padding: 0.75rem 0;
    }

    .page-header-shell {
        padding: 1.4rem;
        border-radius: 24px;
    }

    .wizard-step-content,
    .portal-section-body,
    .action-card,
    .dashboard-mini-card {
        padding: 1.15rem;
    }

    .action-card-wrap,
    .bento-span-8,
    .bento-span-4,
    .bento-span-12 {
        grid-column: span 12;
    }

    .dashboard-bento {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .action-card-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .wizard-progress-bar {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.75rem;
    }

    .wizard-progress-step {
        min-width: 84px;
    }

    .portal-section-card,
    .wizard-step-content,
    .action-card,
    .ack-card {
        border-radius: 22px;
    }

    .selection-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selection-card-grid-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .selection-card-grid-six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .maucas-qr-card {
        grid-template-columns: 1fr;
    }

    .maucas-qr-visual {
        justify-content: flex-start;
    }

    .login-hero-overlay,
    .login-form-panel {
        padding: 1.5rem;
    }

    .login-form-card {
        padding: 1.25rem;
        border-radius: 24px;
    }

    .table td,
    .ui-datatable tbody td,
    .table thead th,
    .ui-datatable thead th {
        padding-inline: 0.8rem !important;
    }

    .portal-main-nav {
        margin: 0.75rem 0 0;
    }
}

@media (max-width: 576px) {
    .portal-content {
        padding: 1rem 0 2rem;
    }

    .page-title {
        font-size: 1.65rem;
    }

    .page-subtitle,
    .dashboard-hero p {
        font-size: 0.92rem;
    }

    .cal-grid {
        max-width: 100%;
        gap: 0.3rem;
    }

    .cal-day {
        min-height: 40px;
        border-radius: 12px;
        font-size: 0.75rem;
    }

    .ack-card {
        padding: 2rem 1rem;
    }

    .hero-points {
        flex-direction: column;
        align-items: stretch;
    }

    .selection-card-grid {
        grid-template-columns: 1fr;
    }

    .selection-card-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selection-card-grid-six {
        grid-template-columns: 1fr;
    }

    .maucas-qr-meta {
        grid-template-columns: 1fr;
    }

    .maucas-qr-frame {
        width: 180px;
        height: 180px;
    }

    .selection-card {
        min-height: 82px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 0.9rem 1rem;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-feature-item,
    .demo-credential-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   COLLAPSIBLE SIDEBAR LAYOUT
   Added to complement the portal-layout.xhtml sidebar refactor
   ============================================================ */

/* Body override for sidebar layout */
body.sidebar-layout {
    overflow-x: hidden;
}

.portal-layout-wrap {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Sidebar shell ── */
.portal-sidebar {
    width: 240px;
    min-height: 100vh;
    background: lightskyblue;
    color: #000;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow: hidden;
    z-index: 1040;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(23, 78, 166, 0.18);
}

.portal-sidebar.sidebar-collapsed {
    width: 64px;
}

/* ── Brand section ── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* The MPF logo (2026-11-29, TODO 1b item 2 - was a car icon). */
.sidebar-brand-icon {
    width: 38px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sidebar-brand-text {
    flex: 1;
    overflow: hidden;
    transition: opacity 0.2s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 160px;
}

.sidebar-brand-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #000;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.sidebar-brand-sub {
    font-size: 10.5px;
    color: rgba(0, 0, 0, 0.62);
    white-space: nowrap;
}

/* Collapse toggle button (desktop) */
.sidebar-collapse-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: rgba(0, 0, 0, 0.65);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    padding: 0;
    line-height: 1;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
}

/* Hide brand text when collapsed, but keep the toggle accessible */
.portal-sidebar.sidebar-collapsed .sidebar-brand-text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Collapsed (2026-11-29, TODO 1b item 2): the logo, then the toggle button under it - the button used to sit on top of
   the logo (absolute, right: 6px of a 64px sidebar). */
.portal-sidebar.sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 14px 0 12px;
}

.portal-sidebar.sidebar-collapsed .sidebar-collapse-btn {
    opacity: 1;
    max-width: 24px;
    overflow: visible;
    pointer-events: auto;
}

/* ── Navigation items ── */
.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    cursor: pointer;
    overflow: hidden;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.45);
    color: var(--primary-dark) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.65);
    color: var(--primary-dark) !important;
    border-left-color: var(--primary-dark);
    font-weight: 800;
}

.sidebar-nav-icon {
    font-size: 17px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-nav-label {
    overflow: hidden;
    transition: opacity 0.2s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 160px;
}

/* Divider & section labels */
.sidebar-nav-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.14);
    margin: 6px 12px;
}

.sidebar-nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.55);
    padding: 6px 14px 2px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, max-width 0.3s;
    max-width: 200px;
}

/* Collapsed state: hide labels and section labels */
.portal-sidebar.sidebar-collapsed .sidebar-nav-label,
.portal-sidebar.sidebar-collapsed .sidebar-nav-section-label,
.portal-sidebar.sidebar-collapsed .sidebar-nav-divider {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
}

/* Collapsed tooltips */
.portal-sidebar.sidebar-collapsed .sidebar-nav-item {
    position: relative;
    justify-content: center;
    padding: 10px;
    border-left: 3px solid transparent;
}

.portal-sidebar.sidebar-collapsed .sidebar-nav-item.active {
    border-left-color: var(--primary-dark);
}

.portal-sidebar.sidebar-collapsed .sidebar-nav-item::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f1f5f9;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 9999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.portal-sidebar.sidebar-collapsed .sidebar-nav-item:hover::after {
    opacity: 1;
}

/* ── Sidebar footer (user + logout) ── */
.sidebar-footer {
    padding: 10px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.2s, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 120px;
}

.sidebar-user-nic {
    font-size: 11.5px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.6);
}

.sidebar-logout-wrap {
    flex-shrink: 0;
}

.sidebar-logout-btn {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(0, 0, 0, 0.22) !important;
    color: #000 !important;
    border-radius: 8px !important;
    padding: 6px 9px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
}

.sidebar-logout-btn:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    color: var(--primary-dark) !important;
}

/* Collapsed: hide user info */
.portal-sidebar.sidebar-collapsed .sidebar-user-info {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
}

/* ── Main content area ── */
.portal-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--body-gradient, #f4f7fb);
}

.portal-page-header {
    padding: 28px 32px 24px;
}

.portal-content {
    padding: 0 32px 2.5rem;
    flex: 1;
}

.portal-footer {
    padding: 16px 32px;
    border-top: 1px solid rgba(173, 188, 214, 0.2);
    background: transparent;
}

/* ── Mobile top bar ── */
.portal-topbar {
    background: linear-gradient(135deg, #0b1f45, #174ea6);
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(11, 31, 69, 0.24);
}

.topbar-hamburger {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.topbar-hamburger:hover {
    background: rgba(255, 255, 255, 0.22);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* The MPF logo in the phone top bar (2026-11-29, was a car icon). */
.topbar-brand-logo {
    height: 26px;
    width: auto;
}

.topbar-nic {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* ── Mobile overlay backdrop ── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1039;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-backdrop.visible {
    display: block;
    opacity: 1;
}

/* ── Responsive breakpoints ── */
@media (max-width: 991.98px) {
    .portal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 240px !important; /* always full width when mobile open */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .portal-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);
    }

    /* Hide desktop collapse button on mobile */
    .sidebar-collapse-btn {
        display: none;
    }

    .portal-main {
        width: 100%;
    }

    .portal-page-header,
    .portal-content,
    .portal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (min-width: 992px) {
    .portal-topbar {
        display: none !important;
    }
}

/* ============================================================
   COMPACT PROFILE PAGE STYLES
   ============================================================ */

/* ── Profile header card ── */
.profile-header-card {
    background: linear-gradient(135deg, #0b1f45 0%, #174ea6 60%, #2563eb 100%);
    border-radius: var(--radius-md, 22px);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    color: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.profile-header-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 30%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.profile-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* Avatar ring */
.profile-avatar-ring {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.profile-avatar-status-dot {
    width: 14px;
    height: 14px;
    background: #34d399;
    border: 2.5px solid #fff;
    border-radius: 50%;
    position: absolute;
    bottom: 3px;
    right: 3px;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

/* Profile header info */
.profile-header-info {
    flex: 1;
    min-width: 0;
}

.profile-header-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.profile-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.profile-meta-chip {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.profile-status-badge {
    background: rgba(52, 211, 153, 0.22);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-citizen-tag {
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #bfdbfe;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}

.profile-noncitizen-tag {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fde68a;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Stats on the right */
.profile-header-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 14px 24px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.profile-stat-item {
    text-align: center;
    padding: 0 16px;
}

.profile-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.profile-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    white-space: nowrap;
}

.profile-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ── Personal details icon grid ── */
.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
}

.profile-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--card-border, rgba(173,188,214,0.22));
    border-right: 1px solid var(--card-border, rgba(173,188,214,0.22));
    transition: background 0.15s;
}

.profile-detail-item:hover {
    background: var(--primary-soft, #edf4ff);
}

.profile-detail-wide {
    grid-column: 1 / -1;
}

.profile-detail-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-soft, #edf4ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #174ea6);
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #7b8ca2);
    margin-bottom: 3px;
}

.profile-detail-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-strong, #18324d);
    word-break: break-word;
}

/* ── Licence cards ── */
.licence-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Make p:dataTable render as a card grid — reset table chrome */
.licence-card-table {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}

.licence-card-table .ui-datatable-tablewrapper {
    overflow: visible !important;
}

.licence-card-table table {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    border-collapse: unset !important;
}

.licence-card-table thead,
.licence-card-table .ui-datatable-header,
.licence-card-table .ui-datatable-footer {
    display: none !important;
}

.licence-card-table tbody {
    display: contents !important;
}

.licence-card-table tr.licence-card {
    display: block !important;
    background: #fff !important;
    border: 1px solid var(--card-border, rgba(173,188,214,0.32)) !important;
    border-radius: var(--radius-sm, 16px) !important;
    padding: 18px 20px !important;
    box-shadow: var(--shadow-xs) !important;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s !important;
}

.licence-card-table tr.licence-card:hover {
    box-shadow: var(--shadow-sm) !important;
    border-color: rgba(23, 78, 166, 0.25) !important;
    transform: translateY(-2px) !important;
}

.licence-card-table td.licence-col-all {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.licence-card {
    background: #fff;
    border: 1px solid var(--card-border, rgba(173,188,214,0.32));
    border-radius: var(--radius-sm, 16px);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.licence-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(23, 78, 166, 0.25);
    transform: translateY(-2px);
}

.licence-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.licence-card-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-soft, #edf4ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #174ea6);
    font-size: 20px;
    flex-shrink: 0;
}

.licence-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.licence-card-type {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong, #18324d);
    line-height: 1.2;
}

.licence-card-category {
    font-size: 12px;
    color: var(--text-muted, #7b8ca2);
    margin-top: 3px;
}

.licence-validity-badge {
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.licence-valid {
    background: var(--success-soft, #e7f8f0);
    color: var(--success, #1f9d67);
    border: 1px solid rgba(31, 157, 103, 0.25);
}

.licence-expired {
    background: var(--danger-soft, #ffedf0);
    color: var(--danger, #d84d58);
    border: 1px solid rgba(216, 77, 88, 0.25);
}

.licence-pending {
    background: var(--warning-soft, #fff4df);
    color: var(--warning, #d9851c);
    border: 1px solid rgba(217, 133, 28, 0.25);
}

.licence-dates-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--body-bg, #f4f7fb);
    border-radius: 10px;
    padding: 10px 14px;
}

.licence-date-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.licence-date-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #7b8ca2);
}

.licence-date-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong, #18324d);
}

.licence-date-sep {
    width: 1px;
    height: 32px;
    background: var(--card-border, rgba(173,188,214,0.4));
    margin: 0 12px;
}

/* ── Responsive adjustments for profile ── */
@media (max-width: 767.98px) {
    .profile-header-card {
        padding: 20px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-header-stats {
        width: 100%;
        justify-content: center;
    }

    .profile-header-name {
        font-size: 1.2rem;
    }

    .profile-detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .licence-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479.98px) {
    .profile-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-header-stats {
        flex-direction: column;
        gap: 10px;
    }

    .profile-stat-divider {
        width: 60px;
        height: 1px;
    }
}

/* ============================================================
   PROFILE HOME — Unified card (.pf-*) & licence table (.lic-*)
   Applied by profile-home.xhtml (second-pass refactor)
   ============================================================ */

/* ── Outer card ─────────────────────────────────────────── */
.pf-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(19, 41, 79, 0.09), 0 1px 4px rgba(19, 41, 79, 0.05);
    overflow: hidden;
    border: 1px solid rgba(173, 188, 214, 0.25);
}

/* ── Header band ─────────────────────────────────────────── */
.pf-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 28px 22px;
    background: linear-gradient(130deg, #174ea6 0%, #1a6dd8 55%, #1693b8 100%);
    flex-wrap: wrap;
}

/* ── Avatar ──────────────────────────────────────────────── */
.pf-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.pf-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 3px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-avatar-initials {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
    line-height: 1;
}

.pf-avatar-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #34c97e;
    border: 2.5px solid #ffffff;
}

/* ── Header info (name + chips) ──────────────────────────── */
.pf-header-info {
    flex: 1;
    min-width: 0;
}

.pf-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.28);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pf-chip-active {
    background: rgba(52, 201, 126, 0.28);
    border-color: rgba(52, 201, 126, 0.55);
    color: #b8ffdc;
}

.pf-chip-citizen {
    background: rgba(255, 215, 0, 0.22);
    border-color: rgba(255, 215, 0, 0.45);
    color: #fff0a0;
}

.pf-chip-foreign {
    background: rgba(255, 140, 0, 0.22);
    border-color: rgba(255, 140, 0, 0.42);
    color: #ffd8a0;
}

/* ── Stats block ─────────────────────────────────────────── */
.pf-header-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-left: auto;
    flex-shrink: 0;
}

.pf-stat {
    text-align: center;
    padding: 0 14px;
}

.pf-stat-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
}

.pf-stat-lbl {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.pf-stat-sep {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, 0.28);
}

/* ── Card body ───────────────────────────────────────────── */
.pf-body {
    padding: 22px 28px 24px;
}

/* ── Section ─────────────────────────────────────────────── */
.pf-section {
    margin-bottom: 4px;
}

.pf-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted, #7b8ca2);
    margin-bottom: 14px;
}

.pf-section-title i {
    font-size: 15px;
    color: var(--primary, #174ea6);
}

/* ── Field grid ──────────────────────────────────────────── */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 20px;
}

/* field that spans 2 columns */
.pf-field-wide {
    grid-column: span 2;
}

/* field that spans all 3 columns */
.pf-field-full {
    grid-column: 1 / -1;
}

/* ── Individual field ────────────────────────────────────── */
.pf-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #7b8ca2);
}

.pf-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong, #18324d);
    line-height: 1.4;
    word-break: break-word;
}

/* ── Section separator ───────────────────────────────────── */
.pf-sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(173, 188, 214, 0.5) 20%, rgba(173, 188, 214, 0.5) 80%, transparent);
    margin: 18px 0;
}

/* ── Inner section header (Licences / Quick Actions) ─────── */
.pf-inner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(173, 188, 214, 0.22);
}

.pf-inner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-strong, #18324d);
}

.pf-inner-sub {
    display: block;
    font-size: 13px;
    color: var(--text-muted, #7b8ca2);
    margin-top: 3px;
}

/* ============================================================
   LICENCE TABLE inside profile-home (.lic-*)
   p:dataTable is reset to look like a card grid
   ============================================================ */

/* Reset PrimeFaces table chrome */
.lic-table,
.lic-table .ui-datatable-tablewrapper,
.lic-table table {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    border-collapse: collapse !important;
}

.lic-table thead,
.lic-table .ui-datatable-header {
    display: none !important;
}

.lic-table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 4px 0;
}

.lic-table tbody tr.lic-row {
    display: block;
    background: #f8fafd;
    border: 1px solid rgba(173, 188, 214, 0.3);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lic-table tbody tr.lic-row:hover {
    box-shadow: 0 6px 20px rgba(23, 78, 166, 0.1);
    transform: translateY(-2px);
}

/* The single column cell */
.lic-table tbody tr.lic-row td.lic-col {
    display: block;
    padding: 14px 16px;
    border: none !important;
    background: transparent !important;
}

/* ── Top row: icon + type/cat + status badge ── */
.lic-row-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.lic-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-soft, #edf4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: var(--primary, #174ea6);
}

.lic-names {
    flex: 1;
    min-width: 0;
}

.lic-type {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-strong, #18324d);
    line-height: 1.25;
}

.lic-cat {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #7b8ca2);
    margin-top: 2px;
}

.lic-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: var(--success-soft, #e7f8f0);
    color: var(--success, #1f9d67);
    border: 1px solid rgba(31, 157, 103, 0.22);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Dates row ── */
.lic-dates {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(23, 78, 166, 0.04);
    border-radius: 10px;
    padding: 8px 12px;
}

.lic-date-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lic-date-lbl {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #7b8ca2);
    display: flex;
    align-items: center;
}

.lic-date-val {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-strong, #18324d);
}

.lic-date-sep {
    width: 1px;
    height: 32px;
    background: rgba(173, 188, 214, 0.45);
    margin: 0 14px;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE — profile page (.pf-* and .lic-*)
   ============================================================ */

/* Tablet: 2-column grid */
@media (max-width: 991.98px) {
    .pf-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-field-wide {
        grid-column: span 2;
    }

    .pf-field-full {
        grid-column: 1 / -1;
    }

    .pf-header-stats {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* Mobile: single column */
@media (max-width: 575.98px) {
    .pf-header {
        padding: 20px 18px 18px;
        gap: 14px;
    }

    .pf-avatar {
        width: 58px;
        height: 58px;
    }

    .pf-avatar-initials {
        font-size: 1.25rem;
    }

    .pf-name {
        font-size: 1.3rem;
    }

    .pf-body {
        padding: 16px 16px 18px;
    }

    .pf-grid {
        grid-template-columns: 1fr;
    }

    .pf-field-wide,
    .pf-field-full {
        grid-column: 1 / -1;
    }

    .pf-header-stats {
        flex-direction: row;
        padding: 10px 12px;
    }

    .pf-stat {
        padding: 0 10px;
    }

    .pf-stat-val {
        font-size: 1.2rem;
    }

    .pf-inner-header {
        padding: 14px 16px 12px;
        flex-direction: column;
        gap: 4px;
    }

    .lic-table tbody {
        grid-template-columns: 1fr;
    }
}

/* lic-grid — wrapper div around the lic-table dataTable */
.lic-grid {
    width: 100%;
}

/* ── Licence icon colour variants ─────────────────────────── */
.lic-icon-car {
    background: #edf4ff;
    color: #174ea6;
}
.lic-icon-moto {
    background: #fff4df;
    color: #d9851c;
}
.lic-icon-truck {
    background: #e7f8f0;
    color: #1f9d67;
}
.lic-icon-service {
    background: #e8f8fd;
    color: #1693b8;
}

/* 2026 compact profile and lighter shared page header */
.portal-page-header {
    padding: 0.9rem 0 0.35rem;
}

.page-header-shell {
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 24px;
}

.page-title {
    font-size: clamp(1.45rem, 1.2rem + 1vw, 2.2rem);
    line-height: 1.08;
}

.page-subtitle {
    font-size: 0.94rem;
    line-height: 1.55;
}

.profile-compact-layout {
    display: grid;
    gap: 1rem;
}

.profile-identity-card {
    padding: 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(22, 147, 184, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.profile-mini-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-mini-avatar {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), #2f79db);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 800;
    box-shadow: 0 18px 32px rgba(23, 78, 166, 0.2);
    flex-shrink: 0;
}

.profile-mini-copy {
    min-width: 0;
}

.profile-mini-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.profile-mini-name {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: -0.03em;
}

.profile-mini-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.profile-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #f2f7ff;
    border: 1px solid rgba(23, 78, 166, 0.12);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.profile-chip-ok {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(31, 157, 103, 0.18);
}

.profile-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.profile-stat-box {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(173, 188, 214, 0.28);
    box-shadow: var(--shadow-xs);
}

.profile-stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.profile-stat-box strong {
    font-size: 0.98rem;
    color: var(--text-strong);
}

.profile-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 1rem;
}

.profile-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 1rem;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.profile-detail-item,
.profile-side-item {
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(173, 188, 214, 0.24);
}

.profile-detail-item-wide {
    grid-column: span 2;
}

.profile-side-stack {
    display: grid;
    gap: 0.8rem;
}

.profile-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.licence-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}

.licence-card-car .licence-card-icon {
    background: #edf4ff;
    color: #174ea6;
}

.licence-card-motorcycle .licence-card-icon {
    background: #fff4df;
    color: #d9851c;
}

.licence-card-autocycle .licence-card-icon {
    background: #eef9f6;
    color: #0e8d6a;
}

.licence-card-bus .licence-card-icon {
    background: #e8f8fd;
    color: #1693b8;
}

.licence-card-tractor .licence-card-icon {
    background: #f4efe4;
    color: #8b6b2d;
}

.licence-card-truck .licence-card-icon,
.licence-card-taxi .licence-card-icon {
    background: #fceef1;
    color: #c44b63;
}

/* Unified profile card */
.profile-master-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94));
    border: 1px solid rgba(173, 188, 214, 0.26);
    border-radius: 26px;
    box-shadow: 0 18px 48px rgba(19, 41, 79, 0.08);
    padding: 1.5rem;
}

.profile-master-header {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.profile-master-avatar {
    flex-shrink: 0;
}

.profile-master-avatar-image {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.3)),
        linear-gradient(135deg, #174ea6, #1693b8);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 16px 30px rgba(23, 78, 166, 0.18);
}

.profile-master-heading {
    min-width: 0;
}

.profile-master-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.profile-master-name {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-strong);
    font-weight: 800;
}

.profile-master-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.profile-master-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #f2f7ff;
    border: 1px solid rgba(23, 78, 166, 0.12);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.profile-master-pill-active {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(31, 157, 103, 0.18);
}

.profile-section-block {
    padding: 0.2rem 0;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-strong);
}

.profile-section-divider {
    height: 1px;
    margin: 1.15rem 0;
    background: linear-gradient(90deg, transparent, rgba(173, 188, 214, 0.52) 15%, rgba(173, 188, 214, 0.52) 85%, transparent);
}

.profile-master-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.2rem;
}

.profile-master-field {
    min-width: 0;
}

.profile-master-field-wide {
    grid-column: span 2;
}

.profile-master-field-full {
    grid-column: 1 / -1;
}

.profile-master-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.profile-master-value {
    display: block;
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-strong);
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .profile-main-grid {
        grid-template-columns: 1fr;
    }

    .profile-stat-strip,
    .profile-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-master-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .profile-mini-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-stat-strip,
    .profile-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-mini-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.35rem;
    }

    .profile-mini-name {
        font-size: 1.3rem;
    }

    .profile-detail-item-wide {
        grid-column: auto;
    }

    .profile-master-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .profile-master-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-master-avatar-image {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        font-size: 1.65rem;
    }

    .profile-master-name {
        font-size: 1.35rem;
    }

    .profile-master-grid {
        grid-template-columns: 1fr;
    }

    .profile-master-field-wide,
    .profile-master-field-full {
        grid-column: auto;
    }
}

/* ============================================================
   UX ENHANCEMENTS
   Type badges, motion, and interaction polish. Appended as its
   own block so it's easy to tune in isolation - everything here
   uses the design tokens declared at the top of this file.
   ============================================================ */

/* --- Type badge: distinguishes Self vs On Behalf rows in the
       merged Query Applications / Query Fees grids ------------- */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.type-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
}

.type-self {
    background: var(--primary-soft);
    color: var(--primary);
}

.type-behalf {
    background: #f2ecff;
    color: #5b3bb8;
}

/* --- Page entry: content settles in rather than snapping ----- */
/* "backwards", not "both": a transform left on the form after the animation would anchor the floating messages
   (position: fixed) to the form instead of the screen (2026-10-09). */
.portal-content > * {
    animation: fadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* --- Table polish: staggered row reveal + clearer hover ------ */
.table tbody tr {
    animation: fadeUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.table tbody tr:nth-child(n+9) { animation-delay: 0.18s; }

.table.table-hover tbody tr:hover {
    background-color: var(--primary-soft) !important;
    box-shadow: inset 3px 0 0 var(--primary);
}

/* --- Buttons: lift on hover, press on click, sheen sweep ----- */
.btn,
.ui-button {
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.btn:not(:disabled):not(.ui-state-disabled):hover,
.ui-button:not(:disabled):not(.ui-state-disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:not(:disabled):not(.ui-state-disabled):active,
.ui-button:not(:disabled):not(.ui-state-disabled):active {
    transform: translateY(0) scale(0.985);
    box-shadow: var(--shadow-xs);
}

/* Light sweep across primary/success actions on hover */
.btn-primary::after,
.btn-success::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.btn-primary:not(:disabled):hover::after,
.btn-success:not(:disabled):hover::after {
    transform: translateX(120%);
}

/* Disabled actions should read as unavailable, not just greyed */
.btn:disabled,
.ui-button.ui-state-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Cards: subtle lift so they feel interactive ------------- */
.portal-section-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- Selection cards: snappier feedback on pick -------------- */
.selection-card {
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease,
                border-color 0.18s ease, background-color 0.18s ease;
}

.selection-card.selected {
    animation: selectPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes selectPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.045); }
    100% { transform: scale(1); }
}

/* --- Calendar days: clearer affordance ----------------------- */
.cal-day-available {
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.cal-day-available:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-xs);
}

/* --- Wizard step transitions -------------------------------- */
.wizard-step-content {
    animation: fadeUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* --- Alerts/messages slide in instead of appearing abruptly -- */
.alert,
.ui-messages {
    animation: fadeUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* --- Sidebar nav: clearer active/hover affordance ------------ */
.sidebar-nav-item {
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.sidebar-nav-item:hover {
    padding-left: 1.15rem;
}

/* --- Ajax busy indicator: thin progress bar at the top ------- */
.ajax-busy-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: busySweep 1s linear infinite;
    z-index: 9999;
}

@keyframes busySweep {
    0%   { background-position: -40% 0; }
    100% { background-position: 140% 0; }
}

/* --- Accessibility: visible keyboard focus ------------------- */
.btn:focus-visible,
.ui-button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.sidebar-nav-item:focus-visible,
.selection-card:focus-visible,
.cal-day-available:focus-visible {
    outline: 3px solid var(--primary-glow);
    outline-offset: 2px;
}

/* --- Respect reduced-motion preferences --------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover,
    .ui-button:hover,
    .portal-section-card:hover,
    .cal-day-available:hover {
        transform: none !important;
    }
}

/* --- Licence chip: modern visual for a held licence on the Dashboard --- */
.licence-chip {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-glow), rgba(23, 78, 166, 0.02));
    border: 1px solid rgba(23, 78, 166, 0.14);
    margin-bottom: 0.75rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.licence-chip:last-child {
    margin-bottom: 0;
}

.licence-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(23, 78, 166, 0.16);
}

.licence-chip-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.licence-chip-body {
    min-width: 0;
}

.licence-chip-title {
    font-weight: 800;
    font-size: 1.08rem;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.licence-chip-number {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-strong);
}

.licence-chip-meta {
    font-size: 0.86rem;
    color: var(--text-soft);
}

/* p:datePicker with showIcon - keep the calendar button on the same line as the input (it wrapped below once the input took full width). */
/* Date pickers with showIcon (2026-11-29, TODO 1b item 3): the calendar icon sits inside the field, at its right
   end - it was a round button beside it, which made that row taller and narrower than the others. */
.p-datepicker.ui-trigger-calendar {
    position: relative;
    display: flex;
    align-items: stretch;
}

.p-datepicker.ui-trigger-calendar > input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2.75rem !important;
}

.p-datepicker.ui-trigger-calendar > .ui-datepicker-trigger {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 34px !important;
    height: 34px !important;
    min-height: 0;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--primary) !important;
}

.p-datepicker.ui-trigger-calendar > .ui-datepicker-trigger .ui-icon,
.p-datepicker.ui-trigger-calendar > .ui-datepicker-trigger .ui-button-icon-left {
    color: var(--primary) !important;
}

.p-datepicker.ui-trigger-calendar > .ui-datepicker-trigger:hover {
    background: var(--primary-soft) !important;
}

/* Dropdowns (2026-11-29, TODO 1b item 3): one border like the text boxes. PrimeFaces' inner label also matched
   .ui-inputfield and drew a second rounded box inside the first, and Bootstrap's form-select drew its own arrow
   beside PrimeFaces' trigger - the "heavier, inset" look. */
.ui-selectonemenu.form-select {
    background-image: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch;
}

.ui-selectonemenu.form-select > .ui-selectonemenu-label {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.ui-selectonemenu .ui-selectonemenu-label,
.ui-selectonemenu .ui-selectonemenu-label.ui-inputfield {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: auto !important;
    align-self: stretch;
    display: flex !important;
    align-items: center;
    padding: 0 2.6rem 0 0.85rem !important;
}

.ui-selectonemenu .ui-selectonemenu-trigger {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Learner's Date of Birth with the age inside the field (2026-11-29, was a separate 2-wide Age box). */
.dob-with-age > .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.dob-with-age > .input-group-text {
    border-radius: 0 16px 16px 0 !important;
    border: 1px solid rgba(185, 198, 218, 0.55);
    border-left: none;
    background: #eef2f7;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Required documents (LIC_DOC_CHECKLIST) - include/checklist-documents.xhtml, 2026-10-03 */
.checklist-doc {
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    height: 100%;
}
.checklist-doc.is-uploaded {
    border-color: #bfe6d3;
    background: var(--success-soft);
}
.checklist-doc-status {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Page messages (p:messages) float in the top-right corner, so they're seen without scrolling back up
   (user, 2026-10-09). Same boxes and ids - every ajax update still refreshes them; field messages
   (p:message, .ui-message) stay under their field. Below the mobile sidebar (1039), above the page. */
.portal-content .ui-messages {
    position: fixed;
    top: 16px;
    right: 16px;
    width: min(440px, calc(100% - 32px));
    z-index: 1030;
    margin: 0 !important;
}

.portal-content .ui-messages-error,
.portal-content .ui-messages-fatal,
.portal-content .ui-messages-warn,
.portal-content .ui-messages-info {
    box-shadow: 0 10px 28px rgba(11, 31, 69, 0.18);
    margin: 0 0 0.6rem 0;
}

/* Mobile: under the sticky top bar. */
@media (max-width: 991.98px) {
    .portal-content .ui-messages {
        top: 72px;
    }
}

/* Wizard steps as a stepper (user, 2026-11-29 - TODO 1b item 1; replaces the phone-only circles of 2026-10-09):
   numbered circles joined by a line instead of PrimeFaces' tab strip, which wrapped onto two lines. Every p:wizard
   (styleClass app-wizard): Learner's, On-Behalf, IDP and the three Book Test Appointment wizards.
   Done steps (every li before the highlighted one) = filled circle with a tick and a coloured line; current = ringed,
   slightly bigger, label in the accent colour; steps ahead = grey. Desktop / tablet: the titles under the circles.
   Phone (< 768px): circles only and one caption under them, "Step 3 of 8 · Vehicle Type" - written by
   wizardStepCaptions() in app-layout.xhtml (CSS can't count the steps). */
.app-wizard .ui-wizard-step-titles {
    counter-reset: wizard-step;
    display: flex !important;
    align-items: flex-start;
    margin: 0 0 1.25rem 0 !important;
    padding: 0.25rem 0 0 !important;
    list-style: none;
    border: none !important;
    background: transparent !important;
}

.app-wizard .ui-wizard-step-titles li,
.app-wizard .ui-wizard-step-titles .ui-wizard-step-title {
    counter-increment: wizard-step;
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    float: none !important;
    margin: 0 !important;
    padding: 2.55rem 0.25rem 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    white-space: normal;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.25;
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* The circle, with the step number. */
.app-wizard .ui-wizard-step-titles li::before {
    content: counter(wizard-step);
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    border-radius: 50%;
    border: 2px solid #c9d6e8;
    background: #fff;
    color: var(--text-soft, #5b6b82);
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 28px;
    text-align: center;
    box-sizing: border-box;
}

/* The line from the previous circle to this one. */
.app-wizard .ui-wizard-step-titles li::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(-50% + 16px);
    right: calc(50% + 16px);
    height: 2px;
    background: #c9d6e8;
}

.app-wizard .ui-wizard-step-titles li:first-child::after {
    display: none;
}

/* Done: every step before the current one. */
.app-wizard .ui-wizard-step-titles li:has(~ li.ui-state-highlight) {
    color: var(--text-soft, #5b6b82) !important;
}

.app-wizard .ui-wizard-step-titles li:has(~ li.ui-state-highlight)::before {
    content: "\2713";
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.app-wizard .ui-wizard-step-titles li:has(~ li.ui-state-highlight)::after,
.app-wizard .ui-wizard-step-titles li.ui-state-highlight::after {
    background: var(--primary);
}

/* Current step. */
.app-wizard .ui-wizard-step-titles li.ui-state-highlight {
    color: var(--primary-dark, var(--primary)) !important;
}

.app-wizard .ui-wizard-step-titles li.ui-state-highlight::before {
    top: -2px;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    line-height: 30px;
    border: 3px solid var(--primary);
    background: #fff;
    color: var(--primary);
    box-shadow: 0 0 0 5px rgba(23, 78, 166, 0.12);
}

/* The phone caption - only shown on a phone. */
.wizard-step-caption {
    display: none;
}

@media (max-width: 767.98px) {
    .app-wizard .ui-wizard-step-titles {
        margin-bottom: 0.4rem !important;
    }

    /* Circles only: the titles are hidden, the caption says where you are. */
    .app-wizard .ui-wizard-step-titles li,
    .app-wizard .ui-wizard-step-titles .ui-wizard-step-title {
        height: 32px;
        padding: 0 !important;
        font-size: 0 !important;
        color: transparent !important;
    }

    .app-wizard .ui-wizard-step-titles li::before {
        width: 26px;
        height: 26px;
        margin-left: -13px;
        top: 3px;
        line-height: 22px;
        font-size: 0.75rem;
    }

    .app-wizard .ui-wizard-step-titles li.ui-state-highlight::before {
        width: 30px;
        height: 30px;
        margin-left: -15px;
        top: 1px;
        line-height: 24px;
        box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.12);
    }

    .app-wizard .ui-wizard-step-titles li::after {
        top: 15px;
        left: calc(-50% + 13px);
        right: calc(50% + 13px);
    }

    .wizard-step-caption {
        display: block;
        text-align: center;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text-strong, #1d2b40);
        margin: 0 0 1rem;
    }

    .wizard-step-caption span {
        font-weight: 500;
        color: var(--text-muted);
    }
}

/* Payment result card (2026-10-09) - payment-response-ok / -ko, app/include/payment-result-card.xhtml.
   One card, three accents: ok = green (--success), ko = red (--danger), info = amber (--warning). */
.pay-result {
    --pr-accent: var(--warning);
    --pr-soft: var(--warning-soft);
    max-width: 880px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--card-border);
    border-top: 5px solid var(--pr-accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 2rem 2.25rem 1.75rem;
    color: var(--text-strong);
}

.pay-result--ok {
    --pr-accent: var(--success);
    --pr-soft: var(--success-soft);
}

.pay-result--ko {
    --pr-accent: var(--danger);
    --pr-soft: var(--danger-soft);
}

.pay-result-head {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.pay-result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pr-soft);
    color: var(--pr-accent);
    font-size: 1.9rem;
}

.pay-result-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: var(--text-strong);
    text-wrap: balance;
}

.pay-result-subtitle {
    margin: 0 auto;
    max-width: 60ch;
    color: var(--text-soft);
}

.pay-result-body {
    padding-top: 1.5rem;
}

.pay-result-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.pay-result-col {
    min-width: 0;
}

.pay-result-heading {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: var(--text-strong);
}

.pay-result-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0;
}

.pay-result-list dt {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.pay-result-list dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Not-paid card: label and value side by side, one row each. */
.pay-result-list--rows > div {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--card-border);
}

.pay-result-list--rows dt {
    margin: 0;
}

.pay-result-amount {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 1.6rem;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
}

.pay-result-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--pr-soft);
    color: var(--pr-accent);
}

.pay-result-mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.pay-result-alert {
    background: var(--warning-soft);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-xs);
    padding: 0.8rem 1rem;
    color: #6d4409;
    margin-bottom: 1rem;
}

.pay-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.5rem;
}

.pay-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--card-border);
    background: #fff;
    color: var(--text-strong);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.pay-result-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pay-result-btn--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pay-result-btn--primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.pay-result-note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 767.98px) {
    .pay-result {
        padding: 1.5rem 1.1rem 1.25rem;
    }

    .pay-result-cols {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pay-result-list--rows > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .pay-result-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* Dashboard - Upcoming Appointments as cards (2026-10-09): the date on a blue band, then what, when, where. */
.appt-card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.appt-card + .appt-card {
    margin-top: 0.85rem;
}

.appt-card-date {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
}

.appt-card-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.appt-card-month {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.appt-card-year {
    font-weight: 600;
    opacity: 0.85;
}

.appt-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.9rem 1rem 1rem;
}

.appt-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.15rem;
}

.appt-card-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-soft);
    min-width: 0;
    overflow-wrap: anywhere;
}

.appt-card-line .bi {
    color: var(--primary);
    flex-shrink: 0;
}

.appt-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.appt-card-chip {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
}

/* Attended (APPT_STATUS PR, 2026-10-15) - neutral, not the green "confirmed" */
.appt-card-chip-attended {
    background: #e9ecef;
    color: #495057;
}

/* --- Test vehicle card: top of the Oral / Practical booking (2026-10-14), a licence chip with the test as its title --- */
.test-vehicle-card:hover {
    transform: none;
    box-shadow: none;
}

.test-vehicle-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.test-vehicle-card .licence-chip-title {
    white-space: normal;
}

.test-vehicle-card .licence-chip-icon.has-image {
    background: #fff;
    border: 1px solid rgba(23, 78, 166, 0.14);
}

.test-vehicle-card-image {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* --- Medium widths (test finding 13, 2026-10-15): nothing cut off between phone and wide desktop --- */
/* Data tables (Query Fees, Query Applications): scroll sideways instead of cutting the reference and the buttons */
.portal-datatable .ui-datatable-tablewrapper {
    overflow-x: auto;
}

/* PrimeFaces fixes the column widths and hides what overflows a cell - let the columns fit their content instead,
   so a too-wide table scrolls in its wrapper rather than clipping */
.portal-datatable .ui-datatable-tablewrapper > table {
    table-layout: auto;
}

.portal-datatable .ui-datatable-tablewrapper > table > tbody > tr > td,
.portal-datatable .ui-datatable-tablewrapper > table > thead > tr > th {
    overflow: visible;
}

.portal-datatable td:first-child,
.portal-datatable td:last-child {
    white-space: nowrap;
}

/* Dashboard licence chip: the whole licence name, on two lines when needed */
.licence-chip-title {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Compact tile grid (Learner Renewal categories): three per row until the page is wide, labels wrap */
.selection-card-grid-compact .selection-card-label {
    overflow-wrap: anywhere;
}

@media (min-width: 769px) and (max-width: 1200px) {
    .selection-card-grid-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* MauPass-only sign in (login.xhtml, 2026-11-26): the white MauPass logo sits on a navy button. */
.login-form-subtitle {
    margin: 0.6rem auto 0;
    max-width: 400px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-soft);
}

.btn-maupass {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 60px;
    padding: 0 1.25rem;
    border-radius: 14px;
    background: #0b2a5b;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(11, 42, 91, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-maupass:hover,
.btn-maupass:focus-visible {
    background: #123a7a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(11, 42, 91, 0.32);
}

.btn-maupass:focus-visible {
    outline: 3px solid rgba(0, 169, 214, 0.55);
    outline-offset: 2px;
}

.btn-maupass-label {
    font-size: 1rem;
    font-weight: 600;
}

.btn-maupass-logo {
    height: 26px;
    width: auto;
}

.maupass-redirect-note {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-soft);
}

/* Duplicate "Reason for Request" (2026-11-29; round 2 - user: "too big ... same style as the Book Test tiles, not
   mandatory for them to take all the space"): p:selectOneButton styleClass reason-cards drawn like the Book Test
   Appointment test tiles (.selection-card in .selection-card-grid-compact) - small icon square over the label, a fixed
   tile width, left-aligned, wrapping on a phone. An icon per DUP_REASON code (LSS loss, DMG damaged, CNG change of
   name - chosen from the radio's value), the label still GRC_DESC; selected = the tiles' selected look. */
.reason-cards {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: auto;
}

.reason-cards .ui-button {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 168px;
    min-height: 72px;
    margin: 0 !important;
    padding: 0.6rem 0.4rem !important;
    border: 1px solid rgba(199, 211, 230, 0.72) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 249, 255, 0.88)) !important;
    color: var(--text-strong) !important;
    box-shadow: var(--shadow-xs) !important;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.reason-cards .ui-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(23, 78, 166, 0.36) !important;
    color: var(--primary-dark) !important;
}

.reason-cards .ui-button::before {
    font-family: "bootstrap-icons";
    content: "\f3e1";
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(23, 78, 166, 0.08);
    color: var(--primary);
}

.reason-cards .ui-button:has(input[value="LSS"])::before { content: "\f52a"; }
.reason-cards .ui-button:has(input[value="DMG"])::before { content: "\f35e"; }
.reason-cards .ui-button:has(input[value="CNG"])::before { content: "\f4db"; }

.reason-cards .ui-button .ui-button-text {
    padding: 0 !important;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
}

.reason-cards .ui-button.ui-state-active {
    background: linear-gradient(135deg, rgba(23, 78, 166, 0.12), rgba(255, 255, 255, 0.98)) !important;
    border-color: rgba(23, 78, 166, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.08), var(--shadow-sm) !important;
    color: var(--primary-dark) !important;
}

.reason-cards .ui-button.ui-state-active::before {
    background: linear-gradient(135deg, var(--primary), #2b68d1);
    color: #fff;
}

/* Phone - as the Book Test tiles there: two per row, the icon beside the label. */
@media (max-width: 576px) {
    .reason-cards .ui-button {
        width: calc(50% - 0.25rem);
        min-height: 64px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 0.7rem 0.8rem !important;
        gap: 0.6rem;
    }
}

/* Character counter under a textarea (2026-11-29, TODO 1b item 8) - filled by the script in app-layout.xhtml. */
.char-counter {
    margin-top: 0.35rem;
}

.char-counter-text {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.char-counter-bar {
    height: 3px;
    margin-top: 0.25rem;
    border-radius: 2px;
    background: #e5ebf4;
    overflow: hidden;
}

.char-counter-bar > div {
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width 0.15s;
}

.char-counter-full .char-counter-text {
    color: var(--danger, #c0392b);
    font-weight: 700;
}

.char-counter-full .char-counter-bar > div {
    background: var(--danger, #c0392b);
}

/* Status pills with icons (2026-11-29, TODO 1b item 6) - My Appointments (booked / attended / cancelled). */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.3;
}

.status-pill .bi {
    font-size: 0.9rem;
}

.status-pill-booked { background: var(--primary-soft); color: var(--primary); }
.status-pill-attended { background: #e7f6ee; color: #1d7a4a; }
.status-pill-cancelled { background: var(--danger-soft); color: #b3303b; }

/* My Appointments table (2026-11-29, TODO 1b item 6). */
.appt-table .ui-datatable-tablewrapper > table {
    table-layout: auto;
}

.appt-table td {
    vertical-align: middle;
}

.appt-ref-link {
    font-weight: 800;
    color: var(--primary) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.appt-type {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.appt-type-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.appt-when {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    white-space: nowrap;
}

.appt-when .bi,
.appt-centre .bi {
    color: var(--text-muted);
    margin-right: 0.35rem;
}

.appt-when span:first-child {
    font-weight: 700;
}

.appt-details-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(226, 234, 245, 0.9);
}

.appt-details-list {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.45rem 1rem;
    margin: 0;
}

.appt-details-list dt {
    font-weight: 600;
    color: var(--text-muted);
}

.appt-details-list dd {
    margin: 0;
    color: var(--text-strong);
}

.appt-centre {
    display: inline-flex;
    align-items: flex-start;
}

.appt-centre .bi {
    margin-top: 0.15rem;
}

/* Below 1200px (tablet, and a desktop with the sidebar open leaves ~700px): one card per appointment - type and pill
   on top, the reference under them, date / time, centre, the Reschedule button full width. Two cards per row on a
   tablet, one on a phone. */
@media (max-width: 1199.98px) {
    .appt-table thead {
        display: none;
    }

    .appt-table .ui-datatable-tablewrapper > table,
    .appt-table tbody {
        display: block;
        width: 100%;
    }

    .appt-table tbody > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "type status"
            "ref ref"
            "when when"
            "centre centre"
            "action action";
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.85rem;
        padding: 0.9rem 1rem;
        border: 1px solid #dfe6ef !important;
        border-radius: 16px;
        background: #fff !important;
    }

    .appt-table tbody > tr > td {
        display: block;
        padding: 0 !important;
        border: none !important;
    }

    .appt-table td.appt-col-type { grid-area: type; }
    .appt-table td.appt-col-status { grid-area: status; align-self: start; }
    .appt-table td.appt-col-ref { grid-area: ref; padding-left: calc(34px + 0.6rem) !important; }
    .appt-table td.appt-col-when { grid-area: when; margin-top: 0.35rem !important; }
    .appt-table td.appt-col-centre { grid-area: centre; }
    .appt-table td.appt-col-action { grid-area: action; }
    .appt-table td.appt-col-action:empty { display: none; }

    .appt-table .appt-when {
        flex-direction: row;
        gap: 1rem;
    }

    .appt-table td.appt-col-action .ui-button {
        width: 100%;
        margin-top: 0.5rem;
    }

}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .appt-table tbody {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .appt-table tbody > tr {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .appt-details-list {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .appt-details-list dd {
        margin-bottom: 0.5rem;
    }
}

/* Filter and sort (2026-11-29, TODO 1b item 9) - .filterable-table around a p:dataTable; the button, the count and
   the footer are added by the script in app-layout.xhtml. The column filters show only while the button is on. */
.table-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.6rem;
}

.table-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(185, 198, 218, 0.9);
    border-radius: 999px;
    background: #fff;
    color: var(--text-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.table-filter-toggle:hover,
.filters-open .table-filter-toggle {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.table-filter-count {
    min-width: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.25rem;
    text-align: center;
}

.table-filter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-filter-clear {
    border: none;
    background: none;
    padding: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

.filterable-table:not(.filters-open) thead .ui-column-filter,
.filterable-table:not(.filters-open) thead .ui-column-customfilter {
    display: none !important;
}

.filterable-table thead .ui-column-filter,
.filterable-table thead .ui-column-customfilter {
    display: block;
    width: 100% !important;
    margin-top: 0.4rem;
}

.filterable-table thead .ui-column-filter {
    min-height: 34px !important;
    height: 34px;
    padding: 0 0.6rem;
    font-size: 0.8rem;
    border-radius: 10px !important;
}

.filterable-table thead .ui-column-customfilter .ui-selectonemenu {
    min-height: 34px !important;
    width: 100% !important;
    border-radius: 10px !important;
    font-size: 0.8rem;
}

/* The card layout (My Appointments below 1200px) hide the header row; with the filters on it comes back as
   a block of stacked filters above the cards (titles still sort on click). */
@media (max-width: 1199.98px) {
    .filterable-table.filters-open .appt-table thead {
        display: block;
        margin-bottom: 0.85rem;
    }

    .filterable-table.filters-open .appt-table thead > tr {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 0.6rem;
    }

    .filterable-table.filters-open .appt-table thead th {
        display: block;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .filterable-table.filters-open .appt-table thead th.appt-col-action {
        display: none;
    }
}
