:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --line: #dbe3ef;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #2563eb;
    --danger: #be123c;
    --warning: #b45309;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

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

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

textarea {
    resize: vertical;
}

.app-shell {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #090d16;
    background: radial-gradient(circle at 10% 0%, #151c2e 0%, #090d16 100%);
    color: #f8fafc;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.brand a,
.topbar,
.topbar-actions,
.user-chip,
.footer div {
    display: flex;
    align-items: center;
}

.brand a {
    gap: 14px;
    min-width: 0;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
    color: #f8fafc;
    letter-spacing: 0.02em;
}

.brand small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

.sidebar-collapse {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.side-nav {
    flex: 1;
    min-height: 0;
    padding: 10px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.side-nav-section {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.side-nav-section:last-child {
    border-bottom: 0;
}

.side-nav-heading {
    padding: 10px 12px 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-nav-heading-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.side-nav-heading-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-nav-heading-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.side-nav-heading:hover {
    color: #f8fafc;
}

/* Accordion styles */
details > summary {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}
.side-nav-accordion-toggle::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    opacity: 0.6;
}
details[open] > .side-nav-accordion-toggle::after {
    transform: rotate(225deg);
    margin-top: 4px;
}

.side-nav-link {
    min-height: 42px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.side-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    transform: translateX(4px);
}

.side-nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.side-nav-link.active .side-nav-icon {
    color: #60a5fa;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.4));
}

.side-nav-link.disabled {
    color: #475569;
    cursor: default;
}

.side-nav-link.disabled:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

.side-nav-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    transition: transform 0.2s ease;
}

.side-nav-link:hover .side-nav-icon {
    transform: scale(1.1);
}

.side-nav-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.side-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav-chevron {
    color: #64748b;
    font-size: 20px;
    line-height: 1;
}

.side-nav-status,
.side-nav-count {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
}

.side-nav-status {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.15);
}

.side-nav-count {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.utility-section {
    margin-top: 2px;
}

.favorite-link {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-note {
    margin: auto 16px 16px;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-note:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.sidebar-note strong {
    display: block;
    color: #f8fafc;
    font-size: 14px;
    margin-bottom: 6px;
}

.sidebar-note span {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 16px 16px;
    padding: 14px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #f43f5e, #e11d48);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.sidebar-user strong {
    display: block;
    color: #f8fafc;
    font-size: 14px;
}

.sidebar-user small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

.sidebar-user-chevron {
    color: #64748b;
    font-size: 20px;
}

.app-main {
    margin-left: 270px;
    width: calc(100vw - 270px);
    max-width: calc(100vw - 270px);
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
}

.topbar-title {
    min-width: 0;
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 3px 0 0;
    font-size: 22px;
    line-height: 1.2;
}

.topbar-actions {
    gap: 12px;
}

.ghost-button,
.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-weight: 700;
    border: 1px solid var(--line);
    cursor: pointer;
}

.ghost-button,
.secondary-button {
    background: #fff;
    color: #334155;
}

.primary-button {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.danger-button {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.user-chip {
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.user-chip-text strong,
.user-chip-text span {
    display: block;
    line-height: 1.2;
}

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

.menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-mini .menu-toggle span:nth-child(1) {
    transform: translateY(3px) scaleX(0.75);
}

body.sidebar-mini .menu-toggle span:nth-child(3) {
    transform: translateY(-3px) scaleX(0.75);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active,
body.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-content {
    min-width: 0;
    flex: 1;
    padding: 28px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.page-stack {
    min-width: 0;
    display: grid;
    gap: 22px;
    max-width: 100%;
    box-sizing: border-box;
}

.stats-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 100%;
    box-sizing: border-box;
}

.two-column-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card,
.panel,
.info-card,
.installer-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.stat-card {
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 32px;
}

.panel-header {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
}

.panel-header > div,
.panel-header > header {
    min-width: 0;
    max-width: 100%;
}

.panel-header h2,
.panel-header h3,
.installer-card h2 {
    margin: 0;
    font-size: 17px;
}

.panel-header p,
.installer-card p {
    margin: 4px 0 0;
    color: var(--muted);
}

.table-wrap {
    min-width: 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    white-space: nowrap;
}

.data-table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.data-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.empty-state {
    padding: 34px 20px;
    text-align: center;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    background: #f1f5f9;
    color: #475569;
}

.badge.active,
.badge.verified,
.badge.confirmed,
.badge.open,
.badge.published,
.badge.hired,
.badge.selected,
.badge.hire,
.badge.ready,
.badge.acknowledged,
.badge.allocated,
.badge.present,
.badge.work_from_home,
.badge.approved,
.badge.sent {
    background: #dcfce7;
    color: #166534;
}

.badge.pending,
.badge.probation,
.badge.draft,
.badge.new,
.badge.in_review,
.badge.under_review,
.badge.monitoring,
.badge.scheduled,
.badge.hold,
.badge.requested,
.badge.assigned,
.badge.submitted,
.badge.queued,
.badge.waiting_employee,
.badge.reopened {
    background: #fef3c7;
    color: var(--warning);
}

.badge.inactive,
.badge.terminated,
.badge.exited,
.badge.rejected,
.badge.expired,
.badge.closed,
.badge.cancelled,
.badge.no_show,
.badge.reject,
.badge.withdrawn,
.badge.blocked,
.badge.declined,
.badge.absent,
.badge.failed,
.badge.non_compliant,
.badge.critical {
    background: #ffe4e6;
    color: var(--danger);
}

.badge.logged {
    background: #e0f2fe;
    color: #075985;
}

.danger-text {
    color: var(--danger);
}

.badge.transferred,
.badge.promoted,
.badge.notice_period,
.badge.shortlisted,
.badge.completed,
.badge.waived,
.badge.next_round,
.badge.paused,
.badge.in_progress,
.badge.escalated,
.badge.resolved,
.badge.on_hold,
.badge.half_day,
.badge.holiday,
.badge.weekend,
.badge.public,
.badge.company,
.badge.regional,
.badge.optional {
    background: #dbeafe;
    color: #1d4ed8;
}

.profile-grid,
.installer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
}

.profile-summary,
.info-card {
    padding: 22px;
}

.profile-summary h2 {
    margin: 6px 0;
    font-size: 28px;
}

.profile-meta,
.muted {
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.detail-grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 5px 0 0;
    font-weight: 700;
}

.asset-print-label {
    width: min(100%, 430px);
    margin-top: 18px;
    border: 1px solid #0f172a;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    overflow: hidden;
}

.asset-print-label__header,
.asset-print-label__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #0f172a;
    color: #fff;
}

.asset-print-label__header span,
.asset-print-label__header small,
.asset-print-label__footer span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.asset-print-label__header strong {
    display: block;
    margin-top: 2px;
    font-size: 24px;
    line-height: 1;
}

.asset-print-label__body {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    align-items: center;
}

.asset-print-label__qr {
    width: 132px;
    height: 132px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
}

.asset-print-label__qr img {
    width: 100%;
    height: 100%;
    display: block;
}

.asset-print-label__meta {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.asset-print-label__meta strong {
    font-size: 18px;
    line-height: 1.2;
}

.asset-print-label__meta span,
.asset-print-label__meta small {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.asset-print-label__barcode {
    padding: 0 14px 14px;
}

.asset-print-label__barcode svg {
    width: 100%;
    height: 74px;
    display: block;
    background: #fff;
}

.asset-print-label__barcode rect {
    fill: #0f172a;
}

.asset-print-label__barcode text {
    fill: #0f172a;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

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

.list {
    display: grid;
}

.list-row {
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.mini-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.mini-card h3,
.mini-card p {
    margin: 0;
}

.mini-card p {
    color: var(--muted);
}

.mini-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.mini-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 8px;
}

.mini-list dt {
    color: var(--muted);
    font-weight: 700;
}

.mini-list dd {
    margin: 0;
    font-weight: 800;
}

.branch-card {
    padding: 18px;
}

.branch-card h2 {
    margin: 0;
}

.branch-card p {
    color: var(--muted);
}

.pagination {
    padding: 1rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

.custom-pagination,
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    font-size: 0.85rem;
    color: #64748b;
}

/* Prevent raw SVG overflow anywhere inside pagination */
nav[role="navigation"] svg,
.custom-pagination svg,
.pagination svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.pagination-info {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.pagination-info .font-semibold,
.pagination-info strong {
    color: #0f172a;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pagination-btn:hover:not(.disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #94a3b8;
    box-shadow: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.4rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-number:hover:not(.active):not(.disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #6366f1;
}

.pagination-number.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.pagination-number.disabled {
    border: none;
    background: transparent;
    color: #94a3b8;
}

/* Override legacy Tailwind pagination output if any view bypasses vendor default */
nav[role="navigation"] > div:first-child {
    display: none !important;
}

nav[role="navigation"] > div:last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

nav[role="navigation"] span.relative,
nav[role="navigation"] a.relative {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.leave-balance-pagination nav > div:last-child > div:last-child a,
.leave-balance-pagination nav > div:last-child > div:last-child span[aria-current="page"] > span,
.leave-balance-pagination nav > div:last-child > div:last-child span[aria-disabled="true"] > span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    margin-left: -1px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.leave-balance-pagination nav > div:last-child > div:last-child a:hover {
    background: #f8fafc;
}

.leave-balance-pagination nav > div:last-child > div:last-child span[aria-current="page"] > span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.leave-balance-pagination nav > div:last-child > div:last-child span[aria-disabled="true"] > span {
    color: #94a3b8;
    background: #f8fafc;
}

.leave-balance-pagination svg {
    width: 16px;
    height: 16px;
    display: block;
}

.leave-balance-pagination .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer {
    padding: 16px 28px;
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer div {
    justify-content: space-between;
    gap: 12px;
}

.installer-page {
    min-height: 100vh;
    padding: 34px 24px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 38%),
        var(--bg);
}

.installer-wrap {
    max-width: 1160px;
    margin: 0 auto;
}

.installer-hero {
    margin-bottom: 22px;
}

.installer-hero h1 {
    margin: 6px 0;
    font-size: 34px;
}

.installer-card {
    overflow: hidden;
}

.installer-card form,
.installer-card .installed-box,
.installer-card .alert,
.installer-section {
    padding: 22px;
}

.form-card {
    overflow: hidden;
}

.form-body {
    padding: 22px;
}

.compact-form {
    display: grid;
    gap: 14px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(160px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.compact-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
}

.report-filter {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-filter .filter-actions {
    grid-column: 1 / -1;
}

.filter-actions,
.inline-actions,
.split-actions,
.button-list {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-actions,
.panel-header .inline-actions,
.button-list {
    flex-wrap: wrap;
}

.split-actions {
    justify-content: space-between;
}

.list-row-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.padded-grid {
    padding: 18px;
}

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    gap: 12px;
    padding: 18px 20px;
    overflow-x: auto;
}

.pipeline-cell {
    min-height: 96px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.pipeline-cell span {
    color: var(--muted);
    font-weight: 800;
}

.pipeline-cell strong {
    font-size: 28px;
}

.slim-button {
    min-height: 32px;
    margin-top: 12px;
}

.link-danger {
    border: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 800;
    cursor: pointer;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    font-weight: 700;
}

.flash ul {
    margin: 8px 0 0;
    padding-left: 18px;
    font-weight: 500;
}

.flash.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.flash.error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.installer-card > header {
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

.checkbox-field {
    align-content: end;
}

.checkbox-field input {
    width: 20px;
    height: 20px;
}

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

.check-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 700;
}

.check-field input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.field span {
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 12px;
    outline: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.checkbox-field input {
    width: 20px;
    height: 20px;
    padding: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.alert {
    border-bottom: 1px solid #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.alert ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.success-box {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    border-radius: var(--radius);
    padding: 18px;
}

.check-list {
    display: grid;
    gap: 10px;
}

.check-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.check-item strong {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
}

.check-item .ok {
    background: #dcfce7;
    color: #166534;
}

.check-item .bad {
    background: #ffe4e6;
    color: #be123c;
}

.module-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.document-list {
    margin-top: 16px;
}

.feedback-form {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.capture-actions {
    margin-top: 18px;
    flex-wrap: wrap;
}

.qr-scanner {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0f172a;
    aspect-ratio: 16 / 9;
}

.qr-scanner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mobile-capture-status {
    margin-top: 16px;
}

.parsed-box,
.rich-text {
    margin-top: 16px;
    color: #334155;
    line-height: 1.7;
}

.parsed-box {
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.parsed-box p,
.rich-text p {
    margin: 6px 0 14px;
}

.letter-page {
    min-height: 100vh;
    background: #e5e7eb;
    padding: 28px;
}

.letter-sheet {
    max-width: 820px;
    min-height: 1060px;
    margin: 0 auto;
    padding: 42px 54px;
    background: #fff;
    box-shadow: var(--shadow);
}

.letter-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 28px;
}

.letter-head {
    padding-bottom: 22px;
    border-bottom: 2px solid var(--text);
}

.letter-head h1 {
    margin: 0;
    font-size: 26px;
}

.letter-head p,
.letter-content p {
    color: #334155;
    line-height: 1.7;
}

.letter-content {
    padding-top: 24px;
    font-size: 15px;
}

.letter-content h2 {
    margin: 28px 0 18px;
    text-align: center;
    text-transform: uppercase;
}

.letter-date {
    text-align: right;
}

.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 34%),
        linear-gradient(240deg, rgba(37, 99, 235, 0.12), transparent 36%),
        #eef3f8;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.auth-shell {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

.auth-brand-panel {
    position: relative;
    display: grid;
    align-content: space-between;
    gap: 42px;
    padding: 42px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.88), rgba(7, 21, 39, 0.94)),
        #071527;
    color: #eef8ff;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(219, 234, 254, 0.12);
    border-radius: 14px;
    pointer-events: none;
}

.auth-brand,
.auth-highlights,
.auth-options label {
    display: flex;
    align-items: center;
}

.auth-brand {
    position: relative;
    z-index: 1;
    gap: 14px;
}

.auth-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #f8fbff;
    color: #1d4ed8;
    font-size: 19px;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(2, 8, 23, 0.22);
}

.auth-brand strong,
.auth-brand span,
.auth-highlights strong,
.auth-highlights span {
    display: block;
}

.auth-brand strong {
    font-size: 18px;
}

.auth-brand span,
.auth-panel-copy p,
.auth-highlights span {
    color: #bdd0e7;
}

.auth-panel-copy {
    position: relative;
    z-index: 1;
    max-width: 470px;
}

.auth-kicker {
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-brand-panel .auth-kicker {
    color: #99f6e4;
}

.auth-panel-copy h1 {
    margin: 10px 0 12px;
    font-size: 46px;
    line-height: 1.05;
}

.auth-panel-copy p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

.auth-highlights {
    position: relative;
    z-index: 1;
    gap: 12px;
}

.auth-highlights div {
    min-width: 0;
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(219, 234, 254, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.auth-highlights strong {
    font-size: 18px;
}

.auth-card {
    display: grid;
    align-content: center;
    padding: 48px;
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-card-head h2 {
    margin: 8px 0 8px;
    color: #0f172a;
    font-size: 32px;
}

.auth-card-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field span,
.auth-options span {
    color: #334155;
    font-weight: 800;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cfd9e8;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    padding: 0 14px;
    outline: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-field input:focus {
    border-color: #0f766e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.auth-options label {
    gap: 9px;
}

.auth-options input {
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
}

.auth-submit {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    background: #172033;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(23, 32, 51, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-submit:hover {
    background: #0f766e;
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.24);
    transform: translateY(-1px);
}

.auth-alert,
.auth-status {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.auth-alert {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.auth-alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.auth-status {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.subtle-panel {
    box-shadow: none;
}

.social-post .wall-copy {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-line;
}

.answer-stack {
    display: grid;
    gap: 10px;
    min-width: 280px;
}

.answer-item {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.answer-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.answer-item strong {
    color: var(--text);
}

.answer-item span {
    color: var(--muted);
    white-space: pre-line;
}

@media print {
    html,
    body.asset-label-printing {
        background: #fff !important;
        overflow: visible !important;
    }

    body.asset-label-printing .sidebar,
    body.asset-label-printing .topbar,
    body.asset-label-printing footer,
    body.asset-label-printing .flash,
    body.asset-label-printing .page-stack > :not(.asset-label-grid),
    body.asset-label-printing .asset-label-grid > :not(.asset-label-panel),
    body.asset-label-printing .asset-label-panel > .panel-header,
    body.asset-label-printing .asset-label-panel .detail-grid,
    body.asset-label-printing .asset-label-panel .inline-actions {
        display: none !important;
    }

    body.asset-label-printing .app-shell,
    body.asset-label-printing .app-main,
    body.asset-label-printing .page-content,
    body.asset-label-printing .page-stack,
    body.asset-label-printing .asset-label-grid,
    body.asset-label-printing .asset-label-panel,
    body.asset-label-printing .asset-label-panel .form-body {
        display: block !important;
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    body.asset-label-printing .asset-print-label {
        display: block !important;
        width: 96mm !important;
        max-width: 96mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .letter-page {
        padding: 0;
        background: #fff;
    }

    .letter-sheet {
        max-width: none;
        min-height: 0;
        box-shadow: none;
    }

    .letter-toolbar {
        display: none;
    }
}

@media (max-width: 1100px) {
    .stats-grid,
    .card-grid,
    .two-column-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-grid,
    .installer-grid {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 360px;
    }
}

@media (max-width: 820px) {
    html, body {
        height: auto !important;
        overflow: auto !important;
    }

    .app-shell {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 12px 16px;
    }

    .user-chip-text,
    .ghost-button {
        display: none;
    }

    .page-content,
    .footer {
        padding: 18px 16px;
    }

    .stats-grid,
    .card-grid,
    .detail-grid,
    .form-grid,
    .filter-bar,
    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .split-actions,
    .list-row-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-page {
        padding: 16px;
    }

    .auth-shell {
        min-height: 0;
        border-radius: 14px;
    }

    .auth-brand-panel,
    .auth-card {
        padding: 28px;
    }

    .auth-brand-panel {
        min-height: 330px;
    }

    .auth-panel-copy h1 {
        font-size: 34px;
    }

    .auth-highlights {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.inline-edit-form {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.inline-edit-form input,
.inline-edit-form select,
.inline-edit-form textarea,
.data-table td > input,
.data-table td > select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

.checkbox-line input {
    width: 16px;
    height: 16px;
}

/* Sidebar links container */
.side-nav-links {
    display: grid;
    gap: 2px;
    padding-top: 4px;
}

/* Small spacing fix for Compliance requirement edit fields only */
.compliance-field-gap > select,
.compliance-field-gap > input {
    display: block;
    width: 100%;
}

.compliance-field-gap > select + select,
.compliance-field-gap > input + input {
    margin-top: 8px;
}

/* Compliance policy register */
.compliance-policy-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.compliance-policy-item {
    overflow: hidden;
}

.compliance-policy-item-head {
    background: var(--surface-soft);
}

.compliance-policy-title {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.compliance-policy-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.compliance-policy-title strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.compliance-policy-title small {
    color: var(--muted);
    line-height: 1.35;
}

.compliance-policy-edit {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    padding: 18px;
}

.compliance-policy-field {
    min-width: 0;
}

.compliance-policy-edit .field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.compliance-policy-edit input,
.compliance-policy-edit select,
.compliance-policy-edit textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.compliance-policy-edit textarea {
    min-height: 74px;
    resize: vertical;
}

.compliance-policy-wide {
    grid-column: span 3;
}

.compliance-policy-ack-box {
    display: grid;
    align-content: center;
    gap: 6px;
    min-height: 70px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.compliance-policy-ack-box .checkbox-line {
    align-items: center;
    line-height: 1.3;
}

.compliance-policy-ack-box small {
    color: var(--muted);
}

.compliance-policy-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.compliance-policy-actions form {
    margin: 0;
}

.compliance-policy-actions .secondary-button,
.compliance-policy-actions .danger-button {
    min-width: 92px;
    min-height: 38px;
    padding: 0 14px;
}

@media (max-width: 1180px) {
    .compliance-policy-edit {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compliance-policy-wide {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .compliance-policy-item-head {
        display: grid;
    }

    .compliance-policy-actions {
        justify-content: stretch;
    }

    .compliance-policy-actions .secondary-button,
    .compliance-policy-actions .danger-button,
    .compliance-policy-actions form {
        width: 100%;
    }

    .compliance-policy-edit,
    .compliance-policy-wide {
        grid-template-columns: 1fr;
        grid-column: auto;
    }
}

/* Internal messaging */
.internal-recipient-field {
    display: grid;
    gap: 10px;
}

.internal-recipient-helper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.internal-recipient-helper strong {
    color: var(--text);
    font-size: 14px;
}

.internal-recipient-helper small,
.internal-recipient-copy small {
    color: var(--muted);
}

.internal-recipient-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.internal-recipient-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.internal-recipient-option:hover,
.internal-recipient-option:has(input:checked) {
    border-color: var(--primary);
    background: #eff6ff;
}

.internal-recipient-option input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.internal-recipient-check {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
}

.internal-recipient-option input:checked + .internal-recipient-check {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 3px #fff;
}

.internal-recipient-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.internal-recipient-copy strong,
.internal-recipient-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.internal-message-list {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--line);
}

.internal-message-item {
    max-width: 780px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.internal-message-item.is-own {
    justify-self: end;
    background: #f8fafc;
}

.internal-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.internal-message-meta strong {
    color: var(--text);
}

.internal-message-meta small {
    color: var(--muted);
}

.internal-message-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

@media (max-width: 860px) {
    .internal-recipient-list {
        grid-template-columns: 1fr;
    }

    .internal-message-item,
    .internal-message-item.is-own {
        justify-self: stretch;
        max-width: none;
    }
}

/* Notification Bell & Dropdown */
.notif-bell {
    position: relative;
    display: inline-block;
}

.notif-bell-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.notif-bell-btn:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
}

.notif-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 32px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid #edf2f7;
}

.notif-dropdown.notif-dropdown-open {
    transform: translateX(0);
}

.notif-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notif-drawer-backdrop.notif-backdrop-open {
    display: block;
    opacity: 1;
}

.notif-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-dropdown-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.notif-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s;
}

.notif-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.notif-mark-all {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.notif-mark-all:hover {
    text-decoration: underline;
}

.notif-group-title {
    padding: 14px 20px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: capitalize;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.notif-card {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: background 0.2s;
}

.notif-card:hover {
    background: #f8fafc;
}

.notif-card.notif-unread {
    background: #f3f8ff; /* Premium light blue unread style */
}

.notif-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notif-icon-leave {
    background: #eff6ff;
    color: #3b82f6;
}

.notif-icon-payroll {
    background: #f0fdf4;
    color: #22c55e;
}

.notif-icon-asset {
    background: #faf5ff;
    color: #a855f7;
}

.notif-icon-expense {
    background: #fff7ed;
    color: #f97316;
}

.notif-icon-announcement {
    background: #fdf2f8;
    color: #ec4899;
}

.notif-icon-performance {
    background: #fffbeb;
    color: #eab308;
}

.notif-icon-helpdesk {
    background: #f0fdfa;
    color: #14b8a6;
}

.notif-icon-general {
    background: #f1f5f9;
    color: #64748b;
}

.notif-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.notif-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.notif-card-title-row strong {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.notif-time {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-card-content p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.notif-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.notif-pill-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.3;
}

.notif-pill-btn:hover {
    background: #3b82f6;
    color: #ffffff;
}

.notif-pill-btn.btn-secondary {
    border-color: #cbd5e1;
    color: #475569;
}

.notif-pill-btn.btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.notif-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.notif-empty {
    padding: 36px 20px;
    text-align: center;
}

@media (max-width: 480px) {
    .notif-dropdown {
        width: 100vw;
    }
}

/* Helpdesk Conversation Timeline */
.timeline-list {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
}

.timeline-item {
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: inline-block;
    margin-right: 8px;
}

.timeline-item small {
    font-size: 11px;
    color: var(--muted);
}

.timeline-item p {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Sidebar Mini Mode */
@media (min-width: 821px) {
    body.sidebar-mini .sidebar {
        width: 72px;
    }

    body.sidebar-mini .app-main {
        margin-left: 72px;
        width: calc(100vw - 72px);
        max-width: calc(100vw - 72px);
    }
}