/* ============================================================
   PESO-IMS PHASE 5 — UI/UX POLISH LAYER
   Loaded after page CSS; all rules are role/scenario scoped.
============================================================ */

/* ---------- Shared authenticated app shell ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) {
    background: var(--peso-bg);
}

:where(.admin-app, .employer-app, .jobseeker-app) main {
    min-width: 0;
}

:where(.admin-app, .employer-app, .jobseeker-app) .site-header .navbar {
    padding-inline: clamp(14px, 4vw, 72px);
    border-bottom-color: var(--peso-border);
}

:where(.admin-app, .employer-app, .jobseeker-app) .nav-links {
    gap: 4px;
    padding: 7px 10px;
    background: #f3f6fa;
    border: 1px solid #edf1f5;
}

:where(.admin-app, .employer-app, .jobseeker-app) .nav-links a,
:where(.admin-app, .employer-app, .jobseeker-app) .nav-dropdown-toggle {
    min-height: 38px;
    padding-inline: clamp(10px, 1.2vw, 18px);
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-toggle,
:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-toggle,
:where(.admin-app, .employer-app, .jobseeker-app) .mobile-nav-toggle {
    min-width: 42px;
    min-height: 42px;
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-dropdown,
:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown {
    border: 1px solid var(--peso-border);
    box-shadow: var(--peso-shadow);
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-item {
    display: block;
    color: var(--peso-text);
    background: #fff;
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-item:hover,
:where(.admin-app, .employer-app, .jobseeker-app) .notification-item:focus-visible {
    background: #f8fbff;
}

/* ---------- Page typography / hierarchy ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .page-header h1,
    .welcome-section h1,
    .welcome-copy h1,
    .page-heading-row h1,
    .page-title,
    .hero-title
) {
    color: #123b78;
    font-size: clamp(25px, 2.6vw, 34px);
    line-height: 1.15;
    letter-spacing: -.02em;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .page-header p,
    .welcome-section p,
    .welcome-copy p,
    .page-summary,
    .page-subtitle,
    .section-subtitle
) {
    color: var(--peso-muted);
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .page-header,
    .page-heading-row,
    .welcome-section,
    .welcome-row
) {
    gap: 16px;
}

/* ---------- Cards / panels ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .card,
    .stat-card,
    .content-card,
    .details-card,
    .profile-section,
    .application-card,
    .summary-card,
    .filter-section,
    .table-container
) {
    border-color: var(--peso-border);
    border-radius: var(--peso-radius-lg);
}

:where(.admin-app, .employer-app, .jobseeker-app) .stat-card {
    min-height: 96px;
    align-items: center;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(.card-header, .card-header-flex, .card-heading) {
    border-bottom-color: var(--peso-border);
}

/* ---------- Forms / controls ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .form-control,
    .form-group input:not([type="checkbox"]):not([type="radio"]),
    .form-group select,
    .form-group textarea,
    .filter-bar input,
    .filter-bar select,
    .filters input,
    .filters select,
    .dashboard-search-box input,
    .dashboard-filter-select
) {
    min-height: var(--peso-control-h);
    border-color: #cad5e3;
    border-radius: 10px;
    background-color: #fff;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .form-control,
    .form-group input:not([type="checkbox"]):not([type="radio"]),
    .form-group select,
    .form-group textarea,
    .filter-bar input,
    .filter-bar select,
    .filters input,
    .filters select
):focus {
    border-color: #5f8ed9;
    box-shadow: 0 0 0 3px rgba(14, 59, 135, .10);
}

:where(.admin-app, .employer-app, .jobseeker-app) .form-group {
    min-width: 0;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(.form-row, .form-grid, .grid-2) > * {
    min-width: 0;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(.form-help-text, .form-helper, .field-help) {
    color: var(--peso-muted);
    line-height: 1.5;
}

/* ---------- Search/filter bars ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .filter-bar,
    .filters,
    .table-toolbar,
    .dashboard-filter-section,
    .filter-grid,
    .filter-dropdowns
) {
    gap: 10px;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .filter-bar,
    .filters,
    .table-toolbar
) > * {
    min-width: 0;
}

/* ---------- Buttons ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .btn-action,
    .primary-btn,
    .secondary-btn,
    .modal-btn,
    .modal-cancel,
    .modal-save,
    .publish-btn,
    .cancel-btn,
    .btn-primary,
    .btn-secondary,
    .reset-filter-btn
) {
    min-height: 40px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .primary-btn,
    .modal-btn-primary,
    .publish-btn,
    .btn-primary
) {
    box-shadow: 0 4px 10px rgba(14, 59, 135, .12);
}

/* ---------- Tables ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(.table-responsive, .table-scroll) {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

:where(.admin-app, .employer-app, .jobseeker-app) table {
    width: 100%;
}

:where(.admin-app, .employer-app, .jobseeker-app) th {
    color: #53627a;
    background: #f7f9fc;
    white-space: nowrap;
}

:where(.admin-app, .employer-app, .jobseeker-app) td {
    vertical-align: middle;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(.table-actions, .modal-action-buttons) {
    gap: 8px;
}

/* ---------- Empty/no-result states ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .empty-state,
    .standardized-empty-state,
    .no-results-message
) {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    background: #fafcff;
}

/* ---------- Modals: visual consistency without controlling visibility ---------- */
:where(.admin-app, .employer-app, .jobseeker-app) :is(.modal, .modal-overlay) {
    backdrop-filter: blur(2px);
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .modal-content,
    .modal-container,
    .referral-modal,
    .employer-management-modal,
    .applicant-modal-card,
    .interview-modal-card,
    .job-modal-content,
    .kiosk-modal
) {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    border: 1px solid var(--peso-border);
    border-radius: var(--peso-radius-xl);
    box-shadow: var(--peso-shadow-modal);
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .modal-header,
    .modal-header-custom,
    .modal-profile-header
) {
    border-bottom: 1px solid var(--peso-border);
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .modal-footer,
    .modal-footer-custom,
    .modal-buttons
) {
    border-top: 1px solid var(--peso-border);
    background: #fff;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .modal-close,
    .close-modal,
    .modal-close-btn,
    .modal-close-custom,
    .close-btn
) {
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .modal-body,
    .modal-body-custom,
    .applicant-modal-body
) {
    overscroll-behavior: contain;
}

/* ---------- ADMIN: consistent content widths / forms ---------- */
.admin-app :is(
    .admin-dashboard-main,
    .admin-employers-main,
    .admin-referral-main,
    .admin-joblist-main,
    .admin-jobseekers-main,
    .admin-rankings-main,
    .admin-management-main,
    .kiosk-management-main,
    .verification-page,
    .dashboard-container
) {
    width: min(var(--peso-page-max), calc(100% - 32px));
    margin-inline: auto;
}

.admin-app #createFairModal .form-row,
.admin-app .edit-form-card .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.admin-app #createFairModal .modal-body,
.admin-app .edit-form-card .edit-form-body {
    display: grid;
    gap: 4px;
}

.admin-app #createFairModal .form-group,
.admin-app .edit-form-card .form-group {
    align-self: start;
}

.admin-app .employer-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 190px) auto;
    align-items: end;
    gap: 10px;
}

.admin-app .employer-management-modal .modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.admin-app .employer-management-modal .modal-detail-item.full-width {
    grid-column: 1 / -1;
}

.admin-app .employer-management-modal .modal-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-app #reviewModal .review-overview-grid,
.admin-app #reviewModal .review-detail-grid,
.admin-app #referralModal .modal-content-grid {
    align-items: stretch;
}

/* ---------- EMPLOYER ---------- */
.employer-app :is(
    .dashboard-container,
    .page-container,
    .applicants-page,
    .shortlist-page
) {
    width: min(var(--peso-page-max), calc(100% - 32px));
    margin-inline: auto;
}

.employer-app :is(#createJobModal, #editJobModal) .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.employer-app :is(#createJobModal, #editJobModal) .form-group.full,
.employer-app :is(#createJobModal, #editJobModal) .form-drawer {
    grid-column: 1 / -1;
}

.employer-app .applicant-modal-card .modal-content-grid,
.employer-app #applicantModal .modal-content-grid {
    align-items: stretch;
}

.employer-app .modal-primary-actions,
.employer-app .modal-secondary-actions {
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- JOBSEEKER ---------- */
.jobseeker-app :is(
    .dashboard-container,
    .announcement-page,
    .application-page,
    .confirmation-page-main,
    .details-page-main,
    .main-wrapper,
    .form-content-area
) {
    max-width: var(--peso-page-max);
}

.jobseeker-app .form-card-section,
.jobseeker-app .profile-section {
    box-shadow: var(--peso-shadow-sm);
}

.jobseeker-app .radio-pill,
.jobseeker-app .check-card {
    min-height: 46px;
}

.jobseeker-app .form-actions {
    gap: 10px;
}

/* ---------- PUBLIC/HOME ---------- */
.public-app main {
    min-width: 0;
}

/* ---------- AUTH ---------- */
.auth-app {
    min-height: 100dvh;
    background: #eef3f9;
}

.auth-app .auth-page {
    min-height: 100dvh;
    padding: clamp(12px, 3vw, 32px);
}

.auth-app .auth-container {
    overflow: hidden;
    border: 1px solid var(--peso-border);
    border-radius: 22px;
    box-shadow: var(--peso-shadow);
}

.auth-app .form-wrapper {
    width: min(100%, 580px);
}

.auth-app .auth-form :is(input, select, textarea) {
    min-height: 46px;
}

.auth-app .primary-btn {
    min-height: 46px;
    border-radius: 10px;
}

/* ---------- KIOSK ---------- */
.kiosk-app {
    min-width: 0;
    overflow-x: hidden;
    background: #f4f7fb;
}

.kiosk-app :is(button, .btn, .primary-btn, .secondary-btn, a[class*="btn"]) {
    min-height: 52px;
}

.kiosk-app :is(input, select, textarea) {
    min-height: 52px;
    border-radius: 12px;
}

.kiosk-app :is(.modal-content, .kiosk-modal, .keyboard-container) {
    max-width: calc(100vw - 24px);
}

/* ---------- Responsive harmonization ---------- */
@media (max-width: 1180px) {
    :where(.admin-app, .employer-app, .jobseeker-app) .site-header .navbar {
        padding-inline: 20px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .nav-links a,
    :where(.admin-app, .employer-app, .jobseeker-app) .nav-dropdown-toggle {
        padding-inline: 11px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    :where(.admin-app, .employer-app, .jobseeker-app) .site-header .navbar {
        min-height: 64px;
        height: auto;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .nav-links {
        border-inline: 0;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .page-header,
        .page-heading-row,
        .welcome-section,
        .welcome-row,
        .card-header,
        .card-header-flex
    ) {
        align-items: stretch;
    }

    .admin-app .employer-filter-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .admin-app .employer-filter-toolbar > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .page-header,
        .page-heading-row,
        .welcome-section,
        .welcome-row
    ) {
        flex-direction: column;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .page-header-actions,
        .welcome-actions,
        .header-actions
    ) {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .page-header-actions,
        .welcome-actions,
        .header-actions
    ) > * {
        width: 100%;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .modal-content,
        .modal-container,
        .referral-modal,
        .employer-management-modal,
        .applicant-modal-card,
        .interview-modal-card,
        .job-modal-content,
        .kiosk-modal
    ) {
        width: 100%;
        max-width: 100%;
        max-height: 94dvh;
        margin: 0;
        border-radius: 20px 20px 0 0;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(.modal, .modal-overlay) {
        align-items: flex-end;
        padding: 0;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .modal-footer,
        .modal-footer-custom,
        .modal-buttons
    ) {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .admin-app #createFairModal .form-row,
    .admin-app .edit-form-card .form-row,
    .admin-app .employer-management-modal .modal-details-grid,
    .employer-app :is(#createJobModal, #editJobModal) .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-app .employer-filter-toolbar {
        grid-template-columns: 1fr;
    }

    .admin-app .employer-filter-toolbar > :first-child {
        grid-column: auto;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .filter-bar,
        .filters,
        .table-toolbar,
        .dashboard-filter-section
    ) {
        flex-direction: column;
        align-items: stretch;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .filter-bar,
        .filters,
        .table-toolbar,
        .dashboard-filter-section
    ) > * {
        width: 100%;
        max-width: none;
    }

    /* Tables with data-labels become readable mobile cards. */
    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]) thead {
        display: none;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]),
    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]) tbody {
        display: block;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]) tbody tr {
        display: block;
        margin-bottom: 10px;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--peso-border);
        border-radius: 12px;
        box-shadow: var(--peso-shadow-sm);
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]) td[data-label] {
        display: grid;
        grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        padding: 7px 0;
        border: 0;
        text-align: left;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .table-responsive table:has(td[data-label]) td[data-label]::before {
        content: attr(data-label);
        color: var(--peso-subtle);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

    .auth-app .auth-page {
        padding: 0;
    }

    .auth-app .auth-container {
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
    }
}

@media (max-width: 520px) {
    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .admin-dashboard-main,
        .admin-employers-main,
        .admin-referral-main,
        .admin-joblist-main,
        .admin-jobseekers-main,
        .admin-rankings-main,
        .admin-management-main,
        .kiosk-management-main,
        .verification-page,
        .dashboard-container,
        .page-container,
        .applicants-page,
        .shortlist-page
    ) {
        width: min(100% - 18px, var(--peso-page-max));
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .card,
        .stat-card,
        .content-card,
        .form-section
    ) {
        border-radius: 13px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .modal-footer,
        .modal-footer-custom,
        .modal-buttons,
        .modal-action-buttons,
        .modal-primary-actions,
        .modal-secondary-actions
    ) {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .modal-footer,
        .modal-footer-custom,
        .modal-buttons,
        .modal-action-buttons,
        .modal-primary-actions,
        .modal-secondary-actions
    ) > * {
        width: 100%;
        min-width: 0;
    }

    .kiosk-app :is(button, .btn, .primary-btn, .secondary-btn, a[class*="btn"]) {
        min-height: 56px;
    }
}


/* ============================================================
   NOTIFICATION DROPDOWN — FINAL POLISH
   Supports the Phase 4 POST-form notification markup.
============================================================ */

:where(.admin-app, .employer-app, .jobseeker-app) .notification-menu {
    position: relative;
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-dropdown {
    width: min(390px, calc(100vw - 24px));
    max-height: min(68vh, 520px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 16px;
    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.16),
        0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Header */
:where(.admin-app, .employer-app, .jobseeker-app) .notification-header {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e8edf4;
    backdrop-filter: blur(8px);
}

:where(.admin-app, .employer-app, .jobseeker-app) .notification-header > span {
    min-width: 0;
    color: #1f2f49;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-header .notification-action-form {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
}

/* Mark-all is a real button now, so make it look intentional. */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-header .mark-all-link {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    margin: 0;
    color: #0d4b9b;
    background: #eef5ff;
    border: 1px solid #d7e7ff;
    border-radius: 9px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-header .mark-all-link:hover {
    color: #0b3e82;
    background: #e4efff;
    border-color: #c7dcfb;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-header .mark-all-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    outline-offset: 2px;
}

/* Each notification is a POST form. Remove all form/browser spacing. */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Notification row */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 14px 16px 13px 18px;
    color: #26364d;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    border-radius: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition:
        background-color 0.16s ease,
        transform 0.16s ease;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form:last-of-type .notification-item {
    border-bottom: 0;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item:hover,
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item:focus-visible {
    background: #f8fbff;
    transform: none;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item:focus-visible {
    z-index: 1;
    outline: 3px solid rgba(37, 99, 235, 0.14);
    outline-offset: -3px;
}

/* Unread rows: subtle tint + accent, not a full boxed card. */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item.unread {
    background: #f3f8ff;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item-form .notification-item.unread::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 3px;
    background: #1d5fbf;
    border-radius: 0 3px 3px 0;
}

/* Text hierarchy */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-title {
    margin: 0 0 5px;
    color: #123d82;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-message {
    margin: 0 0 7px;
    color: #61728a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-item small {
    display: block;
    margin: 0;
    color: #98a5b6;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
}

/* Empty state */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-empty {
    padding: 30px 18px;
    color: #718096;
    background: #ffffff;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Scrollbar only inside the dropdown. */
:where(.admin-app, .employer-app, .jobseeker-app)
.notification-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-dropdown::-webkit-scrollbar {
    width: 6px;
}

:where(.admin-app, .employer-app, .jobseeker-app)
.notification-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* Mobile */
@media (max-width: 760px) {
    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-dropdown {
        position: fixed !important;
        top: 72px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(72dvh, calc(100dvh - 88px)) !important;
        border-radius: 16px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-header {
        min-height: 56px;
        padding: 11px 12px 11px 14px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-header > span {
        font-size: 14px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-header .mark-all-link {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 10px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-item-form .notification-item {
        padding: 13px 14px 12px 16px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-title {
        font-size: 12.5px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-message {
        font-size: 11.5px;
        line-height: 1.45;
    }
}

@media (max-width: 420px) {
    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-dropdown {
        top: 68px !important;
        left: 8px !important;
        right: 8px !important;
        max-height: min(74dvh, calc(100dvh - 82px)) !important;
        border-radius: 14px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-header {
        gap: 8px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .notification-header .mark-all-link {
        padding-inline: 8px;
    }
}


/* ============================================================
   PHASE 5 CORRECTION — PAGE WIDTH + MOBILE PROFILE POPOVER
============================================================ */

/*
   Restore the original application rhythm:
   desktop content is centered and capped at 1200px.
*/
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .admin-dashboard-main,
    .admin-employers-main,
    .admin-referral-main,
    .admin-joblist-main,
    .admin-jobseekers-main,
    .admin-rankings-main,
    .admin-management-main,
    .kiosk-management-main,
    .verification-page,
    .dashboard-container,
    .page-container,
    .applicants-page,
    .shortlist-page
) {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/*
   Profile menu should stay a small popover on mobile.
   It must NOT become a nearly full-screen card.
*/
@media (max-width: 760px) {
    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu-dropdown {
        position: fixed !important;
        top: 68px !important;
        left: auto !important;
        right: 10px !important;
        width: min(230px, calc(100vw - 20px)) !important;
        max-width: 230px !important;
        max-height: min(60dvh, 360px) !important;
        margin: 0 !important;
        padding: 6px !important;
        overflow-y: auto;
        border: 1px solid #dfe6ef !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu-dropdown a {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-height: 44px !important;
        padding: 10px 12px !important;
        border-radius: 9px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu-dropdown a + a {
        margin-top: 2px;
    }
}

@media (max-width: 420px) {
    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu-dropdown {
        top: 64px !important;
        right: 8px !important;
        width: min(220px, calc(100vw - 16px)) !important;
        max-width: 220px !important;
    }
}

/* ============================================================
   PESO-IMS — STANDARDIZED EXPERIENCE PASS (2026-09-21)
   Safe, last-loaded overrides only. No backend behavior changes.
============================================================ */

/* Global authenticated experience */
:where(.admin-app, .employer-app, .jobseeker-app) {
    --peso-page-gutter: clamp(16px, 3vw, 32px);
    --peso-section-gap: clamp(18px, 2.2vw, 28px);
    background: linear-gradient(180deg, #f7f9fc 0, var(--peso-bg) 220px);
}

:where(.admin-app, .employer-app, .jobseeker-app) main {
    flex: 1 0 auto;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(h1, h2, h3, h4, p) {
    max-width: 100%;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(.card, .stat-card, .content-card, .chart-box, .applicants-box, .table-section, .applicants-container, .search-section, .filter-section) {
    border: 1px solid var(--peso-border);
    box-shadow: var(--peso-shadow-sm);
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(button, .btn, a[class*="btn"], a[class*="button"]) {
    touch-action: manipulation;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(input, select, textarea) {
    font-size: max(16px, 1em);
}

@media (min-width: 769px) {
    :where(.admin-app, .employer-app, .jobseeker-app) :is(input, select, textarea) {
        font-size: inherit;
    }
}

/* Navbar: quieter, more consistent, better small-screen behavior */
:where(.admin-app, .employer-app, .jobseeker-app) .site-header .navbar {
    min-height: 68px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(1.2) blur(10px);
}

:where(.admin-app, .employer-app, .jobseeker-app) .nav-logo {
    width: auto;
    max-width: 138px;
}

:where(.admin-app, .employer-app, .jobseeker-app) .nav-links {
    border-radius: 14px;
}

:where(.admin-app, .employer-app, .jobseeker-app) .nav-links a:hover,
:where(.admin-app, .employer-app, .jobseeker-app) .nav-dropdown-toggle:hover {
    transform: none;
}

:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-toggle:hover,
:where(.admin-app, .employer-app, .jobseeker-app) .notification-toggle:hover {
    transform: none;
}

/* =========================== EMPLOYER =========================== */
.employer-app {
    --employer-content-max: 1200px;
}

.employer-app :is(.hero, .stats, .dashboard-grid, .table-section, .job-grid, .search-section, .main-content) {
    width: min(var(--employer-content-max), calc(100% - (var(--peso-page-gutter) * 2)));
    max-width: var(--employer-content-max);
    margin-inline: auto;
}

.employer-app :is(.dashboard-container, .page-container, .applicants-page, .shortlist-page) {
    width: min(var(--employer-content-max), calc(100% - (var(--peso-page-gutter) * 2)));
    max-width: var(--employer-content-max);
}

/* Employer page headings */
.employer-app .hero {
    margin-top: clamp(24px, 4vw, 42px);
    margin-bottom: 22px;
}

.employer-app .hero h1,
.employer-app .page-header h1,
.employer-app .shortlist-title-section h1 {
    margin: 0;
    color: var(--peso-primary);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -.025em;
}

.employer-app .hero p,
.employer-app .page-header p {
    margin-top: 6px;
    color: var(--peso-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Employer dashboard */
.employer-app .stats {
    gap: 14px;
}

.employer-app .stats > .card {
    position: relative;
    min-width: 0;
    min-height: 122px;
    padding: 22px;
    text-align: left;
    overflow: hidden;
    border-radius: 16px;
}

.employer-app .stats > .card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--peso-primary-soft);
}

.employer-app .stats > .card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 6px;
    color: var(--peso-primary);
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1;
    font-weight: 800;
}

.employer-app .stats > .card span {
    position: relative;
    z-index: 1;
    color: #526174;
    font-size: 13px;
    font-weight: 700;
}

.employer-app .dashboard-grid {
    margin-top: var(--peso-section-gap);
    gap: 18px;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr);
}

.employer-app :is(.chart-box, .applicants-box, .table-section) {
    border-radius: 16px;
    padding: clamp(18px, 2.3vw, 26px);
}

.employer-app :is(.chart-box, .applicants-box, .table-section) h3 {
    color: var(--peso-primary);
    font-size: 18px;
    font-weight: 800;
}

.employer-app .chart-container {
    min-height: 290px;
    height: clamp(290px, 34vw, 340px);
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    background: #fbfcfe;
}

.employer-app .applicant-item {
    gap: 12px;
    min-width: 0;
    padding: 14px 8px;
    border-radius: 10px;
}

.employer-app .applicant-item img {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
}

.employer-app .applicant-info {
    min-width: 0;
}

.employer-app .applicant-info h4,
.employer-app .applicant-info p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employer-app .applicant-info h4 {
    font-size: 14px;
}

.employer-app .applicant-info p {
    font-size: 12px;
}

.employer-app .applicant-item > :is(.pending, .approved, .rejected) {
    flex: 0 0 auto;
    white-space: nowrap;
}

.employer-app .view-all-applicants {
    min-height: 42px;
    margin-top: 14px;
    border-radius: 10px;
}

.employer-app .table-section {
    margin-top: var(--peso-section-gap);
    margin-bottom: 48px;
}

.employer-app .job-item {
    gap: 18px;
    min-width: 0;
    padding: 15px 4px;
}

.employer-app .job-info {
    min-width: 0;
}

.employer-app .job-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.employer-app .job-info p {
    font-size: 12px;
}

.employer-app .job-right {
    flex: 0 0 auto;
    gap: 10px;
}

/* Employer filters */
.employer-app :is(.search-section, .filter-section) {
    border-radius: 14px;
    padding: 14px;
    gap: 12px;
    background: #fff;
}

.employer-app :is(.dashboard-search-box, .search-box) {
    min-width: min(280px, 100%);
}

.employer-app .dashboard-search-box input,
.employer-app .dashboard-filter-select {
    height: 44px;
}

.employer-app .dashboard-filter-group {
    min-width: 0;
}

.employer-app .dashboard-filter-select {
    max-width: 100%;
}

/* Employer job cards */
.employer-app .job-grid {
    gap: 16px;
}

.employer-app :is(.job-card, .create-card) {
    border: 1px solid var(--peso-border);
    border-radius: 16px;
    box-shadow: var(--peso-shadow-sm);
}

.employer-app .job-card {
    overflow: hidden;
}

.employer-app .job-card :is(.job-top, .job-details, .job-actions) {
    min-width: 0;
}

.employer-app .job-card .job-top {
    gap: 14px;
}

.employer-app .job-card .job-statuses {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.employer-app .job-card .job-details {
    row-gap: 9px;
}

.employer-app .job-card .job-details > span {
    min-width: 0;
}

.employer-app .job-actions {
    flex-wrap: wrap;
    gap: 8px;
}

.employer-app .job-actions > * {
    min-height: 40px;
}

/* Employer applicants table */
.employer-app .applicants-container {
    border-radius: 16px;
    padding: clamp(14px, 2.2vw, 24px);
}

.employer-app .table-wrapper {
    overflow: auto;
    border: 1px solid #edf0f5;
    border-radius: 12px;
}

.employer-app .applicants-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 14px;
    background: #f8fafc;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
}

.employer-app .applicants-table td {
    padding: 14px;
    font-size: 13px;
}

.employer-app .candidate-info {
    min-width: 180px;
    gap: 10px;
}

.employer-app .candidate-info img {
    width: 40px;
    height: 40px;
}

.employer-app .candidate-email {
    display: block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employer-app .pagination {
    gap: 12px;
    flex-wrap: wrap;
}

.employer-app #paginationButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Employer profile/detail pages */
.employer-app .dashboard-container {
    padding-top: clamp(22px, 3vw, 34px);
    padding-bottom: 48px;
}

.employer-app .dashboard-container > .page-header {
    margin-bottom: 18px;
}

.employer-app .dashboard-container .card,
.employer-app .page-container .content-card,
.employer-app .shortlist-page-header,
.employer-app .search-card {
    border: 1px solid var(--peso-border);
    box-shadow: var(--peso-shadow-sm);
}

.employer-app :is(.card-header-flex, .section-heading, .section-header-row) {
    gap: 12px;
}

/* Queue page can be wider than standard content, but never touch viewport edges. */
.employer-app .page-header:has(+ .queue-management-grid) {
    width: min(1440px, calc(100% - (var(--peso-page-gutter) * 2)));
    margin-inline: auto;
}

.employer-app .queue-management-grid {
    width: min(1440px, calc(100% - (var(--peso-page-gutter) * 2)));
    margin-inline: auto;
    padding-inline: 0;
}

/* ======================= MOBILE CLEANUP ======================= */
@media (max-width: 900px) {
    :where(.admin-app, .employer-app, .jobseeker-app) .nav-left {
        min-width: 0;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .nav-logo {
        max-width: 112px;
    }

    .employer-app .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .employer-app .applicants-box {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    :where(.admin-app, .employer-app, .jobseeker-app) {
        --peso-page-gutter: 12px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .site-header .navbar {
        min-height: 62px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .nav-links {
        top: 62px;
        max-height: calc(100dvh - 62px);
        padding: 10px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) .notification-dropdown,
    :where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown {
        top: 68px;
    }

    .employer-app .hero {
        margin-top: 22px;
        margin-bottom: 16px;
    }

    .employer-app .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .employer-app .stats > .card {
        min-height: 104px;
        padding: 17px;
        border-radius: 14px;
    }

    .employer-app .stats > .card h2 {
        font-size: 30px;
    }

    .employer-app :is(.chart-box, .applicants-box, .table-section) {
        padding: 16px;
        border-radius: 14px;
    }

    .employer-app .chart-container {
        height: 270px;
        min-height: 270px;
        padding: 8px;
    }

    .employer-app .job-item {
        align-items: flex-start;
    }

    .employer-app .job-right {
        flex-direction: column;
        align-items: flex-end;
    }

    .employer-app .dashboard-filter-section,
    .employer-app .dashboard-filter-group {
        width: 100%;
    }

    .employer-app .dashboard-filter-group {
        display: grid;
        grid-template-columns: 1fr;
    }

    .employer-app .dashboard-filter-select {
        width: 100%;
    }

    /* Applicant list becomes cards using data-label attributes. */
    .employer-app .applicants-table thead {
        display: none;
    }

    .employer-app .applicants-table,
    .employer-app .applicants-table tbody {
        display: block;
        width: 100%;
    }

    .employer-app .applicants-table tbody tr:not(.no-results-row) {
        display: block;
        margin-bottom: 10px;
        padding: 12px;
        border: 1px solid var(--peso-border);
        border-radius: 12px;
        background: #fff;
    }

    .employer-app .applicants-table tbody tr:not(.no-results-row) td[data-label] {
        display: grid;
        grid-template-columns: minmax(92px, 32%) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        padding: 8px 0;
        border: 0;
        white-space: normal;
    }

    .employer-app .applicants-table tbody tr:not(.no-results-row) td[data-label]::before {
        content: attr(data-label);
        color: #8a96a8;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

    .employer-app .candidate-info {
        min-width: 0;
    }

    .employer-app .candidate-email {
        max-width: 100%;
    }

    .employer-app .applicants-table .btn-view {
        width: 100%;
        justify-content: center;
    }

    .employer-app .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .employer-app #paginationButtons {
        justify-content: flex-start;
    }

    .employer-app .job-card .job-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .employer-app .job-card .job-statuses {
        justify-content: flex-start;
    }

    .employer-app .job-actions > * {
        flex: 1 1 140px;
    }

    .employer-app .page-header:has(+ .queue-management-grid),
    .employer-app .queue-management-grid {
        width: calc(100% - 24px);
    }
}

@media (max-width: 520px) {
    .employer-app .hero h1,
    .employer-app .page-header h1,
    .employer-app .shortlist-title-section h1 {
        font-size: 26px;
    }

    .employer-app .stats {
        grid-template-columns: 1fr 1fr;
    }

    .employer-app .stats > .card {
        min-height: 96px;
        padding: 15px;
    }

    .employer-app .stats > .card h2 {
        font-size: 28px;
    }

    .employer-app .stats > .card span {
        font-size: 11px;
        line-height: 1.35;
    }

    .employer-app .applicant-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .employer-app .applicant-item > :is(.pending, .approved, .rejected) {
        margin-left: 54px;
    }

    .employer-app .job-item {
        flex-direction: column;
    }

    .employer-app .job-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .employer-app .table-section {
        margin-bottom: 30px;
    }

    .employer-app .applicants-table tbody tr:not(.no-results-row) td[data-label] {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .employer-app :is(.modal-content, .modal-container, .applicant-modal-card, .interview-modal-card, .job-modal-content) {
        border-radius: 18px 18px 0 0;
    }
}


.resume-modal-content {
    width: min(1180px, calc(100vw - 32px));
    height: min(860px, calc(100vh - 32px));
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.resume-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.resume-modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #173b88;
}

.resume-modal-header p {
    margin: 5px 0 0;
    font-size: 0.95rem;
    color: #64748b;
}

.resume-close-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.resume-close-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.resume-preview-shell {
    flex: 1;
    min-height: 0;
    padding: 20px 28px;
    background: #f8fafc;
}

.resume-preview-frame {
    width: 100%;
    height: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    display: block;
}

.resume-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 18px 28px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.resume-secondary-btn,
.resume-primary-btn {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    transition: 0.2s ease;
}

.resume-secondary-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.resume-secondary-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.resume-primary-btn {
    border: 1px solid #173b88;
    background: #173b88;
    color: #fff;
}

.resume-primary-btn:hover {
    background: #102f70;
    border-color: #102f70;
}

@media (max-width: 768px) {
    .resume-modal-content {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        border-radius: 16px;
    }

    .resume-modal-header {
        padding: 18px 18px 14px;
        align-items: flex-start;
    }

    .resume-modal-header h2 {
        font-size: 1.1rem;
    }

    .resume-modal-header p {
        font-size: 0.83rem;
        line-height: 1.4;
    }

    .resume-preview-shell {
        padding: 12px;
    }

    .resume-modal-footer {
        padding: 14px 16px 18px;
    }

    .resume-secondary-btn,
    .resume-primary-btn {
        flex: 1;
        padding: 0 12px;
        font-size: 0.88rem;
    }
}


/* =========================================================
   PROFILE DROPDOWN — ACTIVE / OPEN UI
   Shared by Admin, Employer, and Job Seeker navbars.
========================================================= */

/* Smooth toggle behavior */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-toggle {
    position: relative;
    border: 1px solid transparent !important;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease !important;
}


/* Open dropdown OR currently inside a profile-management page */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.open .profile-menu-toggle,
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.has-active-page .profile-menu-toggle {
    background: #eef4ff !important;
    border-color: #c8d9f0 !important;
    box-shadow: 0 0 0 3px rgba(13, 53, 125, 0.07) !important;
}


/* Keep avatar border visibly active */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.open .profile-menu-toggle .profile,
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.has-active-page .profile-menu-toggle .profile {
    border-color: #0d357d !important;
}


/* Chevron */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-toggle > .fa-chevron-down {
    transition:
        transform 0.2s ease,
        color 0.2s ease !important;
}


:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.open .profile-menu-toggle > .fa-chevron-down {
    color: #0d357d !important;
    transform: rotate(180deg);
}


:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu.has-active-page .profile-menu-toggle > .fa-chevron-down {
    color: #0d357d !important;
}


/* ---------------------------------------------------------
   ACTIVE LINK INSIDE PROFILE DROPDOWN
--------------------------------------------------------- */

:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a.active {
    color: #0d357d !important;
    background: #edf4ff !important;
    font-weight: 800 !important;
}


:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a.active i {
    color: #0d357d !important;
}


/* Active dropdown item — unread-style left indicator */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a.active {
    position: relative;
    color: #0d357d !important;
    background: #edf4ff !important;
    font-weight: 800 !important;
    padding-left: 22px !important;
}


/* Left border indicator */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a.active::before {
    content: "";

    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 0;
    width: 4px;
    background: #0d357d;
    border-radius: 0 4px 4px 0;
}


/* Make sure the old dot never appears */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a.active::after {
    content: none !important;
    display: none !important;
}

/* Keep hover consistent with the active design */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown a:not(.logout-link):hover {
    color: #0d357d !important;
    background: #f3f7fd !important;
}


/* Logout stays visually separate */
:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown .logout-link {
    margin-top: 5px !important;
    padding-top: 11px !important;

    color: #b42318 !important;

    border-top: 1px solid #edf0f4;
    border-radius: 0 0 9px 9px !important;
}


:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown .logout-link i {
    color: #b42318 !important;
}


:where(.admin-app, .employer-app, .jobseeker-app)
.profile-menu-dropdown .logout-link:hover {
    color: #991b1b !important;
    background: #fff1f0 !important;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 900px) {

    /*
     * On mobile the chevron is intentionally hidden by the
     * existing navbar design, so use the avatar ring itself as
     * the active/open indicator.
     */
    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu.open .profile-menu-toggle,
    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu.has-active-page .profile-menu-toggle {
        background: #eef4ff !important;
        border-color: #c8d9f0 !important;

        box-shadow:
            0 0 0 3px rgba(13, 53, 125, 0.07) !important;
    }


    :where(.admin-app, .employer-app, .jobseeker-app)
    .profile-menu-dropdown a.active {
        min-height: 44px !important;
    }

}

/* Secure POST logout controls: visually match the former logout links. */
:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form {
    margin: 0;
    padding: 0;
}

:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form .logout-link {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin: 2px 0 0 !important;
    padding: 12px 18px !important;
    border: 0;
    border-top: 1px solid #edf0f4;
    border-radius: 0 0 9px 9px !important;
    background: transparent;
    color: #b42318 !important;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form .logout-link i {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: #b42318 !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form .logout-link:hover {
    background: #fff1f0 !important;
    color: #991b1b !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form .logout-link:focus-visible {
    outline: 2px solid rgba(180, 35, 24, 0.22);
    outline-offset: -2px;
}

@media (max-width: 900px) {
    :where(.admin-app, .employer-app, .jobseeker-app) .profile-menu-dropdown .logout-form .logout-link {
        min-height: 44px;
        padding: 10px 12px !important;
        border-radius: 9px !important;
        font-size: 12px;
        gap: 10px;
    }
}


/* ============================================================
   PESO-IMS WEB UI STANDARDIZATION — EMPTY STATES + SEARCH
   Scope: Admin / Employer / Job Seeker web views only.
   Kiosk views are intentionally excluded.
============================================================ */

/* Canonical simple no-results treatment, based on Admin Job Listings. */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .standardized-no-results td,
    .empty-row td,
    .admin-no-results-row td,
    .admin-static-empty-row td,
    .no-results-row td,
    .refinement-no-results td,
    .empty-table
) {
    padding: 48px 20px !important;
    color: #8993a4 !important;
    background: transparent !important;
    border-left: 0 !important;
    border-right: 0 !important;
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .standardized-no-results td,
    .empty-row td,
    .admin-no-results-row td,
    .admin-static-empty-row td,
    .no-results-row td,
    .refinement-no-results td,
    .empty-table
) > i {
    display: block !important;
    margin: 0 auto 10px !important;
    color: #98a2b3 !important;
    font-size: 22px !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .standardized-no-results td,
    .empty-row td,
    .admin-no-results-row td,
    .admin-static-empty-row td,
    .no-results-row td,
    .refinement-no-results td,
    .empty-table
) :is(strong, span) {
    color: #8993a4 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* Search/list empty states outside tables use the same quiet visual language. */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    #noResultsMsg.empty-state,
    #noFilterResults.empty-state,
    .no-results-message,
    .no-results-state,
    .empty-job-fairs
) {
    width: 100%;
    padding: 48px 20px !important;
    color: #8993a4 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    #noResultsMsg.empty-state,
    #noFilterResults.empty-state,
    .no-results-message,
    .no-results-state,
    .empty-job-fairs
) > i {
    display: block !important;
    margin: 0 auto 10px !important;
    color: #98a2b3 !important;
    font-size: 22px !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    #noResultsMsg.empty-state,
    #noFilterResults.empty-state,
    .no-results-message,
    .no-results-state,
    .empty-job-fairs
) :is(h2, h3, strong, span) {
    margin: 0 !important;
    color: #8993a4 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    #noResultsMsg.empty-state,
    #noFilterResults.empty-state,
    .no-results-message,
    .no-results-state,
    .empty-job-fairs
) p {
    margin: 4px 0 0 !important;
    color: #98a2b3 !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
}

/* Canonical search-control spacing. 20px is reserved for surrounding
   filter-card spacing; applying 20px inside inputs makes controls too tall.
   Search inputs use a 44px control height, 16px text-side padding, and
   44px left padding when an icon occupies the leading edge. */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .dashboard-search-box,
    .search-box,
    .job-fair-search-box,
    .job-fair-search,
    .attendee-search-wrap
) {
    position: relative;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .dashboard-search-box,
    .search-box,
    .job-fair-search-box,
    .job-fair-search,
    .attendee-search-wrap
) input[type="text"],
:where(.admin-app, .employer-app, .jobseeker-app) input.search-input {
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    padding-top: 0 !important;
    padding-right: 16px !important;
    padding-bottom: 0 !important;
    border-radius: 8px;
    font-size: 13px;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .dashboard-search-box,
    .search-box,
    .job-fair-search-box,
    .attendee-search-wrap
) input[type="text"] {
    padding-left: 44px !important;
}

:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .dashboard-search-box,
    .search-box,
    .job-fair-search-box,
    .attendee-search-wrap
) :is(.search-icon, .fa-magnifying-glass) {
    left: 16px !important;
}

/* Search/filter cards that already use a contained card treatment share
   20px inner spacing; transparent inline toolbars remain compact. */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
    .search-card,
    .filter-card,
    .search-section.dashboard-filter-section,
    .filter-section.dashboard-filter-section
) {
    padding: 20px !important;
}

@media (max-width: 800px) {
    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .standardized-no-results,
        .empty-row,
        .admin-no-results-row,
        .admin-static-empty-row,
        .no-results-row,
        .refinement-no-results
    ) td::before {
        display: none !important;
        content: none !important;
    }
}

/* ============================================================
   WEB UI PROPORTION NORMALIZATION — 2026-10-04
   Keep routine Admin / Employer / Job Seeker actions compact and
   proportional. Kiosk and intentional hero/large CTA controls are
   deliberately excluded.
============================================================ */
@media (min-width: 769px) {
    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .btn-action,
        .action-btn,
        .primary-btn,
        .secondary-btn,
        .btn-primary,
        .btn-secondary,
        .modal-btn,
        .modal-cancel,
        .modal-save,
        .publish-btn,
        .cancel-btn,
        .reset-filter-btn
    ):not(.btn-lg):not(.large-btn):not(.hero-btn):not(.dashboard-primary-link) {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 14px;
        line-height: 1.2;
        gap: 7px;
    }

    :where(.admin-app, .employer-app, .jobseeker-app) :is(
        .btn-action,
        .action-btn,
        .primary-btn,
        .secondary-btn,
        .btn-primary,
        .btn-secondary,
        .modal-btn,
        .modal-cancel,
        .modal-save,
        .publish-btn,
        .cancel-btn,
        .reset-filter-btn
    ) i {
        font-size: 0.95em;
    }
}

/* 2026-10-10: shared web action sizing; no kiosk or destructive overrides */
:where(.admin-app, .employer-app, .jobseeker-app) :is(
  .btn-primary, .btn-secondary, .primary-btn, .secondary-btn,
  .btn-action, .action-btn, .modal-btn, .modal-save, .modal-cancel,
  .publish-btn, .cancel-btn, .reset-filter-btn
):not(.btn-lg):not(.large-btn):not(.hero-btn):not(.dashboard-primary-link):not(.danger):not(.btn-danger) {
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
:where(.admin-app, .employer-app, .jobseeker-app) :is(
  .btn-primary, .primary-btn, .modal-save
):not(.danger):not(.btn-danger) {
  background-color: #0e3386;
  border-color: #0e3386;
  color: #fff;
}
:where(.admin-app, .employer-app, .jobseeker-app) :is(
  .btn-primary, .primary-btn, .modal-save
):not(.danger):not(.btn-danger):hover:not(:disabled) {
  background-color: #0a286d;
  border-color: #0a286d;
}
:where(.admin-app, .employer-app, .jobseeker-app) :is(
  .btn-secondary, .secondary-btn, .modal-cancel, .cancel-btn
):not(.danger):not(.btn-danger) {
  background-color: #fff;
  border: 1px solid #c6d5f0;
  color: #0e3386;
}
@media (max-width: 480px) {
  :where(.admin-app, .employer-app, .jobseeker-app) :is(
    .btn-primary, .btn-secondary, .primary-btn, .secondary-btn,
    .btn-action, .action-btn, .modal-btn, .modal-save, .modal-cancel
  ) { max-width: 100%; white-space: normal; }
}


/* October 10.4 consistency pass — standard authenticated pages only.
   Supervised registration intentionally excluded. */
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(button, .btn, input[type="submit"], input[type="button"]):not(.swal2-close):not(.notification-toggle):not(.profile-menu-toggle) {
    font-family: inherit;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(button, .btn, input[type="submit"], input[type="button"]):focus-visible {
    outline: 3px solid rgba(23, 92, 211, .35);
    outline-offset: 2px;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    max-width: 100%;
    font-family: inherit;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible {
    outline: 2px solid rgba(23, 92, 211, .22);
    outline-offset: 1px;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(.modal-content, .modal-dialog, .swal2-popup) {
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) .swal2-actions {
    justify-content: center !important;
    align-items: center;
    gap: 10px;
}
:where(.admin-app, .employer-app, .jobseeker-app, .auth-app) .swal2-actions > button {
    margin: 0;
    min-height: 42px;
}
@media (max-width: 600px) {
    :where(.admin-app, .employer-app, .jobseeker-app, .auth-app) .swal2-actions {
        flex-wrap: wrap;
    }
    :where(.admin-app, .employer-app, .jobseeker-app, .auth-app) :is(.modal-content, .swal2-popup) {
        max-height: calc(100dvh - 28px);
        overflow-y: auto;
    }
}

/* Phase 11: compact standard dialogs (2026-10-10).
   Scoped to conventional modal-dialog containers. Excludes kiosk,
   supervised registration, full-screen and explicitly large dialogs. */
@media (min-width: 601px) {
  :where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-lg):not(.modal-xl):not(.modal-fullscreen):not(.wide-modal):not(.large-modal) {
    width: min(540px, calc(100vw - 40px));
    max-width: min(540px, calc(100vw - 40px));
    margin-left: auto;
    margin-right: auto;
  }
}
:where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-lg):not(.modal-xl):not(.modal-fullscreen) > .modal-content {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
}
:where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-lg):not(.modal-xl):not(.modal-fullscreen) .modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
:where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-lg):not(.modal-xl):not(.modal-fullscreen) .modal-footer > :is(button, .btn, a.btn) {
  width: auto;
  min-width: 112px;
  max-width: 100%;
  margin: 0;
}
@media (max-width: 600px) {
  :where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-fullscreen) {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin: 14px auto;
  }
  :where(.admin-app, .employer-app, .jobseeker-app) .modal-dialog:not(.modal-fullscreen) > .modal-content {
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
  }
}
