:root {
    --rh-bg: #070707;
    --rh-bg-soft: #101010;
    --rh-panel: #141414;
    --rh-panel-2: #1b1b1b;
    --rh-border: rgba(201, 174, 99, 0.18);
    --rh-border-strong: rgba(201, 174, 99, 0.34);
    --rh-text: #f4efe0;
    --rh-muted: #c5b995;
    --rh-gold: #c5aa63;
    --rh-gold-strong: #e1c97d;
    --rh-brown: #d6bf82;
    --rh-danger: #cf6e5b;
    --rh-success: #6fa879;
    --rh-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    --rh-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
    --rh-radius: 24px;
    --rh-radius-sm: 16px;
    --rh-current-text: #f4efe0;
    --rh-current-muted: #c5b995;
    --rh-current-heading: #e1c97d;
    --rh-current-surface: rgba(21, 21, 21, 0.98);
    --rh-current-surface-2: rgba(13, 13, 13, 0.94);
    --rh-current-surface-soft: rgba(255, 255, 255, 0.04);
    --rh-current-input-bg: rgba(255, 255, 255, 0.04);
    --rh-current-input-border: rgba(201, 174, 99, 0.16);
    --rh-current-table-head: rgba(255, 255, 255, 0.03);
    --rh-current-option-bg: #23201a;
    --rh-current-option-text: #fff6df;
}

html {
    background: var(--rh-bg);
}

html[dir="rtl"] body {
    direction: rtl;
}

body {
    background:
        radial-gradient(circle at top left, rgba(197, 170, 99, 0.09), transparent 24%),
        radial-gradient(circle at top right, rgba(197, 170, 99, 0.07), transparent 20%),
        linear-gradient(180deg, #050505 0%, #0e0d0b 44%, #13110e 100%) !important;
    color: var(--rh-text) !important;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif !important;
}

body,
input,
select,
textarea,
button,
table,
th,
td {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif !important;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at top left, rgba(197, 170, 99, 0.12), transparent 28%),
        linear-gradient(180deg, #f9f5eb 0%, #f1eadb 100%) !important;
    color: #2f2a21 !important;
    --rh-current-text: #2f2a21;
    --rh-current-muted: #6b6557;
    --rh-current-heading: #86671f;
    --rh-current-surface: rgba(255, 255, 255, 0.97);
    --rh-current-surface-2: rgba(248, 242, 229, 0.95);
    --rh-current-surface-soft: rgba(255, 255, 255, 0.9);
    --rh-current-input-bg: rgba(255, 255, 255, 0.92);
    --rh-current-input-border: rgba(124, 97, 33, 0.16);
    --rh-current-table-head: rgba(201, 174, 99, 0.08);
    --rh-current-option-bg: #fffdfa;
    --rh-current-option-text: #2f2a21;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(201, 174, 99, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 174, 99, 0.026) 1px, transparent 1px);
    background-size: 38px 38px;
    opacity: 0.4;
    z-index: 0;
}

body[data-theme="light"]::before {
    background-image:
        linear-gradient(rgba(197, 170, 99, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 170, 99, 0.024) 1px, transparent 1px);
    opacity: 0.55;
}

.container,
.page-shell,
.card,
.hero,
.section,
.section-block,
.availability-note,
.topbar,
.login-shell,
.layout,
.summary-grid {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
}

.app-topbar,
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px !important;
    margin: 16px auto 0;
    max-width: calc(100% - 32px);
    background: rgba(12, 12, 12, 0.9) !important;
    color: var(--rh-text) !important;
    border: 1px solid var(--rh-border) !important;
    border-radius: 22px !important;
    box-shadow: var(--rh-shadow-soft) !important;
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 40;
    overflow: visible !important;
}

.topbar-logo {
    width: 210px;
    max-width: 100%;
    height: 56px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(201,174,99,0.03)),
        url('logo.png') left center / contain no-repeat;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

html[dir="rtl"] .topbar-user {
    justify-content: flex-start;
}

.topbar-user-meta {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 174, 99, 0.14);
    color: var(--rh-current-muted);
    font-size: 13px;
}

.topbar-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lang-switcher {
    position: relative;
}

.header-nav-menu {
    position: relative;
}

.header-nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(201, 174, 99, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rh-current-text);
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.header-nav-panel {
    display: none;
    position: fixed;
    top: max(78px, calc(env(safe-area-inset-top, 0px) + 78px));
    left: 50%;
    transform: translateX(-50%);
    width: min(980px, calc(100vw - 32px));
    max-height: min(78vh, 760px);
    overflow: auto;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--rh-current-input-border);
    background: var(--rh-current-surface);
    box-shadow: var(--rh-shadow);
    z-index: 60;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.header-nav-panel[hidden] {
    display: none !important;
}

.header-nav-menu.open .header-nav-panel {
    display: grid;
}

html[dir="rtl"] .header-nav-panel {
    left: 50%;
    right: auto;
}

.header-nav-mobile-head {
    display: none;
}

.header-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(201, 174, 99, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rh-current-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.header-nav-group {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(201, 174, 99, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.header-nav-group-title {
    margin-bottom: 10px;
    color: var(--rh-current-heading);
    font-size: 14px;
    font-weight: 700;
}

.header-nav-links {
    display: grid;
    gap: 8px;
}

.header-nav-link {
    display: block !important;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--rh-current-text);
    text-decoration: none !important;
    transition: background 0.18s ease, transform 0.18s ease;
}

.header-nav-link:hover {
    background: rgba(201, 174, 99, 0.12);
    transform: translateY(-1px);
}

.header-nav-link-main {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.header-nav-link-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(201, 174, 99, 0.18), rgba(201, 174, 99, 0.06));
    border: 1px solid rgba(201, 174, 99, 0.18);
    font-size: 18px;
}

.header-nav-link-copy {
    min-width: 0;
}

.header-nav-link-copy strong {
    display: block !important;
    color: var(--rh-current-text);
    margin-bottom: 4px;
    font-size: 14px;
    text-decoration: none !important;
}

.header-nav-link-copy span {
    display: block !important;
    color: var(--rh-current-muted);
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
    text-decoration: none !important;
}

.lang-switcher summary {
    list-style: none;
}

.lang-switcher summary::-webkit-details-marker {
    display: none;
}

.lang-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(201, 174, 99, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rh-current-text);
    cursor: pointer;
    user-select: none;
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 110px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--rh-current-input-border);
    background: var(--rh-current-surface);
    box-shadow: var(--rh-shadow-soft);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

html[dir="rtl"] .lang-switcher-menu {
    right: auto;
    left: 0;
}

.lang-switcher-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--rh-current-text);
    text-decoration: none;
    min-width: 0;
    width: 100%;
}

.lang-switcher-item:hover,
.lang-switcher-item.active {
    background: rgba(201, 174, 99, 0.12);
}

.lang-code {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.login-lang-switcher {
    margin-inline-end: 12px;
}

.secondary-tool-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.export-icon-btn {
    min-width: 40px;
    width: 40px;
    padding: 0 !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 999px !important;
    border: 1px solid rgba(201, 174, 99, 0.22) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--rh-current-text) !important;
    cursor: pointer;
    box-shadow: none !important;
    font-size: 18px;
    line-height: 1;
}

.topbar-logout,
.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    color: var(--rh-current-text) !important;
    background: linear-gradient(135deg, rgba(201, 174, 99, 0.2), rgba(201, 174, 99, 0.08)) !important;
    border: 1px solid rgba(201, 174, 99, 0.28) !important;
    box-shadow: none !important;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.theme-toggle-btn:hover,
.topbar-logout:hover,
.logout-link:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 174, 99, 0.48) !important;
}

html[dir="rtl"] .hero-head,
html[dir="rtl"] .section-head,
html[dir="rtl"] .filters-grid,
html[dir="rtl"] .hero-meta,
html[dir="rtl"] .topbar-tools {
    direction: rtl;
}

html[dir="rtl"] .hero-back-btn,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] label,
html[dir="rtl"] .nav-content,
html[dir="rtl"] .summary-label,
html[dir="rtl"] .summary-foot,
html[dir="rtl"] .meta-chip {
    text-align: right;
}

.hero {
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(31, 25, 15, 0.96)) !important;
    color: var(--rh-current-text) !important;
    border: 1px solid var(--rh-border-strong) !important;
    box-shadow: var(--rh-shadow) !important;
    border-radius: 30px !important;
}

.hero::after {
    content: "";
    position: absolute;
    top: 16px;
    right: 18px;
    width: 110px;
    height: 110px;
    background: url('logo.png') center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

.hero h1,
.hero h2,
.hero h3,
.section-head h2,
.card h2,
.card h3,
h1,
h2,
h3,
h4 {
    color: var(--rh-current-heading) !important;
}

.hero p,
.section-head p,
p,
.hint,
.summary,
.note,
.actions a,
.brandcopy span,
.summary-label,
.summary-foot {
    color: var(--rh-current-muted) !important;
}

.hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-copy-block {
    min-width: 0;
}

.hero-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(201, 174, 99, 0.26);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rh-current-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.card,
.section,
.section-block,
.availability-note,
.login-panel,
.signup-panel {
    background: linear-gradient(180deg, var(--rh-current-surface), var(--rh-current-surface-2)) !important;
    border: 1px solid var(--rh-border) !important;
    box-shadow: var(--rh-shadow-soft) !important;
    border-radius: var(--rh-radius) !important;
}

.summary-card,
.nav-card,
.hero-logo,
.role-badge,
.month-badge,
.meta-chip {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)), var(--rh-current-surface) !important;
    color: var(--rh-current-text) !important;
    border: 1px solid var(--rh-border) !important;
    box-shadow: var(--rh-shadow-soft) !important;
}

.summary-value,
.nav-content strong,
.brandcopy strong {
    color: var(--rh-current-text) !important;
}

label {
    color: var(--rh-current-heading) !important;
}

input,
select,
textarea {
    background: var(--rh-current-input-bg) !important;
    color: var(--rh-current-text) !important;
    border: 1px solid var(--rh-current-input-border) !important;
    border-radius: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-align: start !important;
    unicode-bidi: plaintext;
}

th,
td,
.message,
.summary-value,
.info-value,
.detail-row,
.helper-note,
.card,
.hero,
.topbar-user-meta {
    text-align: start;
    unicode-bidi: plaintext;
}

select,
option,
optgroup {
    color: var(--rh-current-option-text) !important;
    background: var(--rh-current-option-bg) !important;
}

select {
    font-weight: 600;
}

select option {
    padding: 10px 12px;
}

option[disabled] {
    color: var(--rh-current-muted) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(197, 185, 149, 0.62) !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(225, 201, 125, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(201, 174, 99, 0.14);
    background: rgba(255, 255, 255, 0.06) !important;
}

button,
.action-btn,
.approve-btn,
.delete-btn {
    border-radius: 14px !important;
    border: 0 !important;
}

button,
.action-btn,
.approve-btn {
    background: linear-gradient(135deg, var(--rh-gold), #d6be79) !important;
    color: #241c0d !important;
    box-shadow: 0 14px 28px rgba(201, 174, 99, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover,
.action-btn:hover,
.approve-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.delete-btn {
    background: linear-gradient(135deg, #b55746, #944637) !important;
    color: #fff8f5 !important;
}

.message {
    border: 1px solid transparent;
}

.message.success {
    background: rgba(111, 168, 121, 0.14) !important;
    color: #b9e6c1 !important;
    border-color: rgba(111, 168, 121, 0.26);
}

.message.error {
    background: rgba(207, 110, 91, 0.14) !important;
    color: #ffc2b7 !important;
    border-color: rgba(207, 110, 91, 0.24);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(201, 174, 99, 0.1) !important;
    color: var(--rh-current-text) !important;
}

th {
    background: var(--rh-current-table-head) !important;
    color: var(--rh-current-heading) !important;
}

.card {
    overflow-x: auto;
}

.filters-card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(201, 174, 99, 0.14);
    background: var(--rh-current-surface-soft);
}

.filters-card:not(.is-open) {
    display: none;
}

.filter-toggle-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.filter-toggle-btn {
    width: auto !important;
    min-height: 42px;
    padding: 0 16px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(201, 174, 99, 0.22), rgba(201, 174, 99, 0.12)) !important;
    color: var(--rh-current-text) !important;
    border: 1px solid rgba(201, 174, 99, 0.28) !important;
    box-shadow: none !important;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filters-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.filters-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(201, 174, 99, 0.22);
    background: var(--rh-current-surface-soft);
    color: var(--rh-current-text) !important;
    text-decoration: none;
}

.table-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid rgba(201, 174, 99, 0.14);
    background: var(--rh-current-surface-soft);
}

.table-scroll-top-inner {
    height: 1px;
}

.table-responsive-wrap {
    overflow-x: auto;
}

.status-row-checkin td {
    background: rgba(111, 168, 121, 0.24) !important;
}

.status-row-checkout td {
    background: rgba(207, 110, 91, 0.24) !important;
}

.status-row-current td {
    background: rgba(201, 174, 99, 0.28) !important;
}

body[data-theme="light"] .status-row-checkin td {
    background: rgba(111, 168, 121, 0.26) !important;
}

body[data-theme="light"] .status-row-checkout td {
    background: rgba(207, 110, 91, 0.26) !important;
}

body[data-theme="light"] .status-row-current td {
    background: rgba(201, 174, 99, 0.3) !important;
}

.filters-card input,
.filters-card select {
    margin-bottom: 0 !important;
}

.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(201, 174, 99, 0.12);
    color: var(--rh-gold-strong) !important;
    text-decoration: none;
    border: 1px solid rgba(201, 174, 99, 0.2);
}

body[data-theme="light"] .app-topbar,
body[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.88) !important;
    color: var(--rh-current-text) !important;
}

body[data-theme="light"] .hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 240, 222, 0.93)) !important;
}

body[data-theme="light"] .topbar-logo {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(247,240,222,0.72)),
        url('logo.png') left center / contain no-repeat !important;
}

body[data-theme="light"] .message.success {
    color: #1f5a2b !important;
}

body[data-theme="light"] .message.error {
    color: #8b2d20 !important;
}

body.page-owner-report .stat,
body.page-owner-report .mini-stat,
body.page-owner-report .chart-card,
body.page-owner-report .calendar-card {
    color: var(--rh-current-text) !important;
}

body.page-owner-report .stat-title {
    color: var(--rh-current-heading) !important;
    font-weight: 700;
}

body.page-owner-report .stat-value,
body.page-owner-report .stat-value.red,
body.page-owner-report .stat-value.green {
    color: var(--rh-current-text) !important;
    text-shadow: none !important;
}

body.page-owner-report .owner-box,
body.page-owner-report .chart-legend,
body.page-owner-report .chart-legend div,
body.page-owner-report .chart-card h3,
body.page-owner-report .calendar-card h3,
body.page-owner-report .gauge-value {
    color: var(--rh-current-text) !important;
}

body.page-owner-report .chart-legend span,
body.page-owner-report .owner-box strong {
    color: var(--rh-current-heading) !important;
}

body.page-owner-report[data-theme="dark"] .stat {
    background: linear-gradient(180deg, #fffdf8, #f4ecdc) !important;
    border-color: rgba(201, 174, 99, 0.24) !important;
}

body.page-owner-report[data-theme="dark"] .stat-title {
    color: #7a5a18 !important;
}

body.page-owner-report[data-theme="dark"] .stat-value,
body.page-owner-report[data-theme="dark"] .stat-value.red,
body.page-owner-report[data-theme="dark"] .stat-value.green {
    color: #231f18 !important;
}

body.page-owner-report[data-theme="light"] .hero,
body.page-owner-report[data-theme="light"] .card,
body.page-owner-report[data-theme="light"] .stat,
body.page-owner-report[data-theme="light"] .chart-card,
body.page-owner-report[data-theme="light"] .calendar-card,
body.page-owner-report[data-theme="light"] .mini-stat.booked,
body.page-owner-report[data-theme="light"] .mini-stat.free {
    box-shadow: var(--rh-shadow-soft) !important;
}

body.page-owner-report[data-theme="light"] .stat,
body.page-owner-report[data-theme="light"] .chart-card,
body.page-owner-report[data-theme="light"] .calendar-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,242,229,0.95)) !important;
}

body.page-owner-report[data-theme="light"] .mini-stat.booked {
    background: #f8d7d1 !important;
    color: #7c2016 !important;
}

body.page-owner-report[data-theme="light"] .mini-stat.free {
    background: #d8efd9 !important;
    color: #15542a !important;
}

body.page-owner-report[data-theme="light"] .booking-calendar th {
    background: #e9dec3 !important;
    color: #3a2d16 !important;
    border-color: #cdb98a !important;
}

body.page-owner-report[data-theme="light"] .booking-calendar td.booked {
    background: #f0b7aa !important;
    color: #5c1d12 !important;
    border-color: #d59a8d !important;
}

body.page-owner-report[data-theme="light"] .booking-calendar td.free {
    background: #bfe5c4 !important;
    color: #144a24 !important;
    border-color: #95c99d !important;
}

body.page-owner-report[data-theme="light"] .booking-calendar td.empty {
    background: #f5efdf !important;
    color: #f5efdf !important;
    border-color: #d7c7a0 !important;
}

.table-actions {
    flex-wrap: wrap;
}

.topbar-notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    text-decoration: none;
}

.topbar-notification-icon {
    font-size: 18px;
    line-height: 1;
}

.topbar-notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c9ae63;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.85);
}

.card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.notification-list {
    display: grid;
    gap: 14px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--rh-border);
    background: var(--rh-current-surface-soft);
}

.notification-item.unread {
    border-color: var(--rh-gold);
    box-shadow: 0 0 0 1px rgba(201, 174, 99, 0.18) inset;
}

.notification-main {
    flex: 1;
}

.notification-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.notification-title-row h3 {
    margin: 0;
    font-size: 18px;
}

.notification-status {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(201, 174, 99, 0.16);
    color: var(--rh-gold-strong);
}

.notification-main p {
    margin: 0 0 10px;
}

.notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 12px;
    color: var(--muted);
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.notification-actions form {
    margin: 0;
}

.notification-actions .hero-back-btn {
    width: 100%;
    text-align: center;
}

.table-vertical-scroll {
    max-height: 70vh;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--rh-border);
}

.table-vertical-scroll table {
    margin: 0;
}

.table-vertical-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.sorting-panel {
    margin: 0 0 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--rh-border);
    background: var(--rh-current-surface-soft);
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.sorting-label {
    display: block;
    min-width: 120px;
    margin-bottom: 0;
    font-weight: 700;
}

.sorting-select {
    width: min(420px, 100%);
    margin-bottom: 0;
}

.empty-state {
    padding: 20px 8px;
}

.empty-state h3 {
    margin-top: 0;
}

@media (max-width: 900px) {
    .app-topbar,
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px !important;
    }

    .topbar-logo {
        width: 170px;
        height: 48px;
    }

    .topbar-user {
        width: 100%;
        justify-content: flex-start;
    }

    .hero {
        border-radius: 24px !important;
    }

    .container {
        padding: 0 14px !important;
    }

    .card,
    .section-block {
        padding: 18px !important;
    }

    table {
        min-width: 640px;
    }

    .notification-item {
        flex-direction: column;
    }

    .notification-actions {
        min-width: 0;
        width: 100%;
    }

    .sorting-panel {
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .topbar-user-meta {
        width: 100%;
    }

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

    .hero-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-back-btn {
        width: 100%;
    }

    .filters-actions {
        flex-direction: column;
    }

    .filters-actions button,
    .filters-actions a {
        width: 100%;
    }

    table {
        min-width: 560px;
    }
}

/* Unified controls across the whole system */
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
}

textarea {
    min-height: 108px !important;
    resize: vertical !important;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    accent-color: var(--rh-gold);
}

input[type="file"] {
    min-height: 48px !important;
    padding: 10px 12px !important;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--rh-current-text) 50%),
        linear-gradient(135deg, var(--rh-current-text) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

button,
.action-btn,
.approve-btn,
.delete-btn,
.secondary-btn,
.filter-toggle-btn,
.hero-back-btn,
.share-btn,
.theme-toggle-btn,
.secondary-tool-btn,
.topbar-logout,
.logout-link,
.filters-actions a,
.actions a,
.table-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 11px 16px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.export-icon-btn {
    min-width: 40px !important;
    width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

.table-actions form {
    margin: 0;
}

.checkbox-inline {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 4px 0 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    margin: 0 !important;
}

.compact-checkbox {
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

body.page-departments .layout,
body.page-job-titles .layout,
body.page-employees .layout,
body.page-leave-requests .layout,
body.page-employee-actions .layout,
body.page-employee-advances .layout,
body.page-payroll .layout {
    display: grid !important;
    grid-template-columns: 420px 1fr !important;
    gap: 22px !important;
    align-items: start !important;
}

body.page-departments .card:first-child,
body.page-job-titles .card:first-child,
body.page-employees .card:first-child,
body.page-leave-requests .card:first-child,
body.page-employee-actions .card:first-child,
body.page-employee-advances .card:first-child,
body.page-payroll .card:first-child {
    position: sticky;
    top: 18px;
    align-self: start;
}

body.page-departments .layout > .card:only-child,
body.page-job-titles .layout > .card:only-child,
body.page-employees .layout > .card:only-child,
body.page-leave-requests .layout > .card:only-child,
body.page-employee-actions .layout > .card:only-child,
body.page-employee-advances .layout > .card:only-child,
body.page-payroll .layout > .card:only-child,
body .layout > .card.export-scope:only-child {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    position: static !important;
}

body.page-departments .two-cols,
body.page-job-titles .two-cols,
body.page-employees .two-cols,
body.page-leave-requests .two-cols,
body.page-employee-actions .two-cols,
body.page-employee-advances .two-cols,
body.page-payroll .two-cols {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
}

body.page-departments .table-responsive-wrap,
body.page-job-titles .table-responsive-wrap,
body.page-employees .table-responsive-wrap,
body.page-leave-requests .table-responsive-wrap,
body.page-employee-actions .table-responsive-wrap,
body.page-employee-advances .table-responsive-wrap,
body.page-payroll .table-responsive-wrap {
    overflow-x: auto;
}

@media (max-width: 1050px) {
    body.page-departments .layout,
    body.page-job-titles .layout,
    body.page-employees .layout,
    body.page-leave-requests .layout,
    body.page-employee-actions .layout,
    body.page-employee-advances .layout,
    body.page-payroll .layout,
    body.page-departments .two-cols,
    body.page-job-titles .two-cols,
    body.page-employees .two-cols,
    body.page-leave-requests .two-cols,
    body.page-employee-actions .two-cols,
    body.page-employee-advances .two-cols,
    body.page-payroll .two-cols {
        grid-template-columns: 1fr !important;
    }

    body.page-departments .card:first-child,
    body.page-job-titles .card:first-child,
    body.page-employees .card:first-child,
    body.page-leave-requests .card:first-child,
    body.page-employee-actions .card:first-child,
    body.page-employee-advances .card:first-child,
    body.page-payroll .card:first-child {
        position: static;
    }
}

@media (max-width: 760px) {
    body.header-nav-open {
        overflow: hidden;
    }

    .topbar-user {
        width: 100%;
        align-items: stretch;
    }

    .topbar-user-meta {
        width: 100%;
        text-align: center;
    }

    .topbar-tools {
        width: 100%;
        justify-content: flex-start;
    }

    html[dir="rtl"] .topbar-tools {
        justify-content: flex-end;
    }

    .header-nav-menu {
        position: static;
    }

    .header-nav-trigger {
        min-width: 110px;
        justify-content: center;
    }

    .header-nav-panel {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100vw;
        max-width: none;
        grid-template-columns: 1fr;
        padding: calc(env(safe-area-inset-top, 0px) + 16px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px);
        border-radius: 0;
        max-height: 100vh;
        min-height: 100vh;
        background: var(--rh-current-surface);
        align-content: start;
    }

    html[dir="rtl"] .header-nav-panel {
        left: 0;
        right: 0;
    }

    .header-nav-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 8px;
        padding: 4px 2px 10px;
        position: sticky;
        top: 0;
        background: var(--rh-current-surface);
        z-index: 2;
    }

    .header-nav-mobile-head strong {
        color: var(--rh-current-heading);
        font-size: 18px;
    }

    .header-nav-group {
        padding: 12px;
    }

    .header-nav-group-title {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .header-nav-link {
        padding: 12px;
    }

    .header-nav-link-main {
        align-items: flex-start;
        flex-wrap: nowrap;
    }

    .header-nav-link-copy strong {
        font-size: 15px;
        line-height: 1.35;
    }

    .header-nav-link-copy span {
        font-size: 13px;
        line-height: 1.5;
    }
}
