:root {
    --bg-main: rgb(240, 240, 240);
    --bg-sidebar: rgb(240, 240, 240);
    --bg-card: hsl(0, 100%, 100%);
    --bg-card-soft: rgb(240, 240, 240);

    --gold: #c9a227;
    --gold-light: #e0c45c;

    --text-primary: #000000;
    --text-secondary: #000000;
    --text-muted: #000000;

    --success: #4caf7d;
    --danger: #d96565;
    --warning: #d7a84a;

    /* Was referenced everywhere (sidebar edge, topbar edge, cards, nav)
       but never defined, so every border was invisible. Added to match
       the existing light background. */
    --border: #d9d9d9;

    --sidebar-width: 250px;
    --topbar-height: 82px;

    --radius: 10px;
    --transition: 160ms ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --------------------------------------------------
   Application Shell
-------------------------------------------------- */

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;

    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);

    z-index: 100;
}

.main-content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* --------------------------------------------------
   Brand
-------------------------------------------------- */

.brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 22px;
    border-bottom: 1px solid var(--border);
}

.brand-mark {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--gold);
    border-radius: 8px;

    color: var(--gold-light);
    font-size: 18px;
    font-weight: 700;
}

.brand-name {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.brand-subtitle {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --------------------------------------------------
   Navigation
   (merged: scrollable panel + slim-scrollbar variant
   that was previously declared a second time further down)
-------------------------------------------------- */

.navigation {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 18px;
    scrollbar-width: thin;
}

.navigation::-webkit-scrollbar {
    width: 5px;
}

.navigation::-webkit-scrollbar-track {
    background: transparent;
}

.navigation::-webkit-scrollbar-thumb {
    background: #c9aaa4;
    border-radius: 10px;
}

.nav-section {
    margin: 18px 12px 7px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.nav-section:first-child {
    margin-top: 2px;
}

.nav-item {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 40px;
    margin-bottom: 3px;
    padding: 0 11px;

    border-radius: 6px;

    color: #000000;
    font-size: 12px;

    transition:
        background var(--transition),
        color var(--transition);
}

.nav-item:hover {
    background: #f8ddd8;
    color: #000000;
}

.nav-item.active {
    background: #f8ddd8;
    color: #000000;
    font-weight: 700;
}

.nav-item.active::before {
    content: "";

    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;

    width: 2px;

    background: var(--gold);
    border-radius: 2px;
}

.nav-item.active:hover {
    background: #f8ddd8;
    color: #000000;
}

.nav-item.active .nav-icon {
    color: #000000;
}

.nav-icon {
    width: 20px;
    min-width: 20px;
    text-align: center;
    color: inherit;
    font-size: 15px;
}

.navigation-settings {
    flex-shrink: 0;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}

.navigation-settings .nav-item {
    margin-bottom: 0;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.security-indicator {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-muted);
    font-size: 11px;
}

.security-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(76, 175, 125, 0.35);
}

/* --------------------------------------------------
   Topbar
-------------------------------------------------- */

.topbar {
    min-height: var(--topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 16px 30px;

    background: rgb(240, 240, 240);
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    margin-bottom: 3px;

    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.topbar h1 {
    margin: 0;

    color: var(--text-primary);
    font-size: 21px;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    width: 38px;
    height: 38px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--bg-card);
    color: var(--text-secondary);

    transition:
        border-color var(--transition),
        color var(--transition);
}

.icon-button:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(201, 162, 39, 0.14);
    border: 1px solid rgba(201, 162, 39, 0.35);

    color: var(--gold-light);
    font-size: 11px;
    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.user-info span {
    color: var(--text-muted);
    font-size: 10px;
}

.logout-form {
    margin-left: 16px;
}

.logout-button {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: inherit;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------
   Hospital Header
-------------------------------------------------- */

.hospital-name {
    margin: 0;
    color: #000000;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.hospital-address {
    margin-top: 4px;
    color: #000000;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.hospital-phone {
    margin-top: 2px;
    color: #000000;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

/* --------------------------------------------------
   Page Content
   (merged: Employee Management redeclared these with
   slightly different values later in the file — this
   is the version that was actually winning)
-------------------------------------------------- */

.page-content {
    padding: 30px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 24px;
}

.shift-template-status {
    flex: 0 0 auto;
    min-width: 320px;
    max-width: 420px;
    padding: 12px 16px;
    border: 1px solid #d9dde2;
    border-radius: 6px;
    background: #ffffff;
    box-sizing: border-box;
    text-align: right;
}

.shift-template-status-label {
    margin-bottom: 4px;
    color: #7a5f0f;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.shift-template-status-value {
    color: #1b1f24;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.page-header h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 600;
}

.page-header p {
    margin: 5px 0 0;
    color: var(--text-secondary);
}

.page-eyebrow {
    margin-bottom: 6px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.3px;
}

.page-description {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --------------------------------------------------
   Cards
-------------------------------------------------- */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 20px;
}

/* --------------------------------------------------
   Buttons
   (merged: .btn-primary was redeclared under Employee
   Management with white text / bolder weight — kept
   that, since it was the effective final version)
-------------------------------------------------- */

.btn {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 16px;

    border: 1px solid transparent;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.btn-primary {
    min-height: 40px;
    padding: 0 16px;

    border: 1px solid var(--gold);
    border-radius: 7px;

    background: var(--gold);
    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.btn-primary:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card-soft);
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--text-primary);
}

/* Shift Detail Header Action */
.shift-detail-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.shift-detail-page .page-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.shift-detail-page .shift-detail-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--gold);
    border-radius: 7px;
    background: var(--gold);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.shift-detail-page .shift-detail-back-button:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: #ffffff;
}



/* --------------------------------------------------
   Forms
-------------------------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 40px;

    padding: 8px 11px;

    background: #f8ddd8;
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-primary);
    outline: none;

    transition: border-color var(--transition);
}

.form-control:focus {
    border-color: var(--gold);
}

.form-hint {
    color: var(--text-muted);
    font-size: 10px;
}

/* --------------------------------------------------
   Dashboard
-------------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin-bottom: 24px;
}

.workforce-snapshot {
    width: 100%;
    margin-bottom: 24px;
}

.workforce-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 18px;
}

.workforce-snapshot-grid .dashboard-stat {
    min-height: 150px;
}

.dashboard-stat {
    min-height: 150px;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid #d8bdb8;
}

.stat-label {
    color: #000000;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.stat-value {
    margin-top: 14px;
    color: #000000;
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
}

.stat-description {
    margin-top: 12px;
    color: #000000;
    font-size: 11px;
}

.dashboard-section-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.dashboard-section-grid .card {
    background: var(--bg-card);
    border-color: #d8bdb8;
}

.dashboard-section-grid .card-header {
    border-bottom-color: #d8bdb8;
}

.dashboard-section-grid h3 {
    margin: 0;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-card-description {
    margin: 0 0 18px;
    color: #000000;
    font-size: 12px;
    line-height: 1.7;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 0;
    border-bottom: 1px solid #d8bdb8;

    color: #000000;
    font-size: 12px;
}

.status-row:last-child {
    border-bottom: 0;
}

/* --------------------------------------------------
   Employee Lifecycle Actions
-------------------------------------------------- */

.employee-lifecycle-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.dashboard-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #b9a09b;
    border-radius: 6px;
    background: #f8ddd8;
    color: #000000;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-action-btn:hover {
    background: #f8ddd8;
    border-color: #000000;
    color: #000000;
}

/* --------------------------------------------------
   Employee Management — Summary + Directory
-------------------------------------------------- */

.employee-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.summary-card {
    padding: 18px 20px;

    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.summary-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.summary-value {
    margin-top: 7px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 650;
}

.summary-card.active .summary-value {
    color: var(--success);
}

.summary-card.leave .summary-value {
    color: var(--warning);
}

.summary-card.inactive .summary-value {
    color: var(--danger);
}

.directory-panel {
    overflow: hidden;

    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.directory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 20px 22px;

    border-bottom: 1px solid var(--border);
}

.directory-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 650;
}

.directory-subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 11px;
}

.directory-filter-form {
    padding: 18px 22px 20px;
    border-bottom: 1px solid var(--border);
}

.directory-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.directory-search,
.directory-select,
.directory-date {
    min-height: 42px;

    border: 1px solid #b8b8b8;
    border-radius: 7px;

    background: #ffffff;
    color: #111827;

    box-sizing: border-box;
    outline: none;

    transition: border-color var(--transition);
}

.directory-search {
    flex: 1 1 280px;
    min-width: 240px;
    padding: 0 13px;
}

.directory-select {
    flex: 0 1 170px;
    min-width: 150px;
    padding: 0 36px 0 13px;
    cursor: pointer;
}

.directory-search::placeholder {
    color: #8a8f98;
}

.directory-search:hover,
.directory-select:hover,
.directory-date:hover {
    border-color: #8c8c8c;
}

.directory-search:focus,
.directory-select:focus,
.directory-date:focus {
    border-color: #b89b5e;
    box-shadow: 0 0 0 2px rgba(184, 155, 94, 0.15);
}

.directory-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    flex-wrap: wrap;
}

.directory-date-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.directory-date-group label {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.directory-date {
    min-width: 165px;
    padding: 0 12px;
}

.directory-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.directory-filter-button,
.directory-clear-button {
    min-height: 42px;
    padding: 0 17px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 650;
    text-decoration: none;

    box-sizing: border-box;
    cursor: pointer;
    transition: all var(--transition);
}

.directory-filter-button {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #111111;
}

.directory-filter-button:hover {
    filter: brightness(0.94);
}

.directory-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-secondary);
}

.directory-clear-button:hover {
    border-color: #b8b8b8;
    color: var(--text-primary);
}

.employee-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.employee-table th {
    padding: 12px 18px;

    background: var(--bg-card-soft);
    border-bottom: 1px solid var(--border);

    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.employee-table td {
    padding: 15px 18px;

    border-bottom: 1px solid var(--border);

    color: var(--text-secondary);
    font-size: 12px;
    vertical-align: middle;
}

.employee-table tbody tr {
    transition: background var(--transition);
}

.employee-table tbody tr:hover {
    background: rgba(201, 162, 39, 0.035);
}

.employee-table tbody tr:last-child td {
    border-bottom: 0;
}

.employee-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 220px;
}

.employee-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 50%;

    background: rgba(201, 162, 39, 0.10);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
}

.employee-name {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 650;
}

.employee-role {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10px;
}

.employee-code {
    color: var(--text-primary);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    white-space: nowrap;
}

.employee-meta {
    color: var(--text-secondary);
    font-size: 11px;
}

/* --------------------------------------------------
   Status badge
   (merged: three separate declarations existed for
   .status-badge and its color variants — some using
   status-on-leave, others status-on_leave. Both are
   kept below since different templates may use either;
   worth checking which one your Jinja templates actually
   render — see note at the end of my reply.)
-------------------------------------------------- */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 82px;
    padding: 7px 13px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-active {
    background: #e6f4ea;
    color: #246b3c;
    border: 1px solid #b9dfc3;
}

.status-on-leave,
.status-on_leave {
    background: #fff4d6;
    color: #80631c;
    border: 1px solid #ead28b;
}

.status-inactive {
    background: #eeeeee;
    color: #555555;
    border: 1px solid #d4d4d4;
}

.status-terminated {
    background: #fbe7e7;
    color: #8a3030;
    border: 1px solid #e6bcbc;
}

.employee-action {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.employee-action:hover {
    color: var(--gold-light);
}

.directory-empty {
    padding: 60px 20px;
    text-align: center;
}

.directory-empty-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 650;
}

.directory-empty-text {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

/* =========================================================
   EMPLOYEE PROFILE — Premium Enterprise UI
   ========================================================= */

.profile-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 32px 48px;
}

.profile-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #7a7f87;
}

.profile-breadcrumb a {
    color: #8f733c;
    text-decoration: none;
    font-weight: 600;
}

.profile-breadcrumb a:hover {
    text-decoration: underline;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    margin-bottom: 22px;

    background: linear-gradient(135deg, #171717 0%, #222222 100%);

    border: 1px solid #303030;
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.profile-header-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #b89b5e;
    color: #171717;

    font-size: 24px;
    font-weight: 700;

    box-shadow: 0 0 0 4px rgba(184, 155, 94, 0.15);
}

.profile-name {
    margin: 0;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
}

.profile-job-title {
    margin-top: 6px;
    color: #d4d4d4;
    font-size: 14px;
}

.profile-code {
    margin-top: 8px;
    color: #b89b5e;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.profile-status {
    flex-shrink: 0;
}

.profile-section {
    margin-bottom: 20px;

    background: #ffffff;

    border: 1px solid #dedede;
    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

    overflow: hidden;
}

.profile-section-header {
    display: flex;
    align-items: center;

    min-height: 54px;
    padding: 0 22px;

    background: #fafafa;

    border-bottom: 1px solid #e4e4e4;
}

.profile-section-header h2 {
    margin: 0;
    color: #202124;
    font-size: 15px;
    font-weight: 700;
}

.profile-section-header .profile-section-edit-button {
    margin-left: auto;
}

.profile-section-header .profile-section-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    column-gap: 40px;
    row-gap: 0;

    padding: 4px 22px 12px;
}

.profile-field {
    padding: 16px 0;
    border-bottom: 1px solid #eeeeee;
}

.profile-field:nth-last-child(-n + 2) {
    border-bottom: none;
}

.profile-label {
    margin-bottom: 5px;
    color: #777c84;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.profile-value {
    color: #22252a;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.profile-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.profile-table thead th {
    padding: 13px 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #dddddd;
    color: #666b73;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    white-space: nowrap;
}

.profile-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eeeeee;
    color: #2b2e33;
    vertical-align: middle;
}

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

.profile-table tbody tr:hover {
    background: #fcfbf8;
}

.profile-empty {
    padding: 24px 22px;
    color: #858a91;
    font-size: 13px;
    text-align: center;
}

.profile-actions {
    display: flex;
    align-items: center;
    margin-top: 24px;
}

.profile-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 0 16px;

    border: 1px solid #c9c9c9;
    border-radius: 7px;

    background: #ffffff;
    color: #333333;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.profile-back-button:hover {
    background: #f7f5ef;
    border-color: #b89b5e;
    color: #6f5727;
}

.profile-edit-button,
.profile-save-button,
.profile-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 0 16px;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
}

.profile-edit-button,
.profile-save-button {
    border: 1px solid #b89b5e;
    background: #b89b5e;
    color: #ffffff;
}

.profile-edit-button:hover,
.profile-save-button:hover {
    background: #9f8249;
    border-color: #9f8249;
}

.profile-cancel-button {
    border: 1px solid #c9c9c9;
    background: #ffffff;
    color: #333333;
}

.profile-cancel-button:hover {
    background: #f7f5ef;
    border-color: #b89b5e;
    color: #6f5727;
}

.profile-edit-button:disabled,
.profile-save-button:disabled,
.profile-cancel-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Save/Cancel and Edit/Add button rows inside a record's edit form.
   Covers common naming variants in case the wrapper isn't literally
   .profile-action-group in these templates. */
.profile-actions,
.profile-action-group,
.form-actions,
.edit-actions,
[class$="-actions"] {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    margin-top: 8px;
}

.profile-edit-button,
.profile-save-button,
.profile-cancel-button {
    padding: 0 18px;
}

.profile-edit-form {
    display: none;
}

.profile-edit-form.is-active {
    display: block;
}

.profile-view-mode.is-hidden {
    display: none;
}

.profile-section-header.is-hidden {
    display: none;
}

.profile-form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.profile-form-field label {
    color: #6b7077;
    font-size: 12px;
    font-weight: 600;
}

.profile-form-field input {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;

    border: 1px solid #d2d2d2;
    border-radius: 6px;

    background: #ffffff;
    color: #222222;

    font: inherit;
    font-size: 13px;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.profile-form-field input:focus {
    outline: none;
    border-color: #b89b5e;
    box-shadow: 0 0 0 2px rgba(184, 155, 94, 0.12);
}

.profile-form-field input[readonly] {
    background: #f7f7f7;
    color: #777777;
}

.profile-edit-message {
    display: none;
    margin-bottom: 16px;

    padding: 11px 14px;

    border: 1px solid #d8d0bd;
    border-radius: 6px;

    background: #fbfaf6;
    color: #5f4d2a;

    font-size: 13px;
}

.profile-edit-message.is-visible {
    display: block;
}

/* --------------------------------------------------
   Education / Employment History records
-------------------------------------------------- */

.education-record,
.education-edit-record,
.employment-history-edit-record {
    margin: 16px 22px 0;
    border: 1px solid #cfcfcf;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

/* Last record in a section needs bottom breathing room too,
   since the section body itself has no bottom padding */
.education-record:last-child,
.education-edit-record:last-child,
.employment-history-edit-record:last-child {
    margin-bottom: 16px;
}

/* Defensive fallback: if Internal Assignment / Transfer History and
   Lifecycle & Audit use their own class names rather than reusing
   .education-record, this catches the same naming convention
   (anything ending in "-record") so those cards get the same inset
   instead of touching the panel edges. If a section still touches
   the edge after this, its class name doesn't match this pattern —
   tell me the exact class and I'll target it directly. */
[class$="-record"],
[class*="-record "] {
    margin: 16px 22px 0;
    border: 1px solid #cfcfcf;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

[class$="-record"]:last-child,
[class*="-record "]:last-child {
    margin-bottom: 16px;
}

.education-record-title,
.education-card-header {
    background: #111111;
    color: #ffffff;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.education-card-body {
    background: #ffffff;
    padding: 18px 16px;
}

.education-record .profile-grid,
.education-card-body .profile-grid {
    padding: 16px;
    margin: 0;
}

.education-edit-record .profile-form-field input,
.education-edit-record .profile-form-field select,
.employment-history-edit-record .profile-form-field input,
.employment-history-edit-record .profile-form-field select {
    width: 100%;
    box-sizing: border-box;
}

.emergency-contact-edit-table input[type="text"],
.emergency-contact-edit-table input[type="tel"],
.emergency-contact-edit-table input[type="email"] {
    width: 100%;
    min-width: 120px;
    min-height: 36px;
    padding: 7px 9px;

    border: 1px solid #d2d2d2;
    border-radius: 6px;

    background: #ffffff;
    color: #222222;

    font: inherit;
    font-size: 13px;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.emergency-contact-edit-table input[type="text"]:focus,
.emergency-contact-edit-table input[type="tel"]:focus,
.emergency-contact-edit-table input[type="email"]:focus {
    outline: none;
    border-color: #b89b5e;
    box-shadow: 0 0 0 2px rgba(184, 155, 94, 0.12);
}

.emergency-contact-edit-table td:last-child {
    text-align: center;
}

.emergency-contact-primary {
    width: 16px;
    height: 16px;
    accent-color: #b89b5e;
    cursor: pointer;
}

.emergency-contact-edit-table select.emergency-contact-relationship {
    width: 100%;
    min-width: 140px;
    min-height: 36px;
    padding: 7px 9px;

    border: 1px solid #d2d2d2;
    border-radius: 6px;

    background: #ffffff;
    color: #222222;

    font: inherit;
    font-size: 13px;

    box-sizing: border-box;
    cursor: pointer;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.emergency-contact-edit-table select.emergency-contact-relationship:focus {
    outline: none;
    border-color: #b89b5e;
    box-shadow: 0 0 0 2px rgba(184, 155, 94, 0.12);
}

/* =========================================================
   LOGIN PAGE (kept as its own dark theme, per request)
   ========================================================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    box-sizing: border-box;
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    padding: 46px 44px 30px;
    box-sizing: border-box;
    background: #111111;
    border: 1px solid #2b2b2b;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.60);
    text-align: left;
}

.login-brand {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #c19b32;
    border-radius: 9px;
    background: #0b0b0b;
    color: #d4af37;
    font-size: 27px;
    font-weight: 700;
}

.login-brand-name {
    margin: 0;
    color: #f4f4f4;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.login-brand-subtitle {
    margin-top: 8px;
    color: #858585;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.login-form {
    width: 100%;
}

.login-form .form-group {
    width: 100%;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #bdbdbd;
    font-size: 12px;
    font-weight: 600;
}

.login-form input {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #303030;
    border-radius: 6px;
    outline: none;
    background: #0b0b0b;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
}

.login-form input::placeholder {
    color: #606060;
}

.login-form input:focus {
    border-color: #b99735;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08);
}

.login-submit {
    display: block;
    width: 100%;
    height: 48px;
    margin: 6px 0 0;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid #d4af37;
    border-radius: 6px;
    background: #d4af37;
    color: #090909;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.login-submit:hover {
    background: #dfbd4d;
}

.login-error {
    width: 100%;
    margin-bottom: 20px;
    padding: 11px 13px;
    box-sizing: border-box;
    border: 1px solid #543333;
    border-radius: 6px;
    background: #1b1010;
    color: #d99a9a;
    font-size: 12px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #252525;
    text-align: center;
    color: #5d5d5d;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --------------------------------------------------
   Responsive
-------------------------------------------------- */

@media (max-width: 900px) {
    .sidebar {
        width: 210px;
    }

    .main-content {
        width: calc(100% - 210px);
        margin-left: 210px;
    }

    .page-content {
        padding: 22px;
    }
}

@media (max-width: 760px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .page-content {
        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
    }

    .employee-summary {
        grid-template-columns: 1fr;
    }

    .directory-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .directory-search,
    .directory-select {
        width: 100%;
    }
}


@media (max-width: 700px) {
    .app-shell {
        display: block;
    }

    .topbar {
        padding: 14px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 1100px) {
    .directory-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .directory-filters,
    .directory-filter-row {
        width: 100%;
    }

    .directory-search {
        flex: 1;
        width: auto;
    }

    .directory-filter-actions {
        margin-left: 0;
    }
}

@media (max-width: 1000px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .profile-page {
        padding: 18px 14px 32px;
    }

    .profile-header {
        padding: 22px 20px;
    }

    .profile-header-main {
        align-items: flex-start;
    }

    .profile-avatar {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .profile-name {
        font-size: 22px;
    }

    .profile-section-header {
        padding: 0 16px;
    }

    .profile-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-table thead th,
    .profile-table tbody td {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 1000px) {
    .workforce-snapshot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .workforce-snapshot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .login-container {
        padding: 20px 15px;
    }

    .login-card {
        max-width: 390px;
        padding: 38px 25px 27px;
    }

    .login-brand-name {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .employee-lifecycle-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .profile-page {
        padding: 22px 20px 40px;
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-status {
        align-self: flex-start;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .profile-field:nth-last-child(-n + 2) {
        border-bottom: 1px solid #eeeeee;
    }

    .profile-field:last-child {
        border-bottom: none;
    }
}


/* External Employment History empty state */
#employment-history-view .profile-empty-state {
    padding: 20px 22px 22px;
}


/* User Account Association empty state */
#user-account-association-section .profile-empty-state {
    padding: 20px 22px 22px;
}

/* Employee Directory result count alignment */
.directory-result-meta {
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}

.directory-result-meta span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.directory-result-meta strong {
    color: var(--text-primary);
    font-weight: 650;
}


/* =========================================================
   SHIFT TEMPLATE DIRECTORY FILTERS
========================================================= */

.shift-template-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 14px;
    width: 100%;
}

.shift-template-filter-grid .directory-search,
.shift-template-filter-grid .directory-select {
    width: 100%;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
}

.directory-filter-form > .directory-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    margin-left: 0;
}

@media (max-width: 1200px) {
    .shift-template-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shift-template-filter-grid {
        grid-template-columns: 1fr;
    }

    .directory-filter-form > .directory-filter-actions {
        justify-content: flex-start;
    }
}


.employee-derived-readonly {
    pointer-events: none;
    cursor: default;
}

.employee-derived-text {
    min-height: 40px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    color: #333333;
    font-size: 13px;
    font-weight: 400;
}

.employee-derived-text[hidden] {
    display: none !important;
}

.employee-derived-field[hidden],
.employee-derived-display[hidden] {
    display: none !important;
}

/* =========================================================
   LAST 3 SHIFTS HISTORY TABLE
========================================================= */
#lastThreeShiftsTableWrapper table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #b7b7b7;
}

#lastThreeShiftsTableWrapper th,
#lastThreeShiftsTableWrapper td {
    border: 1px solid #b7b7b7;
    text-align: left;
    padding: 8px;
}

#lastThreeShiftsTableWrapper th {
    font-weight: 600;
    background-color: #f2f2f2;
}

#lastThreeShiftsTableWrapper tbody tr:nth-child(even) {
    background-color: #fafafa;
}


/* --------------------------------------------------
   Employee Directory — Enterprise Table
   Scoped to Employee Management only
-------------------------------------------------- */

.employee-directory-table {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
}

.employee-directory-table .employee-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

.employee-directory-table .employee-table th {
    padding: 13px 18px;
    background: var(--bg-card-soft);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.employee-directory-table .employee-table th:nth-child(1) {
    width: 25%;
}

.employee-directory-table .employee-table th:nth-child(2) {
    width: 24%;
}

.employee-directory-table .employee-table th:nth-child(3) {
    width: 15%;
}

.employee-directory-table .employee-table th:nth-child(4) {
    width: 10%;
}

.employee-directory-table .employee-table th:nth-child(5) {
    width: 12%;
}

.employee-directory-table .employee-table th:nth-child(6) {
    width: 9%;
}

.employee-directory-table .employee-table th:nth-child(7) {
    width: 5%;
}

.employee-directory-table .employee-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    vertical-align: middle;
}

.employee-directory-table .employee-table tbody tr {
    transition:
        background var(--transition),
        box-shadow var(--transition);
}

.employee-directory-table .employee-table tbody tr:hover {
    background: rgba(201, 162, 39, 0.035);
}

.employee-directory-table .employee-table tbody tr:last-child td {
    border-bottom: 0;
}

.employee-directory-table .employee-identity {
    min-width: 0;
    gap: 12px;
}

.employee-directory-table .employee-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 11px;
}

.employee-directory-table .employee-name {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

.employee-directory-table .employee-name a {
    color: inherit;
    text-decoration: none;
}

.employee-directory-table .employee-name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.employee-directory-table .employee-role {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.35;
}

.employee-directory-table .employee-code {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 10px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-directory-table .employee-meta {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-directory-table .status-badge {
    min-width: 72px;
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 0.4px;
}

/* Preserve usability on narrower screens. */
@media (max-width: 1100px) {
    .employee-directory-table .employee-table {
        min-width: 1050px;
    }
}

@media (max-width: 700px) {
    .employee-directory-table .employee-table {
        min-width: 980px;
    }

    .employee-directory-table .employee-table th,
    .employee-directory-table .employee-table td {
        padding-left: 14px;
        padding-right: 14px;
    }
}
/*========================Shift templates====================== */

/* ==========================================================================
   SHIFT TEMPLATES LIST — FAST ENTERPRISE UI PASS
   Presentation only. Do not change functionality.
   ========================================================================== */

.shift-template-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.3fr)
        repeat(2, minmax(150px, 1fr))
        repeat(3, minmax(150px, 1fr))
        minmax(220px, 1.3fr)
        minmax(170px, 1fr)
        minmax(170px, 1fr);
    gap: 10px;
    align-items: center;
}

.shift-template-filter-grid .directory-search,
.shift-template-filter-grid .directory-select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.shift-template-filter-grid .designation-category-filter {
    width: 100%;
    min-width: 0;
}

.employee-page .page-header {
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 20px;
}

.employee-page .page-eyebrow {
    margin-bottom: 5px;
    color: var(--wf-gold-dark, #7a5f0f);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.employee-page .page-title {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 22px;
    line-height: 30px;
    font-weight: 600;
}

.employee-page .page-description {
    max-width: 700px;
    margin: 5px 0 0;
    color: var(--wf-muted, #626a73);
    font-size: 13px;
    line-height: 20px;
}

/* Create button */
.employee-page .page-header > .profile-save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--wf-gold-dark, #7a5f0f);
    border-radius: 6px;
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.employee-page .page-header > .profile-save-button:hover {
    background: #b8941f;
}

/* Summary cards */
.employee-page .employee-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.employee-page .summary-card {
    min-height: 78px;
    padding: 16px 18px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 7px;
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(0, 0, 0, 0.05));
}

.employee-page .summary-label {
    margin-bottom: 6px;
    color: var(--wf-muted, #626a73);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.employee-page .summary-value {
    color: var(--wf-text, #1b1f24);
    font-size: 21px;
    line-height: 28px;
    font-weight: 600;
}

.employee-page .summary-card.active {
    border-left: 3px solid var(--wf-success, #2f7d55);
}

.employee-page .summary-card.inactive {
    border-left: 3px solid var(--wf-danger, #a83d3d);
}

/* Directory panel */
.employee-page .directory-panel {
    background: #ffffff;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 8px;
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(0, 0, 0, 0.05));
}

.employee-page .directory-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
}

.employee-page .directory-title {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.employee-page .directory-subtitle {
    margin: 4px 0 0;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
    line-height: 18px;
}

/* Filters */
.employee-page .directory-filter-form {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
}

.employee-page .directory-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.employee-page .directory-filter-button,
.employee-page .directory-clear-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.employee-page .directory-filter-button {
    border: 1px solid var(--wf-gold-dark, #7a5f0f);
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
}

.employee-page .directory-filter-button:hover {
    background: #b8941f;
}

.employee-page .directory-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wf-border-strong, #7d858e);
    background: #ffffff;
    color: var(--wf-text, #1b1f24);
}

.employee-page .directory-clear-button:hover {
    background: #f7f8f9;
}

/* Result metadata */
.employee-page .directory-result-meta {
    padding: 12px 20px;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
    line-height: 18px;
    border-bottom: 1px solid #eceef1;
}

.employee-page .directory-result-meta strong {
    color: var(--wf-text, #1b1f24);
    font-weight: 600;
}

/* Shift template table */
.employee-page .employee-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.employee-page .employee-table-wrapper .employee-table {
    min-width: 1450px;
}

.employee-page .employee-table th {
    padding: 10px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid var(--wf-border-strong, #7d858e);
    color: var(--wf-secondary, #444b53);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.employee-page .employee-table td {
    padding: 11px 12px;
    font-size: 12px;
    line-height: 18px;
    vertical-align: middle;
}

.employee-page .employee-table tbody tr:hover {
    background: #faf9f4;
}

.employee-page .employee-table .employee-name {
    font-size: 13px;
    font-weight: 600;
}

.employee-page .employee-table .employee-name a {
    color: var(--wf-text, #1b1f24) !important;
}

.employee-page .employee-table .employee-name a:hover {
    color: var(--wf-gold-dark, #7a5f0f) !important;
}

.employee-page .employee-table .employee-role {
    max-width: 260px;
    margin-top: 2px;
    color: var(--wf-muted, #626a73);
    font-size: 11px;
    line-height: 16px;
}

.employee-page .employee-meta {
    color: var(--wf-secondary, #444b53);
    font-size: 12px;
    line-height: 18px;
}

/* Avatar */
.employee-page .employee-avatar {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    background: var(--wf-gold-soft, #f7f1dc);
    border: 1px solid #d8c98f;
    color: var(--wf-gold-dark, #7a5f0f);
    font-size: 12px;
    font-weight: 700;
}

/* Status */
.employee-page .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Pagination */
.employee-page .directory-pagination {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 14px 20px;
    border-top: 1px solid var(--wf-border, #d9dde2);
    overflow: hidden;
}

.employee-page .directory-pagination-summary {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
}

.employee-page .directory-pagination-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.employee-page .directory-pagination-info {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
}

.employee-page .directory-pagination-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.employee-page .directory-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--wf-border-strong, #7d858e);
    border-radius: 6px;
    background: #ffffff;
    color: var(--wf-text, #1b1f24);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.employee-page .directory-page-button:hover {
    background: #f7f8f9;
}

.employee-page .directory-page-button.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Empty state */
.employee-page .directory-empty {
    padding: 48px 20px;
    text-align: center;
}

.employee-page .directory-empty-title {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 15px;
    font-weight: 600;
}

.employee-page .directory-empty-text {
    margin: 6px auto 16px;
    max-width: 500px;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
    line-height: 19px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {

    .shift-template-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 900px) {

    .employee-page .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-page .employee-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shift-template-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .employee-page .employee-summary {
        grid-template-columns: 1fr;
    }

    .shift-template-filter-grid {
        grid-template-columns: 1fr;
    }

    .employee-page .directory-header,
    .employee-page .directory-filter-form {
        padding-left: 14px;
        padding-right: 14px;
    }

    .employee-page .directory-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding-left: 14px;
        padding-right: 14px;
    }

    .employee-page .directory-pagination-actions {
        width: 100%;
    }

    .employee-page .directory-page-button {
        flex: 1;
    }

    .employee-page .page-header > .profile-save-button {
        width: 100%;
    }
}

/* ==========================================================================
   SHIFT TEMPLATE CREATE — MODERN ENTERPRISE UI
   Presentation only — do not modify form/JS/business logic
   ========================================================================== */

.employee-page .directory-panel {
    background: var(--wf-surface, #ffffff);
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: var(--wf-radius-lg, 8px);
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(27, 31, 36, 0.06));
}

/* Create page header */
.employee-page .page-header {
    margin-bottom: 24px;
}

.employee-page .page-eyebrow {
    color: var(--wf-gold-dark, #7a5f0f);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.employee-page .page-title {
    margin-top: 4px;
    color: var(--wf-text, #1b1f24);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
}

.employee-page .page-description {
    max-width: 760px;
    margin-top: 7px;
    color: var(--wf-muted, #626a73);
    font-size: 13px;
    line-height: 1.55;
}

/* Panel header */
.employee-page .directory-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
    background: #ffffff;
}

.employee-page .directory-header h2 {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.employee-page .directory-header p {
    margin: 5px 0 0;
    color: var(--wf-muted, #626a73);
    font-size: 12px;
    line-height: 1.45;
}

/* Form layout */
.employee-page .profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    padding: 22px !important;
    box-sizing: border-box;
}

/* Form fields */
.employee-page .profile-form-field {
    min-width: 0;
}

.employee-page .profile-form-field > label {
    display: block;
    margin-bottom: 7px;
    color: var(--wf-text, #1b1f24);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.employee-page .profile-form-field input,
.employee-page .profile-form-field select,
.employee-page .profile-form-field textarea {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    border: 1px solid var(--wf-control-border, #7d858e);
    border-radius: 6px;
    background: #ffffff;
    color: var(--wf-text, #1b1f24);
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease,
        background-color 120ms ease;
}

.employee-page .profile-form-field input:hover,
.employee-page .profile-form-field select:hover,
.employee-page .profile-form-field textarea:hover {
    border-color: #555e67;
}

.employee-page .profile-form-field input:focus,
.employee-page .profile-form-field select:focus,
.employee-page .profile-form-field textarea:focus {
    border-color: var(--wf-focus, #1b1f24);
    outline: none;
    box-shadow: 0 0 0 2px rgba(27, 31, 36, 0.10);
}

.employee-page .profile-form-field input[readonly] {
    background: #f7f8f9;
    color: #626a73;
}

/* Derived/read-only values */
.employee-page .employee-derived-display,
.employee-page .shift-derived-display {
    min-height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 6px;
    background: #f7f8f9;
    color: var(--wf-text, #1b1f24);
    font-size: 13px;
    line-height: 1.4;
}

.employee-page .shift-derived-display {
    color: #444b53;
}

/* Validation/error message */
.employee-page .profile-edit-message {
    border: 1px solid #d9aaaa;
    border-radius: 6px;
    background: #fbf2f2;
    color: #7e2f2f;
    font-size: 13px;
    line-height: 1.45;
}

/* Dynamic history sections */
.employee-page #lastThreeShiftsSection,
.employee-page #employeeShiftHistorySection {
    margin: 0 22px;
    padding: 18px 0 22px !important;
    border-top: 1px solid var(--wf-border, #d9dde2);
}

.employee-page #lastThreeShiftsHeading,
.employee-page #employeeShiftHistoryHeading {
    margin: 0 0 6px !important;
    color: var(--wf-text, #1b1f24);
    font-size: 15px !important;
    font-weight: 600 !important;
}

.employee-page #lastThreeShiftsEmpty,
.employee-page #employeeShiftHistoryEmpty {
    padding: 12px 0 !important;
    color: var(--wf-muted, #626a73) !important;
    font-size: 13px !important;
}

/* History tables */
.employee-page #lastThreeShiftsTableWrapper,
.employee-page #employeeShiftHistoryTableWrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.employee-page #lastThreeShiftsTableWrapper table,
.employee-page #employeeShiftHistoryTableWrapper table {
    min-width: 900px;
}

.employee-page #lastThreeShiftsTableWrapper th,
.employee-page #employeeShiftHistoryTableWrapper th {
    white-space: nowrap;
}

/* Form actions */
.employee-page .profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px 22px !important;
    margin-top: 0;
    border-top: 1px solid var(--wf-border, #d9dde2);
    padding-top: 18px !important;
}

.employee-page .profile-save-button,
.employee-page button.profile-save-button {
    min-height: 36px;
    padding: 8px 15px;
    border: 1px solid #a68416;
    border-radius: 6px;
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition:
        background-color 120ms ease,
        border-color 120ms ease;
}

.employee-page .profile-save-button:hover,
.employee-page button.profile-save-button:hover {
    background: #b58f20;
    border-color: #8f7112;
}

.employee-page .profile-save-button:focus-visible,
.employee-page .profile-cancel-button:focus-visible {
    outline: 2px solid var(--wf-focus, #1b1f24);
    outline-offset: 2px;
}

.employee-page .profile-cancel-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 15px;
    border: 1px solid var(--wf-control-border, #7d858e);
    border-radius: 6px;
    background: #ffffff;
    color: var(--wf-text, #1b1f24);
    font-size: 13px;
    font-weight: 600;
}

.employee-page .profile-cancel-button:hover {
    background: #f4f5f6;
    border-color: #555e67;
}

/* Better select arrows / spacing */
.employee-page .profile-form-field select {
    cursor: pointer;
}

.employee-page .profile-form-field select:disabled {
    background: #f1f2f3;
    color: #7a8188;
    cursor: not-allowed;
}

/* Hidden dynamic fields must remain hidden */
.employee-page .employee-derived-field[hidden],
.employee-page #handoverEmployeeField[hidden],
.employee-page #lastThreeShiftsSection[hidden],
.employee-page #lastThreeShiftsEmpty[hidden],
.employee-page #lastThreeShiftsTableWrapper[hidden],
.employee-page #employeeShiftHistorySection[hidden],
.employee-page #employeeShiftHistoryEmpty[hidden],
.employee-page #employeeShiftHistoryTableWrapper[hidden] {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    .employee-page .profile-form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media (max-width: 600px) {
    .employee-page .page-title {
        font-size: 20px;
    }

    .employee-page .directory-header {
        padding: 18px;
    }

    .employee-page .profile-form-grid {
        padding: 18px !important;
    }

    .employee-page #lastThreeShiftsSection,
    .employee-page #employeeShiftHistorySection {
        margin: 0 18px;
    }

    .employee-page .profile-actions {
        padding-left: 18px !important;
        padding-right: 18px !important;
        flex-direction: column;
        align-items: stretch;
    }

    .employee-page .profile-save-button,
    .employee-page .profile-cancel-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .employee-page .profile-form-grid {
        padding: 16px !important;
    }

    .employee-page .directory-header {
        padding: 16px;
    }

    .employee-page #lastThreeShiftsSection,
    .employee-page #employeeShiftHistorySection {
        margin: 0 16px;
    }

    .employee-page .profile-actions {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .employee-page .profile-form-field input,
    .employee-page .profile-form-field select,
    .employee-page .profile-form-field textarea,
    .employee-page .profile-save-button,
    .employee-page .profile-cancel-button {
        transition: none;
    }
}

/* ==========================================================================
   EMPLOYEE PROFILE — ENTERPRISE UI OVERRIDE
   Presentation only — do not alter Employee Profile functionality.
   appened date 02-10-2026
   ========================================================================== */

/* --------------------------------------------------------------------------
   Profile page shell
   -------------------------------------------------------------------------- */

.profile-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.profile-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 18px;
    color: var(--wf-muted, #626a73);
}

.profile-breadcrumb a {
    color: var(--wf-gold-dark, #7a5f0f);
    font-weight: 600;
    text-decoration: none;
}

.profile-breadcrumb a:hover {
    text-decoration: underline;
}

.profile-breadcrumb span {
    color: var(--wf-muted, #626a73);
}


/* --------------------------------------------------------------------------
   Profile header
   -------------------------------------------------------------------------- */

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 108px;
    margin-bottom: 20px;
    padding: 24px;
    background: var(--wf-surface, #ffffff);
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: var(--wf-radius-lg, 8px);
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(0, 0, 0, 0.05));
}

.profile-header-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border: 1px solid #d8c98f;
    border-radius: 50%;
    background: var(--wf-gold-soft, #f7f1dc);
    color: var(--wf-gold-dark, #7a5f0f);
    font-size: 24px;
    font-weight: 700;
}

.profile-name {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 22px;
    line-height: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.profile-job-title {
    margin-top: 4px;
    color: var(--wf-secondary, #444b53);
    font-size: 13px;
    line-height: 19px;
}

.profile-code {
    margin-top: 5px;
    color: var(--wf-muted, #626a73);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 18px;
}

.profile-status {
    flex: 0 0 auto;
}


/* --------------------------------------------------------------------------
   Profile sections
   -------------------------------------------------------------------------- */

.profile-section {
    margin: 0 0 16px;
    padding: 0;
    background: var(--wf-surface, #ffffff);
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: var(--wf-radius-lg, 8px);
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(0, 0, 0, 0.05));
    overflow: hidden;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 14px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
}

.profile-section-header h2 {
    margin: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.profile-section-content,
.profile-section-body {
    padding: 20px;
}


/* --------------------------------------------------------------------------
   Profile grids
   -------------------------------------------------------------------------- */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
}

.profile-field,
.profile-form-field {
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid #eceef1;
}

.profile-field:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.profile-label,
.profile-form-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--wf-muted, #626a73);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.profile-value {
    min-width: 0;
    color: var(--wf-text, #1b1f24);
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
    overflow-wrap: anywhere;
}


/* --------------------------------------------------------------------------
   Edit / action buttons
   -------------------------------------------------------------------------- */

.profile-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-edit-button,
.profile-save-button,
.profile-cancel-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--wf-radius-md, 6px);
    font-family: inherit;
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        color 140ms ease,
        box-shadow 140ms ease;
}

.profile-edit-button {
    background: #ffffff;
    border: 1px solid var(--wf-border-strong, #7d858e);
    color: var(--wf-text, #1b1f24);
}

.profile-edit-button:hover {
    background: #f7f8f9;
    border-color: #5f6872;
}

.profile-save-button {
    background: var(--wf-gold, #c9a227);
    border: 1px solid var(--wf-gold-dark, #7a5f0f);
    color: #1b1f24;
}

.profile-save-button:hover {
    background: #b8941f;
}

.profile-cancel-button {
    background: #ffffff;
    border: 1px solid var(--wf-border-strong, #7d858e);
    color: var(--wf-text, #1b1f24);
}

.profile-cancel-button:hover {
    background: #f7f8f9;
}

.profile-edit-button:disabled,
.profile-save-button:disabled,
.profile-cancel-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.profile-form-field input,
.profile-form-field select,
.profile-form-field textarea,
.emergency-contact-field {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid var(--wf-border-strong, #7d858e);
    border-radius: var(--wf-radius-md, 6px);
    color: var(--wf-text, #1b1f24);
    font-family: inherit;
    font-size: 13px;
    line-height: 20px;
}

.profile-form-field textarea {
    min-height: 88px;
    resize: vertical;
}

.profile-form-field input:hover,
.profile-form-field select:hover,
.profile-form-field textarea:hover,
.emergency-contact-field:hover {
    border-color: #626b74;
}

.profile-form-field input:focus,
.profile-form-field select:focus,
.profile-form-field textarea:focus,
.emergency-contact-field:focus {
    outline: none;
    border-color: var(--wf-focus, #1b1f24);
    box-shadow: 0 0 0 2px rgba(27, 31, 36, 0.12);
}

.profile-form-field input:disabled,
.profile-form-field select:disabled,
.profile-form-field textarea:disabled,
.emergency-contact-field:disabled {
    background: #f3f4f5;
    color: #777f87;
    cursor: not-allowed;
}


/* --------------------------------------------------------------------------
   Form actions / messages
   -------------------------------------------------------------------------- */

.profile-actions,
.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px 20px;
}

.profile-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-edit-message,
.profile-form-message {
    margin: 0 20px;
    padding: 0;
    color: var(--wf-secondary, #444b53);
    font-size: 12px;
    line-height: 18px;
}

.profile-edit-message.is-visible {
    margin-top: 16px;
    padding: 9px 11px;
    background: #f7f8f9;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 6px;
}

.profile-edit-message.is-error,
.profile-form-message.is-error {
    color: var(--wf-danger, #a83d3d);
}


/* --------------------------------------------------------------------------
   Education / employment records
   -------------------------------------------------------------------------- */

.education-section-content,
.education-edit-section-content {
    padding: 20px;
}

.education-record,
.education-edit-record,
.employment-history-edit-record {
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 6px;
    overflow: hidden;
}

.education-record:last-child,
.education-edit-record:last-child,
.employment-history-edit-record:last-child {
    margin-bottom: 0;
}

.education-record-title,
.education-card-header {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    background: #f7f7f7;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
    color: var(--wf-text, #1b1f24);
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
}

.education-card-body {
    padding: 0 14px;
}

.education-card-body .profile-grid {
    gap: 0 24px;
}

.education-card-body .profile-field {
    padding: 11px 0;
}


/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.profile-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.profile-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #ffffff;
}

.profile-table th {
    padding: 10px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid var(--wf-border-strong, #7d858e);
    color: var(--wf-secondary, #444b53);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.profile-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eceef1;
    color: var(--wf-text, #1b1f24);
    font-size: 13px;
    line-height: 19px;
    vertical-align: middle;
}

.profile-table tbody tr:hover {
    background: #faf9f4;
}

.profile-table tbody tr:last-child td {
    border-bottom: 0;
}

.emergency-contact-edit-table {
    min-width: 900px;
}

.emergency-contact-edit-table input,
.emergency-contact-edit-table select {
    min-width: 130px;
}


/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.profile-empty,
.profile-empty-state {
    padding: 28px 20px;
    color: var(--wf-muted, #626a73);
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}


/* --------------------------------------------------------------------------
   Audit values
   -------------------------------------------------------------------------- */

.profile-value pre {
    margin: 0;
    max-width: 100%;
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: 6px;
    color: var(--wf-secondary, #444b53);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 17px;
    overflow-x: auto;
}


/* --------------------------------------------------------------------------
   Hidden / active states used by existing JavaScript
   -------------------------------------------------------------------------- */

.profile-view-mode.is-hidden {
    display: none;
}

.profile-edit-form {
    display: none;
}

.profile-edit-form.is-active {
    display: block;
}


/* --------------------------------------------------------------------------
   Responsive — tablet
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {

    .profile-page {
        padding-bottom: 32px;
    }

    .profile-header {
        padding: 20px;
    }

    .profile-grid {
        gap: 0 20px;
    }
}


/* --------------------------------------------------------------------------
   Responsive — mobile
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {

    .profile-page {
        padding-bottom: 24px;
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .profile-header-main {
        width: 100%;
    }

    .profile-status {
        align-self: flex-start;
    }

    .profile-avatar {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .profile-name {
        font-size: 19px;
        line-height: 26px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .profile-field:nth-last-child(-n + 2) {
        border-bottom: 1px solid #eceef1;
    }

    .profile-field:last-child {
        border-bottom: 0;
    }

    .profile-section-header {
        min-height: 54px;
        padding: 12px 16px;
    }

    .profile-section-content,
    .profile-section-body,
    .education-section-content,
    .education-edit-section-content {
        padding: 16px;
    }

    .profile-actions,
    .profile-form-actions {
        justify-content: stretch;
        padding: 14px 16px 16px;
    }

    .profile-action-group {
        width: 100%;
    }

    .profile-action-group button {
        flex: 1;
    }

    .profile-section-actions {
        flex-wrap: wrap;
    }
}


/* --------------------------------------------------------------------------
   Responsive — small mobile
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {

    .profile-breadcrumb {
        margin-bottom: 12px;
    }

    .profile-header {
        margin-bottom: 14px;
        padding: 16px;
    }

    .profile-header-main {
        gap: 12px;
    }

    .profile-name {
        font-size: 18px;
        line-height: 24px;
    }

    .profile-section {
        margin-bottom: 12px;
        border-radius: 6px;
    }

    .profile-section-header h2 {
        font-size: 15px;
    }

    .profile-section-actions {
        gap: 6px;
    }

    .profile-edit-button,
    .profile-save-button,
    .profile-cancel-button {
        min-height: 36px;
        padding: 0 11px;
    }
}


/* --------------------------------------------------------------------------
   Touch devices / reduced motion
   -------------------------------------------------------------------------- */

@media (pointer: coarse) {

    .profile-edit-button,
    .profile-save-button,
    .profile-cancel-button {
        min-height: 40px;
    }

    .profile-form-field input,
    .profile-form-field select,
    .profile-form-field textarea,
    .emergency-contact-field {
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .profile-edit-button,
    .profile-save-button,
    .profile-cancel-button,
    .profile-form-field input,
    .profile-form-field select,
    .profile-form-field textarea,
    .emergency-contact-field {
        transition: none;
    }
}


/* ==========================================================================
   EMPLOYEE DIRECTORY — HORIZONTAL TABLE SCROLL
   ========================================================================== */

.employee-page .employee-directory-table.employee-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.employee-page .employee-directory-table.employee-table-wrapper .employee-table {
    min-width: 980px;
}

/* ==========================================================================
   SHIFT TEMPLATE LIFECYCLE — HORIZONTAL
   ========================================================================== */

.shift-template-lifecycle {
    width: 100%;
    box-sizing: border-box;
    margin-top: 24px;
    padding: 20px 22px;
    background: LightGray;
    border: 1px solid #d9dde2;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.shift-template-lifecycle-title {
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    color: #1b1f24;
}

.shift-template-lifecycle-track {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 0;
}

.shift-template-lifecycle-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 6px;
}

.shift-template-lifecycle-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 15px);
    width: calc(100% - 30px);
    height: 2px;
    background: #d9dde2;
    z-index: 0;
}

.shift-template-lifecycle-step-number {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 auto 8px;
    border: 2px solid #c9a227;
    border-radius: 50%;
    background: #ffffff;
    color: #7a5f0f;
    font-size: 11px;
    font-weight: 700;
    box-sizing: border-box;
}

.shift-template-lifecycle-step-label {
    display: block;
    max-width: 130px;
    margin: 0 auto;
    color: #444b53;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
}

.shift-template-lifecycle-help {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e4e7ea;
    color: #626a73;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}


/* Active lifecycle step */

.shift-template-lifecycle-step.is-active
.shift-template-lifecycle-step-number {
    background: #c9a227;
    border-color: #c9a227;
    color: #ffffff;
}

.shift-template-lifecycle-step.is-active
.shift-template-lifecycle-step-label {
    color: #1b1f24;
    font-weight: 700;
}


/* Completed lifecycle step */

.shift-template-lifecycle-step.is-complete
.shift-template-lifecycle-step-number {
    background: #f7f1dc;
    border-color: #c9a227;
    color: #7a5f0f;
}


/* Completed connector */

.shift-template-lifecycle-step.is-complete:not(:last-child)::after {
    background: #c9a227;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .shift-template-lifecycle {
        overflow-x: auto;
    }

    .shift-template-lifecycle-track {
        min-width: 850px;
    }
}

@media (max-width: 600px) {
    .shift-template-lifecycle {
        padding: 16px;
    }

    .shift-template-lifecycle-track {
        min-width: 850px;
    }
}
/* ==========================================================================
   FROZEN EMPLOYEE DIRECTORY SPACING — DO NOT REMOVE
   ========================================================================== */

.employee-page .directory-panel {
    margin-top: 32px;
}

/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FILTER LAYOUT
   Two-row enterprise layout with actions aligned right
   ========================================================================== */

.shift-template-page form:has(input[placeholder="Search shift template..."]) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.shift-template-page form:has(input[placeholder="Search shift template..."]) > * {
    flex: 0 1 180px;
    min-width: 160px;
    box-sizing: border-box;
}

/* First row */
.shift-template-page form:has(input[placeholder="Search shift template..."]) > :nth-child(-n+6) {
    flex-basis: 180px;
}

/* Second-row filter controls */
.shift-template-page form:has(input[placeholder="Search shift template..."]) > :nth-child(7),
.shift-template-page form:has(input[placeholder="Search shift template..."]) > :nth-child(8),
.shift-template-page form:has(input[placeholder="Search shift template..."]) > :nth-child(9) {
    flex-basis: 200px;
}

/* Action area moves to the far right of row 2 */
.shift-template-page form:has(input[placeholder="Search shift template..."]) button {
    flex: 0 0 auto;
    min-width: 120px;
}

.shift-template-page form:has(input[placeholder="Search shift template..."]) button:first-of-type {
    margin-left: auto;
}

/* Keep actions together */
.shift-template-page form:has(input[placeholder="Search shift template..."]) button + button {
    margin-left: 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .shift-template-page form:has(input[placeholder="Search shift template..."]) > * {
        flex-basis: 180px;
    }

    .shift-template-page form:has(input[placeholder="Search shift template..."]) button:first-of-type {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .shift-template-page form:has(input[placeholder="Search shift template..."]) > * {
        flex: 1 1 calc(50% - 12px);
        min-width: 200px;
    }

    .shift-template-page form:has(input[placeholder="Search shift template..."]) button {
        flex: 0 1 auto;
    }
}

@media (max-width: 480px) {
    .shift-template-page form:has(input[placeholder="Search shift template..."]) > * {
        flex: 1 1 100%;
        min-width: 0;
    }
}


/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FINAL FILTER LAYOUT OVERRIDE
   Two-row enterprise layout. No horizontal clipping.
   ========================================================================== */

.shift-template-page form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.shift-template-page form .profile-form-field,
.shift-template-page form .form-group,
.shift-template-page form .filter-group,
.shift-template-page form > div {
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.shift-template-page form {
    display: grid !important;
    grid-template-columns:
        minmax(150px, 1.15fr)
        minmax(130px, .8fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr);
    gap: 12px !important;
    align-items: end !important;
}

/* Row 1 */
.shift-template-page form > *:nth-child(1),
.shift-template-page form > *:nth-child(2),
.shift-template-page form > *:nth-child(3),
.shift-template-page form > *:nth-child(4),
.shift-template-page form > *:nth-child(5),
.shift-template-page form > *:nth-child(6) {
    grid-row: 1 !important;
}

/* Row 2 */
.shift-template-page form > *:nth-child(7),
.shift-template-page form > *:nth-child(8),
.shift-template-page form > *:nth-child(9) {
    grid-row: 2 !important;
}

/* Action area stays on the right */
.shift-template-page form > .filter-actions,
.shift-template-page form > .form-actions,
.shift-template-page form > div:last-child {
    grid-row: 2 !important;
    justify-self: end !important;
}

/* Controls */
.shift-template-page form input,
.shift-template-page form select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* If Apply/Clear are direct buttons */
.shift-template-page form > button,
.shift-template-page form button {
    white-space: nowrap !important;
}

/* Prevent the page itself from creating a right-side overflow */
.shift-template-page,
.shift-template-page .page-content,
.shift-template-page .content-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

@media (max-width: 1200px) {
    .shift-template-page form {
        grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
    }

    .shift-template-page form > * {
        grid-row: auto !important;
    }

    .shift-template-page form > button {
        justify-self: start !important;
    }
}

@media (max-width: 760px) {
    .shift-template-page form {
        grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .shift-template-page form {
        grid-template-columns: 1fr !important;
    }

    .shift-template-page form > * {
        grid-column: 1 !important;
    }

    .shift-template-page form > button {
        justify-self: stretch !important;
        width: 100% !important;
    }
}


/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FINAL 2-ROW FILTER LAYOUT
   ========================================================================== */

/* Target ONLY the Shift Template Directory filter form:
   it contains Status + Designation Category + Designation + Designation Level.
*/
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;

    grid-template-columns:
        minmax(150px, 1.15fr)
        minmax(130px, .85fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr);

    gap: 12px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}

/* Every filter field stays inside its grid cell. */
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* All controls fill their assigned cells. */
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) input,
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   ROW 2 — designation filters on LEFT
   -------------------------------------------------------------------------- */

form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> *:has(#designation_category_id) {
    grid-column: 1 !important;
    grid-row: 2 !important;
}

form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> *:has(#designation_id) {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> *:has(#designation_level_id) {
    grid-column: 3 !important;
    grid-row: 2 !important;
}

/* --------------------------------------------------------------------------
   ROW 2 — ACTIONS on RIGHT
   -------------------------------------------------------------------------- */

form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> .filter-actions,
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> .form-actions {
    grid-column: 5 / 7 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Catch the actions wrapper even if it has no dedicated class. */
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
> div:last-child {
    grid-column: 5 / 7 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Buttons stay together on the right. */
form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
button {
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > *:has(#designation_category_id) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > *:has(#designation_id) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > *:has(#designation_level_id) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > .filter-actions,
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > .form-actions,
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > div:last-child {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        justify-self: end !important;
    }
}

@media (max-width: 760px) {
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id) {
        grid-template-columns: 1fr;
    }

    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > .filter-actions,
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > .form-actions,
    form:has(#status):has(#designation_category_id):has(#designation_id):has(#designation_level_id)
    > div:last-child {
        grid-column: 1 !important;
        justify-self: stretch !important;
        justify-content: flex-start !important;
    }
}


/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FINAL FILTER LAYOUT
   Uses the existing .directory-filter-controls and
   .directory-filter-actions markup.
   ========================================================================== */

.shift-template-page .directory-filter-controls {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;

    grid-template-columns:
        minmax(150px, 1.15fr)
        minmax(130px, .85fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr);

    gap: 12px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}

.shift-template-page .directory-filter-controls > * {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Row 2: Designation filters on the LEFT */
.shift-template-page .directory-filter-controls #designationCategoryFilter {
    grid-column: 1 !important;
    grid-row: 2 !important;
}

.shift-template-page .directory-filter-controls #designationFilter {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

.shift-template-page .directory-filter-controls #designationLevelFilter {
    grid-column: 3 !important;
    grid-row: 2 !important;
}

/* All other existing filters remain in Row 1 */
.shift-template-page .directory-filter-controls #employeeFilter {
    grid-column: 8 !important;
    grid-row: 1 !important;
}

/* Actions: right side of Row 2 */
.shift-template-page .directory-filter-actions {
    width: auto !important;
    max-width: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;

    margin-left: auto !important;
    box-sizing: border-box !important;
}

/* Keep actions visually on the right */
.shift-template-page .directory-filter-actions {
    grid-column: 6 / 9 !important;
    grid-row: 2 !important;
}

/* Do not let hidden inputs affect the visual layout */
.shift-template-page .directory-filter-actions input[type="hidden"] {
    display: none !important;
}

.shift-template-page .directory-filter-actions button,
.shift-template-page .directory-filter-actions a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .shift-template-page .directory-filter-controls {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .shift-template-page .directory-filter-controls #designationCategoryFilter {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .shift-template-page .directory-filter-controls #designationFilter {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    .shift-template-page .directory-filter-controls #designationLevelFilter {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }

    .shift-template-page .directory-filter-actions {
        grid-column: 3 / 5 !important;
        grid-row: 2 !important;
    }
}

@media (max-width: 760px) {
    .shift-template-page .directory-filter-controls {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .shift-template-page .directory-filter-controls > * {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .shift-template-page .directory-filter-actions {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 480px) {
    .shift-template-page .directory-filter-controls {
        grid-template-columns: 1fr;
    }

    .shift-template-page .directory-filter-controls > * {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .shift-template-page .directory-filter-actions {
        grid-column: 1 !important;
        grid-row: auto !important;
        width: 100% !important;
        justify-content: flex-end !important;
    }
}

/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FINAL TWO-ROW FILTER LAYOUT
   ========================================================================== */

.shift-template-page form:has(.directory-filter-controls) {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 12px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}

/*
 * The filter controls and action controls are siblings.
 * Make the existing filter wrapper participate directly
 * in the form's grid without changing the HTML structure.
 */
.shift-template-page form:has(.directory-filter-controls) .directory-filter-controls {
    display: contents !important;
}

/* Every filter control occupies one grid cell */
.shift-template-page form:has(.directory-filter-controls) .directory-filter-controls > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   ROW 1
   Search | Status | Organization | Branch | Department | Employee
   -------------------------------------------------------------------------- */

.shift-template-page form:has(.directory-filter-controls)
input[placeholder="Search shift template..."] {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.shift-template-page form:has(.directory-filter-controls)
select[name="status"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#organizationFilter {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#branchFilter {
    grid-column: 4 !important;
    grid-row: 1 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#departmentFilter {
    grid-column: 5 !important;
    grid-row: 1 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#employeeFilter {
    grid-column: 6 !important;
    grid-row: 1 !important;
}

/* --------------------------------------------------------------------------
   ROW 2
   Category | Designation | Level | [empty] | Apply | Clear
   -------------------------------------------------------------------------- */

.shift-template-page form:has(.directory-filter-controls)
#designationCategoryFilter {
    grid-column: 1 !important;
    grid-row: 2 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#designationFilter {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

.shift-template-page form:has(.directory-filter-controls)
#designationLevelFilter {
    grid-column: 3 !important;
    grid-row: 2 !important;
}

/* Actions stay on the right side of row 2 */
.shift-template-page form:has(.directory-filter-controls)
.directory-filter-actions {
    grid-column: 5 / 7 !important;
    grid-row: 2 !important;

    width: 100% !important;
    max-width: none !important;

    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    box-sizing: border-box !important;
}

.shift-template-page form:has(.directory-filter-controls)
.directory-filter-actions input[type="hidden"] {
    display: none !important;
}

.shift-template-page form:has(.directory-filter-controls)
.directory-filter-actions button,
.shift-template-page form:has(.directory-filter-controls)
.directory-filter-actions a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* --------------------------------------------------------------------------
   TABLET
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {

    .shift-template-page form:has(.directory-filter-controls) {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    input[placeholder="Search shift template..."] {
        grid-column: span 2 !important;
        grid-row: 1 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    select[name="status"] {
        grid-column: span 1 !important;
        grid-row: 1 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #organizationFilter {
        grid-column: span 1 !important;
        grid-row: 1 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #branchFilter {
        grid-column: span 1 !important;
        grid-row: 2 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #departmentFilter {
        grid-column: span 1 !important;
        grid-row: 2 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #employeeFilter {
        grid-column: span 1 !important;
        grid-row: 2 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #designationCategoryFilter {
        grid-column: span 1 !important;
        grid-row: 3 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #designationFilter {
        grid-column: span 1 !important;
        grid-row: 3 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    #designationLevelFilter {
        grid-column: span 1 !important;
        grid-row: 3 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions {
        grid-column: 3 / 5 !important;
        grid-row: 3 !important;
    }
}

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

@media (max-width: 760px) {

    .shift-template-page form:has(.directory-filter-controls) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    input[placeholder="Search shift template..."] {
        grid-column: 1 / -1 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 480px) {

    .shift-template-page form:has(.directory-filter-controls) {
        grid-template-columns: 1fr !important;
    }

    .shift-template-page form:has(.directory-filter-controls) .directory-filter-controls > *,
    .shift-template-page form:has(.directory-filter-controls)
    input[placeholder="Search shift template..."],
    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions {
        grid-column: 1 !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions {
        justify-content: stretch !important;
    }

    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions button,
    .shift-template-page form:has(.directory-filter-controls)
    .directory-filter-actions a {
        flex: 1 1 0 !important;
        text-align: center !important;
    }
}


/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — DEFINITIVE TWO-ROW FILTER LAYOUT
   Based on actual markup:
   .directory-filter-form:has(.shift-template-filter-grid)
     .directory-filters.shift-template-filter-grid
     .directory-filter-actions
   ========================================================================== */

.shift-template-page .directory-filter-form:has(.shift-template-filter-grid) {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}

/* Flatten the existing filter wrapper into the form grid */
.shift-template-page .directory-filter-form:has(.shift-template-filter-grid)
.directory-filters.shift-template-filter-grid {
    display: contents !important;
}

/* All filter controls */
.shift-template-page .directory-filter-form:has(.shift-template-filter-grid)
.directory-filters.shift-template-filter-grid > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   ROW 1
   Search | Status | Organization | Branch | Department | Employee
   ========================================================================== */

.shift-template-page #shiftTemplateSearch {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.shift-template-page #shiftTemplateStatusFilter {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.shift-template-page #organizationFilter {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

.shift-template-page #branchFilter {
    grid-column: 4 !important;
    grid-row: 1 !important;
}

.shift-template-page #departmentFilter {
    grid-column: 5 !important;
    grid-row: 1 !important;
}

.shift-template-page #employeeFilter {
    grid-column: 6 !important;
    grid-row: 1 !important;
}

/* ==========================================================================
   ROW 2
   Designation Category | Designation | Designation Level | empty | Actions
   ========================================================================== */

.shift-template-page #designationCategoryFilter {
    grid-column: 1 !important;
    grid-row: 2 !important;
}

.shift-template-page #designationFilter {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

.shift-template-page #designationLevelFilter {
    grid-column: 3 !important;
    grid-row: 2 !important;
}

/* Apply + Clear on right */
.shift-template-page .directory-filter-actions {
    grid-column: 5 / 7 !important;
    grid-row: 2 !important;

    width: 100% !important;
    max-width: none !important;

    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;

    margin: 0 !important;
    box-sizing: border-box !important;
}

.shift-template-page .directory-filter-actions input[type="hidden"] {
    display: none !important;
}

.shift-template-page .directory-filter-actions button,
.shift-template-page .directory-filter-actions a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1100px) {

    .shift-template-page .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .shift-template-page #shiftTemplateSearch {
        grid-column: 1 / 3 !important;
        grid-row: 1 !important;
    }

    .shift-template-page #shiftTemplateStatusFilter {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    .shift-template-page #organizationFilter {
        grid-column: 4 !important;
        grid-row: 1 !important;
    }

    .shift-template-page #branchFilter {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .shift-template-page #departmentFilter {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    .shift-template-page #employeeFilter {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }

    .shift-template-page #designationCategoryFilter {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    .shift-template-page #designationFilter {
        grid-column: 2 !important;
        grid-row: 3 !important;
    }

    .shift-template-page #designationLevelFilter {
        grid-column: 3 !important;
        grid-row: 3 !important;
    }

    .shift-template-page .directory-filter-actions {
        grid-column: 3 / 5 !important;
        grid-row: 3 !important;
    }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 760px) {

    .shift-template-page .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .shift-template-page #shiftTemplateSearch {
        grid-column: 1 / -1 !important;
    }

    .shift-template-page .directory-filter-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 480px) {

    .shift-template-page .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: 1fr !important;
    }

    .shift-template-page #shiftTemplateSearch,
    .shift-template-page #shiftTemplateStatusFilter,
    .shift-template-page #organizationFilter,
    .shift-template-page #branchFilter,
    .shift-template-page #departmentFilter,
    .shift-template-page #employeeFilter,
    .shift-template-page #designationCategoryFilter,
    .shift-template-page #designationFilter,
    .shift-template-page #designationLevelFilter,
    .shift-template-page .directory-filter-actions {
        grid-column: 1 !important;
    }

    .shift-template-page .directory-filter-actions {
        justify-content: stretch !important;
    }

    .shift-template-page .directory-filter-actions button,
    .shift-template-page .directory-filter-actions a {
        flex: 1 1 0 !important;
        text-align: center !important;
    }
}


/* ==========================================================================
   SHIFT TEMPLATE DIRECTORY — FINAL TWO-ROW FILTER LAYOUT
   ========================================================================== */

.directory-filter-form:has(.shift-template-filter-grid) {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}

.directory-filter-form:has(.shift-template-filter-grid) .directory-filters.shift-template-filter-grid {
    display: contents !important;
}

.directory-filter-form:has(.shift-template-filter-grid) .directory-filters.shift-template-filter-grid > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Row 1 */
.directory-filter-form:has(.shift-template-filter-grid) #shiftTemplateSearch {
    grid-column: 1;
    grid-row: 1;
}

.directory-filter-form:has(.shift-template-filter-grid) #shiftTemplateStatusFilter {
    grid-column: 2;
    grid-row: 1;
}

.directory-filter-form:has(.shift-template-filter-grid) #organizationFilter {
    grid-column: 3;
    grid-row: 1;
}

.directory-filter-form:has(.shift-template-filter-grid) #branchFilter {
    grid-column: 4;
    grid-row: 1;
}

.directory-filter-form:has(.shift-template-filter-grid) #departmentFilter {
    grid-column: 5;
    grid-row: 1;
}

.directory-filter-form:has(.shift-template-filter-grid) #employeeFilter {
    grid-column: 6;
    grid-row: 1;
}

/* Row 2 */
.directory-filter-form:has(.shift-template-filter-grid) #designationCategoryFilter {
    grid-column: 1;
    grid-row: 2;
}

.directory-filter-form:has(.shift-template-filter-grid) #designationFilter {
    grid-column: 2;
    grid-row: 2;
}

.directory-filter-form:has(.shift-template-filter-grid) #designationLevelFilter {
    grid-column: 3;
    grid-row: 2;
}

/* Apply / Clear — right side of Row 2 */
.directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions {
    grid-column: 5 / 7 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions .directory-filter-button,
.directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions .directory-clear-button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Tablet */
@media (max-width: 1100px) {
    .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .directory-filter-form:has(.shift-template-filter-grid) #shiftTemplateSearch,
    .directory-filter-form:has(.shift-template-filter-grid) #shiftTemplateStatusFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #organizationFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #branchFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #departmentFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #employeeFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #designationCategoryFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #designationFilter,
    .directory-filter-form:has(.shift-template-filter-grid) #designationLevelFilter {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        justify-content: flex-end !important;
    }
}

/* Mobile */
@media (max-width: 760px) {
    .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: 1fr 1fr !important;
    }

    .directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 480px) {
    .directory-filter-form:has(.shift-template-filter-grid) {
        grid-template-columns: 1fr !important;
    }

    .directory-filter-form:has(.shift-template-filter-grid) .directory-filter-actions {
        grid-column: 1 !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

.shift-template-status-label {
    color: #1b1f24;
}

.shift-template-status-value {
    color: #4b5563;
}

/* =========================================================
   SHIFT TEMPLATE LIFECYCLE — CURRENT STAGE PULSE
   UI ONLY — does not change lifecycle behavior
   ========================================================= */

@keyframes shiftLifecycleCurrentPulse {
    0%,
    100% {
        color: #c9a227;
        opacity: 1;
        text-shadow: none;
    }

    50% {
        color: #c9a227;
        opacity: 0.55;
        text-shadow: 0 0 8px currentColor;
    }
}

/* 1. Active lifecycle stage LABEL only */
.shift-template-lifecycle-step.is-current
.shift-template-lifecycle-step-label,
.shift-template-lifecycle-step.is-current > span:last-child {
    animation: shiftLifecycleCurrentPulse 1.4s ease-in-out infinite;
}

/* 2. Top-right CURRENT STATUS text only */
.shift-template-status-value {
    animation: shiftLifecycleCurrentPulse 1.4s ease-in-out infinite;
}


/* =========================================================
   SIMPLE SEARCH — RESPONSIVE UI
   UI ONLY — fully scoped to Simple Search
   Does not modify Employee Directory or other Employee UI.
   ========================================================= */

.simple-search-result-shell {
    width: 100%;
    margin-top: 24px;
}

.simple-search-result-shell
.simple-search-table-wrap {
    width: 100%;
}

.simple-search-employee-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.simple-search-employee-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f7f7f7 100%
    );
    border-bottom: 1px solid var(--border);
}

.simple-search-employee-name {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.simple-search-employee-code {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #666666;
    font-family: monospace;
    word-break: break-word;
}

.simple-search-employee-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
}

.simple-search-field {
    min-width: 0;
    padding: 18px 20px;
    background: #ffffff;
}

.simple-search-field span {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #777777;
}

.simple-search-field strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    color: #202020;
    overflow-wrap: anywhere;
}

.simple-search-reporting-section {
    padding: 24px 28px 28px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.simple-search-section-title {
    margin-bottom: 18px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
}

.simple-search-reporting-manager {
    display: grid;
    grid-template-columns:
        minmax(140px, 0.3fr)
        minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
}

.simple-search-reporting-label {
    display: flex;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f7f7f7;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666666;
}

.simple-search-reporting-value {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #202020;
    overflow-wrap: anywhere;
}

.simple-search-reporting-value span {
    display: block;
    margin-top: 4px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 400;
    color: #777777;
}

.simple-search-reportees-title {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666666;
}

.simple-search-reporting-section
.simple-search-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.simple-search-reporting-section table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.simple-search-reporting-section th {
    padding: 13px 15px;
    background: #f7f7f7;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666666;
}

.simple-search-reporting-section td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.4;
    color: #252525;
}

.simple-search-reporting-section tbody tr:last-child td {
    border-bottom: 0;
}

.simple-search-error {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: #b42318;
    font-size: 14px;
}

/* Tablet */
@media (max-width: 1024px) {

    .simple-search-employee-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

/* Mobile */
@media (max-width: 640px) {

    .simple-search-result-shell {
        margin-top: 18px;
    }

    .simple-search-employee-card-header {
        padding: 20px;
    }

    .simple-search-employee-name {
        font-size: 20px;
    }

    .simple-search-employee-grid {
        grid-template-columns: 1fr;
    }

    .simple-search-field {
        padding: 15px 18px;
    }

    .simple-search-reporting-section {
        padding: 20px 18px 22px;
    }

    .simple-search-reporting-manager {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .simple-search-reporting-label {
        padding: 11px 13px;
    }

    .simple-search-reporting-value {
        padding: 13px;
    }

    .simple-search-reporting-section
    table {
        min-width: 500px;
    }

}


/* SIMPLE SEARCH PROFESSIONAL UI - 2026-10-04 */

.simple-search-searchbar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
    padding: 20px;
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.simple-search-searchbar .simple-search-field {
    flex: 1;
    min-width: 0;
}

.simple-search-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #555555;
}

.simple-search-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #ffffff;
    color: #222222;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.simple-search-input:focus {
    border-color: #9d9d9d;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.simple-search-button {
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid #222222;
    border-radius: 8px;
    background: #222222;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 160ms ease, transform 160ms ease;
}

.simple-search-button:hover {
    background: #111111;
}

.simple-search-button:active {
    transform: translateY(1px);
}

.simple-search-empty {
    margin-top: 10px;
    padding: 0 4px;
    color: #777777;
    font-size: 12px;
}

.simple-search-result-shell {
    width: 100%;
    margin-top: 18px;
}

.simple-search-result-shell[hidden] {
    display: none;
}

.simple-search-result-shell > .simple-search-table-wrap {
    width: 100%;
}

.simple-search-employee-card {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.055);
    box-sizing: border-box;
}

.simple-search-employee-card-header {
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: 20px 22px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.simple-search-employee-name {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #1f1f1f;
    word-break: break-word;
}

.simple-search-employee-code {
    margin-top: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #777777;
    word-break: break-all;
}

.simple-search-employee-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px;
}

.simple-search-employee-grid .simple-search-field {
    min-width: 0;
    padding: 14px 15px;
    background: #fafafa;
    border: 1px solid #e7e7e7;
    border-radius: 9px;
    box-sizing: border-box;
}

.simple-search-employee-grid .simple-search-field span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #777777;
}

.simple-search-employee-grid .simple-search-field strong {
    display: block;
    min-height: 19px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    color: #262626;
    overflow-wrap: anywhere;
}

.simple-search-reporting-section {
    margin: 0 22px 22px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
}

.simple-search-section-title {
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 700;
    color: #222222;
}

.simple-search-reporting-manager {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: stretch;
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.simple-search-reporting-label {
    display: flex;
    align-items: center;
    padding: 13px 15px;
    background: #f3f3f3;
    color: #666666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.simple-search-reporting-value {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 13px 15px;
    color: #222222;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.simple-search-reporting-value span {
    color: #888888;
    font-size: 11px;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.simple-search-reportees-title {
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
    color: #333333;
}

.simple-search-reporting-section .simple-search-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
}

.simple-search-reporting-section table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.simple-search-reporting-section th {
    padding: 11px 13px;
    background: #f3f3f3;
    border-bottom: 1px solid #dedede;
    color: #555555;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.simple-search-reporting-section td {
    padding: 12px 13px;
    border-bottom: 1px solid #eeeeee;
    color: #333333;
    font-size: 13px;
    line-height: 1.4;
}

.simple-search-reporting-section tbody tr:last-child td {
    border-bottom: 0;
}

.simple-search-error {
    padding: 16px;
    border: 1px solid #e2caca;
    border-radius: 9px;
    background: #fff8f8;
    color: #9a4444;
    font-size: 13px;
}

@media (max-width: 1024px) {

    .simple-search-employee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {

    .simple-search-searchbar {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .simple-search-button {
        width: 100%;
    }

    .simple-search-employee-card-header {
        padding: 17px;
    }

    .simple-search-employee-name {
        font-size: 18px;
    }

    .simple-search-employee-grid {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 15px;
    }

    .simple-search-reporting-section {
        margin: 0 15px 15px;
        padding: 15px;
    }

    .simple-search-reporting-manager {
        grid-template-columns: 1fr;
    }

    .simple-search-reporting-label {
        padding: 10px 12px;
    }

    .simple-search-reporting-value {
        padding: 12px;
    }

    .simple-search-reporting-section table {
        min-width: 560px;
    }

}


/* SIMPLE SEARCH SEARCH BUTTON REFINEMENT - 2026-10-04 */

.simple-search-searchbar {
    align-items: flex-end;
}

.simple-search-searchbar .simple-search-button {
    align-self: flex-end;
    min-height: 44px;
    border: 1px solid #c9a227;
    background: #c9a227;
    color: #000000;
    font-weight: 600;
    box-shadow: none;
}

.simple-search-searchbar .simple-search-button:hover {
    background: #e0c45c;
    border-color: #e0c45c;
    color: #000000;
}

.simple-search-searchbar .simple-search-button:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

@media (max-width: 640px) {

    .simple-search-searchbar {
        align-items: stretch;
    }

    .simple-search-searchbar .simple-search-button {
        width: 100%;
        align-self: stretch;
    }

}


/* SIMPLE SEARCH REPORTING STRUCTURE PADDING - 2026-10-04 */

.simple-search-reporting-section {
    margin-top: 16px;
    padding: 26px 24px 24px;
}

.simple-search-reporting-section .simple-search-section-title {
    margin-top: 0;
    margin-bottom: 18px;
}

.simple-search-reporting-section .simple-search-reporting-manager {
    margin-bottom: 26px;
}

.simple-search-reporting-section .simple-search-reportees-title {
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .simple-search-reporting-section {
        margin-top: 12px;
        padding: 20px 16px;
    }
}

/* Today's Workforce */

.todays-workforce-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}


.todays-workforce-filters {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-top: 20px;
    margin-bottom: 24px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-size: 11px;
    font-weight: 600;
}

.filter-field input,
.filter-field select {
    min-height: 38px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 1100px) {
    .todays-workforce-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .todays-workforce-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .todays-workforce-kpis,
    .todays-workforce-filters {
        grid-template-columns: 1fr;
    }
}

/* Today's Workforce - Excel-style presence grid */

.todays-workforce-panel .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d9dee7;
}

.todays-workforce-panel .data-table th,
.todays-workforce-panel .data-table td {
    border: 1px solid #d9dee7;
    padding: 10px 12px;
    vertical-align: middle;
}

.todays-workforce-panel .data-table th {
    border-bottom: 1px solid #cbd2dc;
}

.todays-workforce-panel .data-table tbody tr {
    border-bottom: 1px solid #d9dee7;
}

.todays-workforce-panel .data-table tbody tr:last-child {
    border-bottom: 0;
}

.todays-workforce-panel .data-table th,
.todays-workforce-panel .data-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.todays-workforce-panel .table-container {
    padding: 0 16px 16px;
}

.todays-workforce-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
}
.todays-workforce-panel {
    width: 100%;
    padding: 20px;
}

.todays-workforce-panel .table-container {
    padding-top: 16px;
}

.todays-workforce-kpis a.dashboard-stat {
    text-decoration: none;
    color: inherit;
}

/* Leave Management */

.leave-management {
    width: 100%;
}

.leave-management-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.leave-management-kpis .dashboard-stat {
    min-height: 150px;
}

.leave-management-panel {
    width: 100%;
    padding: 20px;
    margin-bottom: 24px;
}

.leave-management-panel .table-container {
    padding-top: 16px;
}

.leave-management-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
}

.leave-management-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.leave-management-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.leave-management-filters label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.leave-management-filters input,
.leave-management-filters select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.leave-management-filters .filter-actions {
    display: flex;
    gap: 8px;
}

.leave-management-panel .employee-name {
    font-weight: 600;
}

.leave-management-panel .employee-code {
    margin-top: 3px;
    font-size: 12px;
    color: #6b7280;
}

.leave-management-panel .empty-state {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}

@media (max-width: 1000px) {
    .leave-management-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .leave-management-kpis {
        grid-template-columns: 1fr;
    }

    .leave-management-filters .filter-group {
        width: 100%;
        min-width: 0;
    }

    .leave-management-filters .filter-actions {
        width: 100%;
    }
}

/* Leave Management - Excel Grid Tables */

.leave-management-panel .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

.leave-management-panel .data-table th,
.leave-management-panel .data-table td {
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    vertical-align: middle;
}

.leave-management-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.leave-management-panel .data-table td {
    background-color: #ffffff;
}

.leave-management-panel .data-table tbody tr:hover td {
    background-color: #f9fafb;
}

/* Today's Workforce - Excel Grid Table */

.todays-workforce-panel .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

.todays-workforce-panel .data-table th,
.todays-workforce-panel .data-table td {
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    vertical-align: middle;
}

.todays-workforce-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.todays-workforce-panel .data-table td {
    background-color: #ffffff;
}

.todays-workforce-panel .data-table tbody tr:hover td {
    background-color: #f9fafb;
}


/* Leave Management - preserve table cell layout */
.leave-management-panel .data-table,
.leave-management-panel .data-table thead,
.leave-management-panel .data-table tbody,
.leave-management-panel .data-table tr,
.leave-management-panel .data-table th,
.leave-management-panel .data-table td {
    display: revert !important;
}

.leave-management-panel .employee-name,
.leave-management-panel .employee-code {
    display: block !important;
}

/* Leave Management KPI navigation */
.leave-kpi-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.leave-kpi-link:hover {
    text-decoration: none;
}

#leave-requests,
#pending-approvals,
#active-leave,
#leave-types {
    scroll-margin-top: 24px;
}

/* Leave Type Management */
.leave-type-create-form {
    padding: 0 16px 16px;
}

.leave-type-form-grid {
    display: grid;
    grid-template-columns: 1fr 180px 2fr auto;
    gap: 14px;
    align-items: end;
}

.leave-type-form-action {
    display: flex;
    align-items: end;
}

.leave-type-form-action .dashboard-action-btn {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .leave-type-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .leave-type-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Administration - Leave Types */
.leave-types-panel {
    width: 100%;
    padding: 20px;
}

.leave-type-admin-form {
    padding: 0 0 20px;
}

.leave-type-admin-grid {
    display: grid;
    grid-template-columns: 1fr 180px 2fr;
    gap: 14px;
    align-items: end;
}

.leave-type-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.leave-types-panel .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

.leave-types-panel .data-table th,
.leave-types-panel .data-table td {
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    vertical-align: middle;
}

.leave-types-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.leave-types-panel .data-table td {
    background-color: #ffffff;
}

.leave-types-panel .data-table tbody tr:hover td {
    background-color: #f9fafb;
}

@media (max-width: 900px) {
    .leave-type-admin-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .leave-type-admin-grid {
        grid-template-columns: 1fr;
    }

    .leave-type-admin-actions {
        flex-wrap: wrap;
    }
}

.leave-type-reference-header {
    margin-top: 60px;
}
/* Leave Request Review - Read Only */
.leave-request-review-panel .filter-group input[readonly],
.leave-request-review-panel .filter-group textarea[readonly] {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
    cursor: default;
}

.leave-request-review-panel .filter-group input[readonly]:focus,
.leave-request-review-panel .filter-group textarea[readonly]:focus {
    outline: none;
    box-shadow: none;
}

.leave-request-review-panel .filter-group textarea[readonly] {
    resize: none;
    min-height: 100px;
}

/* Leave Request Review - Read Only Display */
.leave-request-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.leave-request-review-grid .review-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leave-request-review-grid .review-field-full {
    grid-column: 1 / -1;
}

.leave-request-review-grid .review-field label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.leave-request-review-grid .review-value {
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    line-height: 20px;
}

.leave-request-review-grid .review-reason {
    min-height: 90px;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .leave-request-review-grid {
        grid-template-columns: 1fr;
    }

    .leave-request-review-grid .review-field-full {
        grid-column: auto;
    }
}

/* Leave Request Review - Form Structure / Read Only */

.leave-request-review-form {
    align-items: flex-end;
}

.leave-request-review-form .filter-group {
    min-width: 220px;
}

.leave-request-review-form .review-field-full {
    flex: 1 1 100%;
    width: 100%;
}

.leave-request-review-form .review-value {
    min-height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    line-height: 20px;
    cursor: default;
    user-select: text;
}

.leave-request-review-form .review-reason {
    min-height: 90px;
    align-items: flex-start;
    white-space: pre-wrap;
}

.leave-request-review-actions {
    margin-top: 20px;
}

@media (max-width: 600px) {

    .leave-request-review-form .review-field-full {
        width: 100%;
    }

    .leave-request-review-form .review-value {
        width: 100%;
    }
}


/* =========================================================
   Employee Portal
   ========================================================= */

.employee-portal-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.employee-portal-nav {
    padding: 18px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--bg-card);
}

.employee-portal-nav .nav-section {
    margin: 14px 10px 8px;
}

.employee-portal-nav .nav-section:first-child {
    margin-top: 2px;
}

.employee-portal-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    margin-bottom: 3px;
    border-radius: 6px;
    text-decoration: none;
}

.employee-portal-nav .nav-item.active {
    background: #f8ddd8;
}

.employee-portal-content {
    min-width: 0;
}

.employee-portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 900px) {
    .employee-portal-layout {
        grid-template-columns: 1fr;
    }

    .employee-portal-nav {
        width: 100%;
    }
}

/* =========================================================
   Request Templates Administration
   ========================================================= */

.request-templates-panel {
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.request-templates-panel .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.request-templates-panel .section-header h2 {
    margin: 0 0 6px;
}

.request-templates-panel .section-header p {
    margin: 0;
}

/* Create Request Template form */

.request-template-form {
    padding: 20px;
    margin: 0 0 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
}

.request-template-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.request-template-form .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-template-form .filter-group label {
    font-weight: 600;
}

.request-template-form input,
.request-template-form select {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #cfd4da;
    border-radius: 5px;
    box-sizing: border-box;
    background: #ffffff;
}

.request-template-form input:focus,
.request-template-form select:focus {
    outline: none;
    border-color: #8f969d;
    box-shadow: 0 0 0 2px rgba(63, 68, 74, 0.08);
}

.request-template-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Request Templates table */

.request-templates-panel .table-container {
    width: 100%;
    margin-top: 8px;
    overflow-x: auto;
}

.request-templates-panel .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

.request-templates-panel .data-table th,
.request-templates-panel .data-table td {
    border: 1px solid #d1d5db;
    padding: 11px 14px;
    vertical-align: middle;
}

.request-templates-panel .data-table th {
    background-color: #3f444a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.request-templates-panel .data-table td {
    background-color: #ffffff;
}

.request-templates-panel .data-table tbody tr:hover td {
    background-color: #f9fafb;
}

.request-templates-panel .data-table td:last-child {
    white-space: nowrap;
}

.request-templates-panel .data-table td .dashboard-action-btn {
    display: inline-flex;
    min-height: 34px;
    padding: 7px 12px;
}

/* Responsive layout */

@media (max-width: 900px) {
    .request-template-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .request-templates-panel {
        padding: 16px;
    }

    .request-templates-panel .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .request-template-form-actions {
        flex-wrap: wrap;
    }
}

/* =========================================================
   Request Template Builder - Professional Layout
   ========================================================= */

.request-template-builder-panel {
    width: 100%;
    padding: 28px;
    box-sizing: border-box;
}

.request-template-builder-panel > .section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 0 0 22px;
    margin: 0 0 24px;
    border-bottom: 1px solid #d9dde2;
}

.request-template-builder-panel > .section-header h2 {
    margin: 0 0 7px;
    font-size: 22px;
    line-height: 1.3;
}

.request-template-builder-panel > .section-header p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.request-template-builder-panel > .section-header > div:last-child {
    flex-shrink: 0;
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #f8f9fa;
    white-space: nowrap;
    color: #374151;
}

.request-template-builder-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.request-template-sections,
.request-template-canvas,
.request-template-field-config {
    min-width: 0;
    box-sizing: border-box;
}

.request-template-sections,
.request-template-field-config {
    padding: 20px;
    border: 1px solid #d5d9de;
    border-radius: 6px;
    background: #ffffff;
}

.request-template-canvas {
    padding: 24px;
    border: 1px solid #d5d9de;
    border-radius: 6px;
    background: #ffffff;
}

.request-template-sections .section-header,
.request-template-field-config .section-header {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e1e4e8;
}

.request-template-sections .section-header h3,
.request-template-field-config .section-header h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

.request-template-sections .section-header p,
.request-template-field-config .section-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

.request-template-section-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.request-template-section-item {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d5d9de;
    border-radius: 5px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.request-template-section-item strong,
.request-template-section-item span {
    display: block;
}

.request-template-section-item strong {
    margin-bottom: 3px;
    font-size: 13px;
}

.request-template-section-item span {
    color: #5f6670;
    font-size: 13px;
    line-height: 1.4;
}

.request-template-section-item:hover {
    background: #f8f9fa;
}

.request-template-section-item.active {
    border-color: #9aa1a8;
    background: #f1f3f5;
}

.request-template-sections > .dashboard-action-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.request-template-builder-section > .section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e4e8;
}

.request-template-builder-section > .section-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.request-template-builder-section > .section-header p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.request-template-builder-section > .section-header > div:last-child {
    flex-shrink: 0;
    padding: 7px 11px;
    border: 1px solid #d5d9de;
    border-radius: 4px;
    background: #f8f9fa;
    color: #5f6670;
    font-size: 12px;
    white-space: nowrap;
}

.request-template-canvas .table-container {
    width: 100%;
    margin: 0;
    overflow-x: auto;
}

.request-template-canvas .data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d5d9de;
}

.request-template-canvas .data-table th,
.request-template-canvas .data-table td {
    border: 1px solid #d5d9de;
    padding: 11px 13px;
    vertical-align: middle;
}

.request-template-canvas .data-table th {
    background: #3f444a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
}

.request-template-canvas .data-table td {
    background: #ffffff;
}

.request-template-canvas .data-table tbody tr:hover td {
    background: #f8f9fa;
}

.request-template-builder-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.request-template-field-config #field-config-empty {
    padding: 14px;
    border: 1px solid #e1e4e8;
    border-radius: 5px;
    background: #f8f9fa;
}

.request-template-field-config #field-config-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.request-template-field-config #field-config-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-template-field-config .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-template-field-config .filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.request-template-field-config .filter-group input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #f8f9fa;
    color: #374151;
    box-sizing: border-box;
}

.request-template-builder-panel .empty-state {
    padding: 24px 18px;
    border: 1px dashed #cfd4da;
    border-radius: 5px;
    background: #fafbfc;
    text-align: center;
    color: #6b7280;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .request-template-builder-grid {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .request-template-field-config {
        grid-column: 1 / -1;
    }
}

@media (max-width: 800px) {
    .request-template-builder-panel {
        padding: 20px;
    }

    .request-template-builder-panel > .section-header {
        flex-direction: column;
    }

    .request-template-builder-panel > .section-header > div:last-child {
        align-self: flex-start;
    }

    .request-template-builder-grid {
        grid-template-columns: 1fr;
    }

    .request-template-field-config {
        grid-column: auto;
    }

    .request-template-builder-section > .section-header {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .request-template-builder-panel {
        padding: 16px;
    }

    .request-template-sections,
    .request-template-canvas,
    .request-template-field-config {
        padding: 16px;
    }

    .request-template-builder-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .request-template-builder-actions .dashboard-action-btn {
        width: 100%;
        justify-content: center;
    }
}



/* =========================================================
   Request Template Builder - Add Section Modal
   ========================================================= */

.request-template-modal[hidden] {
    display: none;
}

.request-template-modal {
    position: relative;
    z-index: 1000;
}

.request-template-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
}

.request-template-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(680px, calc(100% - 32px));
    max-height: calc(100% - 40px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #ffffff;
    box-sizing: border-box;
}

.request-template-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #e1e4e8;
}

.request-template-modal-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.request-template-modal-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.request-template-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    color: #4b5563;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.request-template-modal-close:hover {
    background: #f3f4f6;
}

.request-template-modal-form {
    padding: 24px;
}

.request-template-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.request-template-modal-grid .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-template-modal-grid .filter-group label {
    font-weight: 600;
    color: #374151;
}

.request-template-modal-grid input,
.request-template-modal-grid textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cfd4da;
    border-radius: 5px;
    background: #ffffff;
    color: #374151;
    box-sizing: border-box;
    font: inherit;
}

.request-template-modal-grid textarea {
    resize: vertical;
    min-height: 82px;
}

.request-template-modal-grid input:focus,
.request-template-modal-grid textarea:focus {
    outline: none;
    border-color: #8f969d;
    box-shadow: 0 0 0 2px rgba(63, 68, 74, 0.08);
}

.request-template-modal-grid small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.request-template-modal-full {
    grid-column: 1 / -1;
}

.request-template-modal-visibility {
    justify-content: flex-start;
}

.request-template-checkbox {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    font-weight: 400 !important;
}

.request-template-checkbox input {
    width: 17px !important;
    height: 17px;
    margin: 0;
}

.request-template-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e1e4e8;
}

@media (max-width: 700px) {
    .request-template-modal-grid {
        grid-template-columns: 1fr;
    }

    .request-template-modal-full {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .request-template-modal-header,
    .request-template-modal-form {
        padding: 18px;
    }

    .request-template-modal-actions {
        flex-direction: column-reverse;
    }

    .request-template-modal-actions .dashboard-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Request Template Builder - Add Field */
.request-template-section-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.request-template-add-field-btn {
    white-space: nowrap;
}

#add-field-modal .request-template-modal-grid {
    align-items: start;
}

#add-field-modal .request-template-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

#add-field-modal .request-template-checkbox input {
    width: auto;
    margin: 0;
}

@media (max-width: 768px) {
    .request-template-section-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .request-template-add-field-btn {
        width: auto;
    }
}


/* ============================================================
   ORGANIZATION MANAGEMENT
   ============================================================ */

.organization-page {
    padding: 4px 0 36px;
}

.organization-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.organization-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #6b7280;
    margin-bottom: 5px;
}

.organization-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #172033;
}

.organization-header p {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.organization-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #7b8494;
    margin: 0 0 18px;
}

.organization-breadcrumb strong {
    color: #253044;
}

.organization-panel {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
    margin-bottom: 18px;
    overflow: hidden;
}

.organization-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f4;
}

.organization-panel-heading h2 {
    margin: 0;
    color: #202b3c;
    font-size: 17px;
    font-weight: 700;
}

.organization-panel-heading p {
    margin: 4px 0 0;
    color: #7b8494;
    font-size: 12px;
}

.organization-primary-btn {
    border: 0;
    cursor: pointer;
}

.organization-secondary-btn {
    background: #fff !important;
    color: #465166 !important;
    border: 1px solid #d8dee7 !important;
}

.organization-form {
    padding: 20px;
}

.organization-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.organization-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #465166;
    font-size: 12px;
    font-weight: 600;
}

.organization-form-grid input,
.organization-form-grid select,
.organization-form-grid textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9dfe8;
    border-radius: 7px;
    padding: 10px 11px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 13px;
}

.organization-form-grid input:focus,
.organization-form-grid select:focus,
.organization-form-grid textarea:focus {
    outline: none;
    border-color: #9aa7ba;
    box-shadow: 0 0 0 2px rgba(100, 116, 139, .10);
}

.organization-form-wide {
    grid-column: span 2;
}

.organization-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    margin-top: 18px;
    border-top: 1px solid #edf0f4;
}

.organization-table-wrap {
    overflow-x: auto;
}

.organization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.organization-table th {
    background: #f8fafc;
    color: #596579;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #dfe4eb;
    white-space: nowrap;
}

.organization-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf0f4;
    color: #445064;
    vertical-align: middle;
}

.organization-table tbody tr:last-child td {
    border-bottom: 0;
}

.organization-table tbody tr:hover {
    background: #fafbfd;
}

.organization-table td strong {
    display: block;
    color: #202b3c;
    font-weight: 650;
}

.organization-table td small {
    display: block;
    margin-top: 3px;
    color: #8791a1;
    font-size: 11px;
}

.organization-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
}

.organization-status.active {
    background: #edf8f1;
    color: #26734d;
}

.organization-status.inactive {
    background: #f1f3f5;
    color: #6b7280;
}

.organization-empty {
    text-align: center;
    color: #8a93a2 !important;
    padding: 36px !important;
}

@media (max-width: 900px) {
    .organization-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .organization-form-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .organization-header {
        flex-direction: column;
    }

    .organization-form-grid {
        grid-template-columns: 1fr;
    }

    .organization-form-wide {
        grid-column: span 1;
    }
}


/* ============================================================
   ORGANIZATION UI REFINEMENT — LOCATION DIRECTORY
   ============================================================ */

.organization-page {
    padding: 0 0 42px;
}

.organization-header {
    align-items: center;
    margin-bottom: 20px;
}

.organization-eyebrow {
    color: #7a8494;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin-bottom: 7px;
}

.organization-header h1 {
    font-size: 25px;
    letter-spacing: -.25px;
}

.organization-header p {
    margin-top: 6px;
    color: #7b8491;
    font-size: 13px;
}

.organization-primary-btn {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 650;
}

.organization-context-bar {
    min-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    margin-bottom: 18px;
    border: 1px solid #e4e8ee;
    border-radius: 6px;
    background: #fafbfc;
}

.organization-context-left {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #6d7787;
    font-size: 12px;
}

.organization-context-left strong {
    color: #283345;
    font-weight: 650;
}

.organization-context-label {
    color: #8a94a3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.organization-context-separator {
    color: #b0b7c2;
}

.organization-context-note {
    color: #9aa2ae;
    font-size: 11px;
}

.organization-directory-heading {
    min-height: 70px;
    box-sizing: border-box;
    padding: 16px 18px;
}

.organization-section-kicker {
    margin-bottom: 4px;
    color: #8a94a3;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.25px;
}

.organization-directory-heading h2 {
    font-size: 16px;
}

.organization-directory-heading p {
    margin-top: 4px;
    font-size: 11px;
}

.organization-record-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 22px;
    border-left: 1px solid #edf0f4;
}

.organization-record-count strong {
    color: #273247;
    font-size: 20px;
    line-height: 1;
}

.organization-record-count span {
    margin-top: 4px;
    color: #929aa7;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.organization-table {
    border-collapse: separate;
    border-spacing: 0;
}

.organization-table th {
    height: 40px;
    box-sizing: border-box;
    padding: 0 14px;
    background: #f6f8fa;
    color: #667184;
    border-bottom: 1px solid #dfe4ea;
    font-size: 10px;
    letter-spacing: .55px;
    text-transform: uppercase;
}

.organization-table td {
    height: 58px;
    box-sizing: border-box;
    padding: 9px 14px;
    border-bottom: 1px solid #edf0f3;
    font-size: 12px;
}

.organization-table tbody tr:hover {
    background: #fbfcfd;
}

.organization-location-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 145px;
}

.organization-location-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e5eb;
    border-radius: 6px;
    background: #f8fafb;
    color: #687486;
    font-size: 15px;
}

.organization-table td strong {
    color: #273247;
    font-size: 12px;
    font-weight: 650;
}

.organization-table td small {
    margin-top: 3px;
    color: #929aa7;
    font-size: 10px;
}

.organization-status {
    min-width: 55px;
    justify-content: center;
    padding: 4px 8px;
    border: 1px solid transparent;
    font-size: 9px;
    letter-spacing: .55px;
}

.organization-status.active {
    border-color: #d7eadf;
}

.organization-status.inactive {
    border-color: #e2e5e9;
}

.organization-panel {
    border-radius: 7px;
    border-color: #dfe4ea;
}

@media (max-width: 700px) {
    .organization-header {
        align-items: flex-start;
    }

    .organization-context-note {
        display: none;
    }

    .organization-record-count {
        padding-left: 12px;
    }
}

/* ORGANIZATION — Excel-style table grid */
.organization-page table {
    width: 100%;
    border-collapse: collapse !important;
    border: 1px solid #c7cdd4 !important;
    border-radius: 0 !important;
}

.organization-page table th,
.organization-page table td {
    border: 1px solid #c7cdd4 !important;
    padding: 10px 12px;
    vertical-align: middle;
}

.organization-page table thead th {
    border: 1px solid #b8c0c9 !important;
    font-weight: 600;
    white-space: nowrap;
}

.organization-page table tbody tr {
    border-bottom: 1px solid #c7cdd4 !important;
}

.organization-page table tbody td {
    border-right: 1px solid #c7cdd4 !important;
}

.organization-page table tbody tr:last-child td {
    border-bottom: 1px solid #c7cdd4 !important;
}

.organization-page table th:first-child,
.organization-page table td:first-child {
    border-left: 1px solid #c7cdd4 !important;
}

.organization-page table th:last-child,
.organization-page table td:last-child {
    border-right: 1px solid #c7cdd4 !important;
}

/* ORGANIZATION — shared Location / Branch / Department visual language */
.organization-page .directory-panel {
    border-radius: 0;
}

.organization-page .directory-panel table {
    width: 100%;
    border-collapse: collapse !important;
    border: 1px solid #c7cdd4 !important;
    border-radius: 0 !important;
}

.organization-page .directory-panel table th,
.organization-page .directory-panel table td {
    border: 1px solid #c7cdd4 !important;
    padding: 10px 12px;
    vertical-align: middle;
}

.organization-page .directory-panel table thead th {
    border: 1px solid #b8c0c9 !important;
    font-weight: 600;
    white-space: nowrap;
}

.organization-page .directory-panel table tbody tr {
    border-bottom: 1px solid #c7cdd4 !important;
}

.organization-page .directory-panel table tbody tr:hover td {
    background: inherit;
}

.organization-page .directory-panel table th:first-child,
.organization-page .directory-panel table td:first-child {
    border-left: 1px solid #c7cdd4 !important;
}

.organization-page .directory-panel table th:last-child,
.organization-page .directory-panel table td:last-child {
    border-right: 1px solid #c7cdd4 !important;
}

.organization-page .directory-panel table tbody tr:last-child td {
    border-bottom: 1px solid #c7cdd4 !important;
}

.organization-page .status-pill,
.organization-page .organization-status-pill {
    border-radius: 3px;
}

@media (max-width: 900px) {
    .organization-page .directory-panel {
        overflow-x: auto;
    }

    .organization-page .directory-panel table {
        min-width: 760px;
    }
}


/* Employee Creation */
.employee-create-page .employee-create-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.employee-create-page .employee-create-section {
    border-radius: 0;
}

.employee-create-page .employee-create-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #c7cdd4;
    border-left: 1px solid #c7cdd4;
}

.employee-create-page .employee-create-field {
    min-width: 0;
    padding: 14px;
    border-right: 1px solid #c7cdd4;
    border-bottom: 1px solid #c7cdd4;
}

.employee-create-page .employee-create-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
}

.employee-create-page .employee-create-field label span {
    color: #b42318;
}

.employee-create-page .employee-create-field input,
.employee-create-page .employee-create-field select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #b8c0c9;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
}

.employee-create-page .employee-create-field select:disabled {
    background: #f2f4f7;
    color: #667085;
    cursor: not-allowed;
}

.employee-create-page .employee-create-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #e0a7a2;
    background: #fff5f4;
    color: #8a1c13;
    border-radius: 3px;
}

.employee-create-page .employee-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-bottom: 24px;
}

@media (max-width: 900px) {
    .employee-create-page .employee-create-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .employee-create-page .employee-create-grid {
        grid-template-columns: 1fr;
    }

    .employee-create-page .employee-create-actions {
        justify-content: stretch;
        flex-direction: column-reverse;
    }
}

/* Employee Management Header Action */
.employee-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.employee-page .page-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.employee-page .primary-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--wf-gold, #c9a227);
    border-radius: 4px;
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.employee-page .primary-action-button:hover {
    background: #b8941f;
    color: #1b1f24;
}

@media (max-width: 700px) {
    .employee-page .page-header {
        flex-direction: column;
    }

    .employee-page .page-header-actions {
        width: 100%;
    }

    .employee-page .primary-action-button {
        width: 100%;
    }
}

/* Leave Management — Product Action Button */
.leave-management .dashboard-action-btn {
    border-color: var(--wf-gold, #c9a227);
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
}

.leave-management .dashboard-action-btn:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: #1b1f24;
}

/* Today's Workforce — Product Action Button */
.todays-workforce-panel .dashboard-action-btn {
    border-color: var(--wf-gold, #c9a227);
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
}

.todays-workforce-panel .dashboard-action-btn:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: #1b1f24;
}

/* Organization — Product Primary Action Button */
.organization-primary-btn {
    border: 1px solid var(--wf-gold, #c9a227) !important;
    background: var(--wf-gold, #c9a227) !important;
    color: #1b1f24 !important;
}

.organization-primary-btn:hover {
    background: #b8941f !important;
    border-color: #b8941f !important;
    color: #1b1f24 !important;
}

/* Leave Types — Product Primary Action Button */
.leave-types-panel #add-leave-type-btn,
.leave-types-panel .leave-type-admin-actions button[type="submit"] {
    border-color: var(--wf-gold, #c9a227) !important;
    background: var(--wf-gold, #c9a227) !important;
    color: #1b1f24 !important;
}

.leave-types-panel #add-leave-type-btn:hover,
.leave-types-panel .leave-type-admin-actions button[type="submit"]:hover {
    background: #b8941f !important;
    border-color: #b8941f !important;
    color: #1b1f24 !important;
}

/* Leave Types — Leave Management Navigation Button */
.page-header .dashboard-action-btn[href*="/leave-management"] {
    border-color: var(--wf-gold, #c9a227) !important;
    background: var(--wf-gold, #c9a227) !important;
    color: #1b1f24 !important;
}

.page-header .dashboard-action-btn[href*="/leave-management"]:hover {
    background: #b8941f !important;
    border-color: #b8941f !important;
    color: #1b1f24 !important;
}

/* Request Template Builder — Product Action Buttons */
.request-template-builder .dashboard-action-btn,
.request-template-builder button[type="submit"],
.request-template-builder .primary-action-button {
    border-color: var(--wf-gold, #c9a227) !important;
    background: var(--wf-gold, #c9a227) !important;
    color: #1b1f24 !important;
}

.request-template-builder .dashboard-action-btn:hover,
.request-template-builder button[type="submit"]:hover,
.request-template-builder .primary-action-button:hover {
    background: #b8941f !important;
    border-color: #b8941f !important;
    color: #1b1f24 !important;
}

.request-template-builder .dashboard-action-btn.secondary,
.request-template-builder button[type="button"].secondary {
    background: #fff !important;
    color: #465166 !important;
    border-color: #d8dee7 !important;
}

/* Shift & Workforce Coverage */

.shift-coverage-page {
    width: 100%;
}

.shift-coverage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.shift-coverage-eyebrow {
    margin-bottom: 7px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.shift-coverage-header h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.shift-coverage-header p {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.shift-coverage-card {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.shift-coverage-section-header {
    padding: 20px 22px 18px;
    border-bottom: 1px solid var(--border);
}

.shift-coverage-section-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.shift-coverage-section-header p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.shift-coverage-filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 22px;
    background: #f8f9fb;
    border-bottom: 1px solid #d9dee7;
}

.shift-coverage-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.shift-coverage-filter label {
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
}

.shift-coverage-filter input,
.shift-coverage-filter select {
    width: 220px;
    height: 38px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
    outline: none;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
    font-size: 13px;
}

.shift-coverage-filter input:focus,
.shift-coverage-filter select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.12);
}

.shift-coverage-filter-actions {
    display: flex;
    align-items: flex-end;
    min-height: 38px;
}

.shift-coverage-apply-button {
    height: 38px;
    padding: 0 18px;
    border: 1px solid #b18d16;
    border-radius: 5px;
    background: var(--gold);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.shift-coverage-apply-button:hover {
    background: #b18d16;
}

.shift-coverage-apply-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.18);
}

.shift-coverage-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.shift-coverage-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.shift-coverage-table th,
.shift-coverage-table td {
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
    padding: 12px 14px;
    vertical-align: middle;
    white-space: nowrap;
}

.shift-coverage-table th:last-child,
.shift-coverage-table td:last-child {
    border-right: 0;
}

.shift-coverage-table th {
    background: #3f444a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: left;
}

.shift-coverage-table td {
    background: #ffffff;
    color: #374151;
    font-size: 13px;
}

.shift-coverage-table tbody tr:last-child td {
    border-bottom: 0;
}

.shift-coverage-table tbody tr:hover td {
    background: #f8f9fb;
}

.shift-coverage-table .shift-name-cell {
    color: #1f2937;
    font-weight: 600;
}

.shift-coverage-empty {
    padding: 38px 20px !important;
    text-align: center;
    white-space: normal !important;
}

.shift-coverage-empty-title {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.shift-coverage-empty-text {
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {

    .shift-coverage-header h1 {
        font-size: 22px;
    }

    .shift-coverage-section-header,
    .shift-coverage-filter-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .shift-coverage-filter {
        width: 100%;
        min-width: 0;
    }

    .shift-coverage-filter input,
    .shift-coverage-filter select {
        width: 100%;
    }

    .shift-coverage-filter-actions {
        width: 100%;
    }

    .shift-coverage-apply-button {
        width: 100%;
    }

    .shift-coverage-table {
        min-width: 850px;
    }
}
/* Shift Detail - Employee Assignment spacing */
.shift-detail-page .profile-form-row {
    padding-left: 22px;
    padding-right: 22px;
}

.shift-detail-page .profile-actions {
    padding-left: 22px;
    padding-right: 22px;
}


/* Shift Detail - Employee Assignment spacing */
.shift-detail-page .profile-form-row {
    padding-left: 22px;
    padding-right: 22px;
}

.shift-detail-page .profile-actions {
    padding-left: 22px;
    padding-right: 22px;
}


/* Shift Detail - Employee Assignment vertical spacing */
.shift-detail-page .profile-form-row {
    padding-top: 10px;
}

.shift-detail-page .profile-actions {
    padding-top: 10px;
}

/* Shift Template Directory - newly created record highlight */
.shift-template-new-row td {
    background-color: #fff3a6 !important;
}

/* Shift Template Directory - deployment states */
.employee-table tbody tr.shift-template-available-row > td {
    background-color: #fff3a6 !important;
    color: #000 !important;
}

.employee-table tbody tr.shift-template-available-row > td *,
.employee-table tbody tr.shift-template-deployed-row > td * {
    color: #000 !important;
}

.employee-table tbody tr.shift-template-deployed-row > td {
    background-color: #fff !important;
    color: #000 !important;
}

/* Shift Template Directory - shift group heading */
.shift-template-group-row td {
    background-color: transparent;
    font-weight: 700;
    padding-top: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Task workflow: accessible Shift row selection states */

.task-link-shift__table tbody tr[data-shift-id] {
    cursor: pointer;
    transition: background-color 120ms ease, box-shadow 120ms ease;
}
.task-link-shift__table tbody tr[data-shift-id]:hover > td {
    background: #4b5563 !important;
    color: #ffffff !important;
}
.task-link-shift__table tbody tr[data-shift-id]:hover > td * {
    color: #ffffff !important;
}
.task-link-shift__table tbody tr[data-shift-id]:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.65);
    outline-offset: -2px;
}
.task-link-shift__table tbody tr[data-shift-id].is-selected {
    background: rgba(59, 130, 246, 0.12);
    box-shadow: inset 3px 0 0 #3b82f6;
}
.task-link-shift__table tbody tr[data-shift-id].is-selected td {
    border-bottom-color: rgba(59, 130, 246, 0.22);
}


/* STAFFING REQUIREMENTS DIRECTORY — SCOPED UI */
.staffing-requirements-page {
    width: 100%;
    min-width: 0;
}

.staffing-requirements-page .page-header {
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.staffing-requirements-page .page-header h1 {
    margin-bottom: 6px;
}

.staffing-requirements-page .page-header p {
    margin-top: 0;
    line-height: 1.6;
    opacity: .82;
}

.staffing-requirements-page .page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.staffing-requirements-page .staffing-directory-card {
    min-width: 0;
    overflow: hidden;
    padding: 28px 28px 26px;
}

.staffing-requirements-page .staffing-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.staffing-requirements-page .staffing-filters .filter-group {
    display: flex;
    flex: 1 1 220px;
    flex-direction: column;
    gap: 7px;
    max-width: 360px;
}

.staffing-requirements-page .staffing-filters select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: inherit;
}

.staffing-requirements-page .staffing-filters .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.staffing-requirements-page .table-container {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.staffing-requirements-page .data-table {
    width: 100%;
    min-width: 1020px;
}

.staffing-requirements-page .data-table th,
.staffing-requirements-page .data-table td {
    padding: 13px 14px;
    vertical-align: middle;
}

.staffing-requirements-page .data-table th {
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 700;
}

.staffing-requirements-page .data-table tbody tr:hover {
    background-color: rgba(127, 127, 127, .055);
}

.staffing-requirements-page .staffing-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.staffing-requirements-page .staffing-status.is-active {
    background: rgba(22, 163, 74, .12);
    color: #15803d;
}

.staffing-requirements-page .staffing-status.is-inactive {
    background: rgba(107, 114, 128, .13);
    color: #6b7280;
}

.staffing-requirements-page .table-container .dashboard-action-btn {
    min-height: 38px;
    padding: 8px 13px;
    white-space: nowrap;
}

.staffing-requirements-page .workforce-result-count {
    padding: 14px 2px 2px;
    font-size: .88rem;
    opacity: .75;
}

.staffing-requirements-page .empty-state {
    padding: 28px 16px;
    text-align: center;
}

@media (max-width: 760px) {
    .staffing-requirements-page .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .staffing-requirements-page .staffing-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .staffing-requirements-page .staffing-filters .filter-group {
        max-width: none;
    }
}


/* STAFFING REQUIREMENTS DIRECTORY — EXCEL GRID TABLE */
.staffing-requirements-page .staffing-directory-card {
    box-sizing: border-box;
}

.staffing-requirements-page .staffing-directory-card .section-header {
    margin-bottom: 22px;
}

.staffing-requirements-page .staffing-filters {
    margin-left: 0;
    margin-right: 0;
}

.staffing-requirements-page .table-container {
    margin: 0;
    padding: 0;
}

.staffing-requirements-page .data-table {
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid var(--border);
}

.staffing-requirements-page .data-table thead th {
    border: 1px solid var(--border);
    background: rgba(127, 127, 127, 0.10);
    font-weight: 700;
}

.staffing-requirements-page .data-table tbody td {
    border: 1px solid var(--border);
}

.staffing-requirements-page .data-table tbody tr:nth-child(even) {
    background: rgba(127, 127, 127, 0.035);
}

.staffing-requirements-page .data-table tbody tr:hover {
    background: rgba(127, 127, 127, 0.09);
}

.staffing-requirements-page .workforce-result-count {
    padding: 16px 2px 2px;
    margin-bottom: 2px;
}

@media (max-width: 760px) {
    .staffing-requirements-page .staffing-directory-card {
        padding: 18px 16px 20px;
    }
}


/* Staffing Requirements screen-only refinements */
.staffing-requirements-page .page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.staffing-requirements-page .primary-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.staffing-requirements-page .staffing-requirement-form-card {
    padding: 24px;
    box-sizing: border-box;
}

.staffing-requirements-page .staffing-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.staffing-requirements-page .staffing-form-grid .filter-group {
    min-width: 0;
}

.staffing-requirements-page .staffing-form-grid select,
.staffing-requirements-page .staffing-form-grid input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.staffing-requirements-page .staffing-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.staffing-requirements-page .staffing-form-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 700px) {
    .staffing-requirements-page .staffing-requirement-form-card {
        padding: 16px;
    }
    .staffing-requirements-page .staffing-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .staffing-requirements-page .page-header-actions {
        justify-content: flex-start;
    }
}


/* Staffing Requirements final form polish */
.staffing-requirements-page .staffing-requirement-form-card {
    box-sizing: border-box !important;
    width: 100%;
    padding: 28px 30px !important;
    margin-top: 24px;
    border-radius: 10px;
}

.staffing-requirements-page .staffing-requirement-form-card h2,
.staffing-requirements-page .staffing-requirement-form-card h3 {
    margin: 0 0 22px;
    line-height: 1.4;
}

.staffing-requirements-page .staffing-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 26px !important;
    align-items: start;
}

.staffing-requirements-page .staffing-form-grid .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
    margin: 0;
}

.staffing-requirements-page .staffing-form-grid .filter-group label {
    display: block;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.staffing-requirements-page .staffing-form-grid input,
.staffing-requirements-page .staffing-form-grid select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
    font: inherit;
    line-height: 1.4;
}

.staffing-requirements-page .staffing-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
}

.staffing-requirements-page .staffing-form-actions .dashboard-action-btn {
    min-height: 42px;
    padding: 10px 18px;
    box-sizing: border-box;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 700px) {
    .staffing-requirements-page .staffing-requirement-form-card {
        padding: 18px 16px !important;
        margin-top: 16px;
    }

    .staffing-requirements-page .staffing-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px !important;
    }

    .staffing-requirements-page .staffing-form-actions {
        justify-content: stretch;
    }

    .staffing-requirements-page .staffing-form-actions .dashboard-action-btn {
        flex: 1 1 auto;
    }
}

/* Staffing Requirements: prevent content touching the card's left edge */
.staffing-requirements-page .staffing-requirement-form-card {
    padding-left: 36px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}

.staffing-requirements-page .staffing-requirement-form-card .staffing-form-grid {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.staffing-requirements-page .staffing-form-grid .filter-group,
.staffing-requirements-page .staffing-form-grid .filter-group label {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .staffing-requirements-page .staffing-requirement-form-card {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Staffing Requirements: clear inset from the card edge */
.staffing-requirements-page .staffing-requirement-form-card {
    padding-left: 48px !important;
    padding-right: 32px !important;
}

@media (max-width: 700px) {
    .staffing-requirements-page .staffing-requirement-form-card {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}


/* HOSPFORCE360 SIDEBAR PARENT LABEL COLORS */
.sidebar .navigation .nav-section {
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 4px;
    background: #343434;
    color: #FFFFFF;
}

/* STAFFING REQUIREMENT TWO-COLUMN USER NOTES */
.staffing-requirements-page .staffing-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 24px;
    width: 100%;
    margin-top: 24px;
}

.staffing-requirements-page .staffing-create-layout > .staffing-requirement-form-card,
.staffing-requirements-page .staffing-create-layout > .staffing-user-notes {
    min-width: 0;
    width: 100%;
    margin-top: 0;
    box-sizing: border-box;
}

.staffing-requirements-page .staffing-create-layout > .staffing-user-notes {
    padding: 28px;
}

.staffing-requirements-page .staffing-user-notes h2 {
    margin-top: 0;
}

.staffing-requirements-page .staffing-user-notes h3 {
    margin: 22px 0 12px;
}

.staffing-requirements-page .staffing-scope-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.staffing-requirements-page .staffing-scope-table {
    width: 100%;
    min-width: 390px;
    border-collapse: collapse;
    border: 1px solid var(--border);
    font-size: 12px;
}

.staffing-requirements-page .staffing-scope-table th,
.staffing-requirements-page .staffing-scope-table td {
    border: 1px solid var(--border);
    padding: 9px 7px;
    text-align: left;
    vertical-align: top;
}

.staffing-requirements-page .staffing-scope-table thead th {
    background: rgba(127, 127, 127, 0.10);
    font-weight: 700;
}

.staffing-requirements-page .staffing-scope-table tbody tr:nth-child(even) {
    background: rgba(127, 127, 127, 0.035);
}

.staffing-requirements-page .staffing-notes-callout {
    margin-top: 16px;
    padding: 12px;
    border-left: 3px solid var(--border);
    background: rgba(127, 127, 127, 0.06);
    line-height: 1.5;
}

.staffing-requirements-page .staffing-instructions-list {
    padding-left: 20px;
    margin-bottom: 18px;
}

.staffing-requirements-page .staffing-instructions-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.staffing-requirements-page .staffing-notes-footnote {
    margin-top: 18px;
    font-size: 0.9em;
    line-height: 1.5;
}

@media (max-width: 1050px) {
    .staffing-requirements-page .staffing-create-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .staffing-requirements-page .staffing-create-layout {
        gap: 16px;
    }

    .staffing-requirements-page .staffing-create-layout > .staffing-user-notes {
        padding: 18px 16px;
    }
}


/* STAFFING USER NOTES — W3.CSS-INSPIRED CARD */
.staffing-requirements-page .staffing-create-layout > .staffing-user-notes {
    border: 1px solid #2196F3;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.staffing-requirements-page .staffing-user-notes .section-header {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.25);
}

.staffing-requirements-page .staffing-user-notes h2 {
    margin-top: 0;
}


/* STAFFING DIRECTORY — ADD REQUIREMENT BUTTON STYLE */
.staffing-requirements-page .page-header-actions > .primary-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--wf-gold, #c9a227);
    border-radius: 7px;
    background: var(--wf-gold, #c9a227);
    color: #1b1f24;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(201, 162, 39, 0.18);
    transition: background-color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.2s ease;
}

.staffing-requirements-page .page-header-actions > .primary-action-button:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: #1b1f24;
    box-shadow: 0 4px 9px rgba(184, 148, 31, 0.25);
    transform: translateY(-1px);
}

.staffing-requirements-page .page-header-actions > .primary-action-button:focus-visible {
    outline: 3px solid rgba(201, 162, 39, 0.4);
    outline-offset: 3px;
}


/* SHIFT TEMPLATE STAFFING REQUIREMENT ELIGIBILITY */
.shift-staffing-eligibility {
    box-sizing: border-box;
    width: 100%;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(127, 127, 127, 0.035);
}

.shift-staffing-eligibility-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.shift-staffing-eligibility-header h2 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.4;
}

.shift-staffing-eligibility-header p,
.shift-staffing-eligibility-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.8;
}

.shift-staffing-eligibility-label {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.shift-staffing-eligibility-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.shift-staffing-eligibility-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    font-size: 13px;
}

.shift-staffing-eligibility-table th,
.shift-staffing-eligibility-table td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.shift-staffing-eligibility-table thead th {
    background: rgba(127, 127, 127, 0.10);
    font-weight: 700;
}

.shift-staffing-eligibility-table tbody tr:nth-child(even) {
    background: rgba(127, 127, 127, 0.035);
}

.shift-staffing-eligibility-table th:last-child,
.shift-staffing-eligibility-table td:last-child {
    width: 150px;
}

.shift-staffing-eligibility-table .eligibility-yes,
.shift-staffing-eligibility-table .eligibility-no {
    font-weight: 700;
}

.shift-staffing-eligibility-note {
    margin-top: 14px;
}

@media (max-width: 760px) {
    .shift-staffing-eligibility {
        padding: 16px;
    }

    .shift-staffing-eligibility-header h2 {
        font-size: 17px;
    }

    .shift-staffing-eligibility-table {
        min-width: 520px;
    }
}

/* ==========================================================================
   SHIFT TEMPLATE — STAFFING REQUIREMENT SEARCH
   Scoped presentation only; existing form and lifecycle remain unchanged.
   ========================================================================== */

.employee-page .requirement-search-panel {
    margin-bottom: 24px;
    overflow: hidden;
    background: var(--wf-surface, #ffffff);
    border: 1px solid var(--wf-border, #d9dde2);
    border-radius: var(--wf-radius-lg, 8px);
    box-shadow: var(--wf-shadow-card, 0 2px 8px rgba(27, 31, 36, 0.06));
}

.employee-page .requirement-search-panel .directory-header {
    padding: 20px 22px;
    background: #ffffff;
    border-bottom: 1px solid var(--wf-border, #d9dde2);
}

.employee-page .requirement-search-panel .requirement-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
    gap: 18px;
    padding: 22px;
}

.employee-page .requirement-search-panel .requirement-search-actions {
    display: flex;
    align-items: end;
    min-height: 42px;
}

.employee-page .requirement-search-panel .requirement-results {
    padding: 0 22px 22px;
}

.employee-page .requirement-search-panel .requirement-results-title {
    margin: 0 0 14px;
    color: var(--wf-text, #1b1f24);
    font-size: 15px;
    font-weight: 650;
}

.employee-page .requirement-search-panel .requirement-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #bfc5cc;
    border-radius: 5px;
    background: #ffffff;
}

.employee-page .requirement-search-panel table.requirement-results-table {
    width: 100%;
    min-width: 1250px;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    color: #252a31;
    font-size: 13px;
    line-height: 1.45;
}

.employee-page .requirement-search-panel .requirement-results-table thead th {
    padding: 12px 13px;
    background: #454b54;
    color: #ffffff;
    border: 1px solid #626a74;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.employee-page .requirement-search-panel .requirement-results-table tbody td {
    padding: 11px 13px;
    border: 1px solid #cbd0d6;
    background: #ffffff;
    text-align: left;
    vertical-align: middle;
}

.employee-page .requirement-search-panel .requirement-results-table tbody tr:nth-child(even) td {
    background: #f4f6f8;
}

.employee-page .requirement-search-panel .requirement-results-table tbody tr:hover td {
    background: #edf1f5;
}

.employee-page .requirement-search-panel .requirement-results-table th,
.employee-page .requirement-search-panel .requirement-results-table td {
    box-sizing: border-box;
}

.employee-page .requirement-search-panel .requirement-results-table td:last-child {
    min-width: 170px;
    white-space: nowrap;
}

.employee-page .requirement-search-panel .requirement-empty-state {
    margin: 0;
    padding: 18px;
    border: 1px solid #d9dde2;
    border-radius: 5px;
    background: #f7f8fa;
    color: #626a73;
    font-size: 13px;
}

@media (max-width: 700px) {
    .employee-page .requirement-search-panel .requirement-search-form {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
    }

    .employee-page .requirement-search-panel .requirement-results {
        padding: 0 18px 18px;
    }

    .employee-page .requirement-search-panel .directory-header {
        padding: 18px;
    }
}


/* Search controls layout */
.employee-page .requirement-search-panel .requirement-search-fields {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
    gap: 18px;
}

@media (max-width: 700px) {
    .employee-page .requirement-search-panel .requirement-search-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Staffing Requirement Results — explicit Excel-style grid and spacing */
.employee-page .requirement-search-panel .requirement-table-wrap {
    border: 1px solid #aeb5bd;
    border-radius: 4px;
    overflow-x: auto;
}

.employee-page .requirement-search-panel table.requirement-results-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

.employee-page .requirement-search-panel .requirement-results-table thead th {
    padding: 14px 16px;
    border: 1px solid #747c86;
    background-color: #454b54;
    color: #ffffff;
    white-space: nowrap;
}

.employee-page .requirement-search-panel .requirement-results-table tbody td {
    padding: 14px 16px;
    border: 1px solid #b8c0c8;
    vertical-align: middle;
}

.employee-page .requirement-search-panel .requirement-results-table tbody tr:nth-child(even) td {
    background-color: #f2f4f7;
}

.employee-page .requirement-search-panel .requirement-results-table tbody tr:hover td {
    background-color: #e8eef5;
}

/* Shift & Workforce Coverage — notes card spacing */
.shift-coverage-page > aside[role="note"] {
    margin-top: 24px;
}

.shift-coverage-page > aside[role="note"] > p {
    padding: 0 22px;
    line-height: 1.7;
}

.shift-coverage-page > aside[role="note"] > p:last-child {
    padding-bottom: 18px;
}

/* Shift & Workforce Coverage — match Staffing Requirements notes border */
.shift-coverage-page > aside[role="note"] {
    border: 1px solid #2196F3;
}


/* Mobile navigation drawer — desktop layout remains unchanged */
.mobile-menu-toggle {
    display: none;
    flex: 0 0 auto;
    font-size: 21px;
    line-height: 1;
}

.sidebar-backdrop[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .sidebar.mobile-open {
        display: flex;
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 85vw);
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        z-index: 1001;
        box-shadow: 8px 0 28px rgba(0, 0, 0, 0.28);
    }

    .sidebar-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.48);
        touch-action: manipulation;
    }

    body.mobile-navigation-open {
        overflow: hidden;
    }
}


/* Mobile navigation visibility correction */
@media screen and (max-width: 760px) {
    .topbar > button.mobile-menu-toggle {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        min-width: 42px;
        height: 42px;
        position: relative;
        z-index: 2;
        color: var(--text-primary, #222222);
        background: var(--bg-card, #ffffff);
    }
}


/* Mobile menu button positioning fix — desktop unchanged */
@media screen and (max-width: 760px) {
    .topbar {
        position: relative;
        padding-left: 70px;
    }

    .topbar > button.mobile-menu-toggle {
        display: inline-flex !important;
        position: absolute !important;
        left: 14px;
        top: 14px;
        z-index: 1102;
        width: 42px;
        min-width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 22px;
        color: var(--text-primary, #222);
        background: var(--bg-card, #fff);
    }
}


/* Mobile hamburger bars visibility fix */
@media screen and (max-width: 760px) {
    .topbar > button.mobile-menu-toggle {
        flex-direction: column !important;
        gap: 5px !important;
        padding: 10px !important;
        overflow: visible !important;
    }

    .topbar > button.mobile-menu-toggle .menu-icon-bar {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        min-height: 2px !important;
        flex: 0 0 2px !important;
        border-radius: 2px;
        background-color: #222222 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Task Management Step 3 — bordered Excel-style grids */
[data-task-step="3"] .task-performers-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

[data-task-step="3"] .task-performer-card,
[data-task-step="3"] .task-handover-card {
    min-width: 0;
    margin: 16px 0;
}

[data-task-step="3"] .task-grid-scroll,
[data-task-step="3"] .task-assignment-scroll {
    width: 100%;
    overflow-x: auto;
    margin: 12px 0;
}

[data-task-step="3"] .task-excel-grid {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    table-layout: auto;
    background: var(--surface, #fff);
}

[data-task-step="3"] .task-excel-grid th,
[data-task-step="3"] .task-excel-grid td {
    border: 1px solid #a9a9a9;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

[data-task-step="3"] .task-excel-grid thead th {
    background: #eee8dc;
    color: #30291f;
    font-weight: 700;
}

[data-task-step="3"] .task-excel-grid tbody tr:nth-child(even) {
    background: #faf9f6;
}

[data-task-step="3"] .task-grid-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}

[data-task-step="3"] .task-grid-actions label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 240px;
    max-width: 100%;
}

