:root {
    --primary: #f49b33;
    --primary-dark: #d97816;
    --accent: #174b3f;
    --ink: #12382f;
    --muted: #66756f;
    --line: #ded4bf;
    --panel: #fffdf7;
    --canvas: #f6edda;
    --soft: #efe5cf;
    --soft-hover: #e7dcc6;
    --ring: rgba(244, 155, 51, .24);
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "LINE Seed Sans TH", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
}

body.theme-dark {
    --primary: #f89c2f;
    --primary-dark: #ffb45c;
    --accent: #72cba1;
    --ink: #eef8ef;
    --muted: #9bb8aa;
    --line: #244238;
    --panel: #14271f;
    --canvas: #0b1f18;
    --soft: #162c23;
    --soft-hover: #1d392f;
    --ring: rgba(248, 156, 47, .3);
}

body.theme-accent-emerald {
    --primary: #10b981;
    --primary-dark: #047857;
    --accent: #0f513f;
    --ring: rgba(16, 185, 129, .24);
}

body.theme-accent-blue {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #1e3a8a;
    --ring: rgba(59, 130, 246, .24);
}

body.theme-accent-rose {
    --primary: #f43f5e;
    --primary-dark: #be123c;
    --accent: #7f1d1d;
    --ring: rgba(244, 63, 94, .22);
}

body.theme-accent-violet {
    --primary: #8b5cf6;
    --primary-dark: #6d28d9;
    --accent: #4c1d95;
    --ring: rgba(139, 92, 246, .24);
}

body.theme-dark.theme-accent-emerald {
    --primary: #34d399;
    --primary-dark: #6ee7b7;
    --accent: #a7f3d0;
    --ring: rgba(52, 211, 153, .28);
}

body.theme-dark.theme-accent-blue {
    --primary: #60a5fa;
    --primary-dark: #93c5fd;
    --accent: #bfdbfe;
    --ring: rgba(96, 165, 250, .28);
}

body.theme-dark.theme-accent-rose {
    --primary: #fb7185;
    --primary-dark: #fda4af;
    --accent: #fecdd3;
    --ring: rgba(251, 113, 133, .28);
}

body.theme-dark.theme-accent-violet {
    --primary: #a78bfa;
    --primary-dark: #c4b5fd;
    --accent: #ddd6fe;
    --ring: rgba(167, 139, 250, .28);
}

body.theme-density-compact {
    font-size: 14px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .82), rgba(246, 237, 218, .6)),
        radial-gradient(circle at 82% 18%, rgba(244, 155, 51, .12), transparent 28%),
        radial-gradient(circle at 16% 82%, rgba(23, 75, 63, .08), transparent 32%);
    z-index: -1;
}

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(246, 237, 218, .74)),
        var(--canvas);
}

.login-page::before {
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .72), rgba(246, 237, 218, .5)),
        radial-gradient(circle at 15% 18%, rgba(23, 75, 63, .14), transparent 30%),
        radial-gradient(circle at 82% 16%, rgba(244, 155, 51, .16), transparent 27%),
        radial-gradient(circle at 72% 86%, rgba(77, 118, 101, .12), transparent 32%);
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: clamp(18px, 4vw, 48px);
}

.login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(380px, .82fr);
    width: min(1120px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(207, 195, 166, .76);
    border-radius: 8px;
    background: rgba(255, 253, 247, .7);
    box-shadow: 0 34px 90px rgba(18, 56, 47, .16);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.login-panel-simple {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    min-height: 0;
    background:
        linear-gradient(180deg, rgba(255, 253, 247, .94), rgba(250, 244, 231, .88)),
        rgba(255, 255, 255, .78);
}

.login-logo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
}

.login-logo-empty {
    display: grid;
    place-items: center;
    color: #ffd8a1;
    font-size: 1.65rem;
}

.login-brand-name {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.2;
}

.login-brand-subtitle {
    color: rgba(255, 253, 247, .72);
    font-size: .96rem;
}

.login-form-wrap {
    display: grid;
    align-items: center;
    padding: clamp(24px, 4vw, 48px);
    background:
        linear-gradient(180deg, rgba(255, 253, 247, .9), rgba(250, 244, 231, .82)),
        rgba(255, 255, 255, .64);
}

.login-panel-simple .login-form-wrap {
    padding: clamp(28px, 5vw, 54px);
    background:
        linear-gradient(180deg, rgba(255, 253, 247, .96), rgba(250, 244, 231, .9)),
        rgba(255, 255, 255, .72);
}

.login-form-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 430px;
    margin-inline: auto;
}

.login-form-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(207, 195, 166, .58);
}

.login-form-brand .login-logo {
    border-color: rgba(207, 195, 166, .92);
    background: rgba(255, 255, 255, .84);
    color: var(--primary-dark);
    box-shadow: 0 14px 30px rgba(18, 56, 47, .08);
}

.login-form-brand .login-brand-name {
    color: var(--ink);
}

.login-form-brand .login-brand-subtitle {
    color: var(--muted);
}

.login-form-head {
    display: block;
    margin-bottom: 28px;
}

.login-form-icon {
    display: grid;
    place-items: center;
    position: absolute;
    right: -34px;
    top: 58px;
    z-index: -1;
    width: 260px;
    height: 260px;
    color: rgba(217, 120, 22, .055);
    font-size: 13rem;
    transform: rotate(-9deg);
    pointer-events: none;
}

.login-form-head > div:last-child {
    position: relative;
    z-index: 1;
}

.login-form-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
}

.login-form-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

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

.login-input-group {
    position: relative;
}

.login-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 2;
    color: #7a8d84;
    font-size: 1.05rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input-group .form-control {
    min-height: 52px;
    padding-left: 46px;
    border-color: rgba(207, 195, 166, .9);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 26px rgba(18, 56, 47, .05);
}

.login-input-group .form-control:focus {
    border-color: rgba(244, 155, 51, .9);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ring), 0 14px 30px rgba(18, 56, 47, .08);
}

.login-input-group:focus-within i {
    color: var(--primary-dark);
}

.login-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border-color: #e38b24;
    background: linear-gradient(135deg, #f6a23a, #e98522);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(217, 120, 22, .24);
}

.login-submit:hover,
.login-submit:focus {
    border-color: #d97816;
    background: linear-gradient(135deg, #ffac45, #e98522);
    color: #fff;
    box-shadow: 0 18px 38px rgba(217, 120, 22, .28);
}

.login-forgot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid rgba(207, 195, 166, .76);
    border-radius: 8px;
    background: rgba(255, 255, 255, .44);
    color: #174b3f;
    font-weight: 600;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-forgot-link:hover,
.login-forgot-link:focus {
    border-color: rgba(18, 56, 47, .7);
    background: rgba(255, 253, 247, .9);
    color: #925106;
    box-shadow: 0 12px 28px rgba(18, 56, 47, .1);
    transform: translateY(-1px);
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.btn-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: .16em;
}

.login-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    color: #74837d;
    font-size: .9rem;
    text-align: center;
}

@keyframes dorm-gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes dorm-ambient-drift {
    0% {
        background-position: 0% 0%;
        opacity: .82;
    }
    100% {
        background-position: 100% 100%;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    body,
    body::before {
        animation: none;
    }
}

body.sidebar-open {
    overflow: hidden;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    position: sticky;
    top: 0;
    width: 260px;
    height: 100vh;
    flex: 0 0 260px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 253, 247, .88);
    color: var(--ink);
    border-right: 1px solid rgba(207, 195, 166, .55);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    overflow: visible;
    overscroll-behavior: contain;
    z-index: 1040;
    scrollbar-width: thin;
    transition: width .22s ease, flex-basis .22s ease, padding .22s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 20px;
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 700;
    text-decoration: none;
    min-width: 0;
}

.brand-name {
    display: -webkit-box;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: clamp(1rem, 1.2vw, 1.08rem);
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(207, 195, 166, .7);
    border-radius: 8px;
    background: rgba(255, 255, 255, .62);
    color: var(--primary);
    font-size: 1.85rem;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .1);
}

.brand-logo {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(207, 195, 166, .7);
    padding: 4px;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .1);
}

.sidebar-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar .nav-link,
.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: #66756f;
    border-radius: 8px;
    padding: 9px 10px;
    min-height: 40px;
    font-weight: 500;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.sidebar .nav-link i,
.sidebar-group-label i {
    flex: 0 0 22px;
    text-align: center;
}

.sidebar-group {
    display: grid;
    gap: 4px;
}

.sidebar-group-toggle {
    justify-content: space-between;
}

.sidebar-group-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-group-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-badge {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0 7px;
    border: 1px solid rgba(244, 155, 51, .34);
    border-radius: 999px;
    background: rgba(244, 155, 51, .14);
    color: #925106;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
}

.sidebar-group-chevron {
    flex: 0 0 auto;
    font-size: .8rem;
    transition: transform .16s ease;
}

.sidebar-group.open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-items {
    display: grid;
    gap: 3px;
    padding: 2px 0 6px 14px;
    margin-left: 10px;
    border-left: 1px solid rgba(207, 195, 166, .58);
}

.sidebar-group-items[hidden] {
    display: none;
}

.sidebar-group-items .nav-link {
    min-height: 36px;
    padding: 8px 10px;
    font-size: .96rem;
}

.sidebar-close,
.menu-toggle {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(207, 195, 166, .72);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    color: #174b3f;
    box-shadow: 0 8px 20px rgba(18, 56, 47, .08);
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar-close {
    margin-left: auto;
    border-color: rgba(207, 195, 166, .82);
    background: rgba(255, 255, 255, .68);
    color: #174b3f;
}

.topbar .menu-toggle {
    flex: 0 0 40px;
    border-color: rgba(207, 195, 166, .88);
    background: rgba(239, 229, 207, .72);
    color: #174b3f;
}

.topbar .menu-toggle i,
.sidebar-close i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.05rem;
}

.sidebar-close:hover,
.sidebar-close:focus,
.menu-toggle:hover,
.menu-toggle:focus {
    border-color: rgba(18, 56, 47, .72);
    background: rgba(239, 229, 207, .92);
    color: #925106;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .14);
}

.sidebar-backdrop {
    display: none;
}

.sidebar-collapse-toggle {
    position: fixed;
    top: 57px;
    left: 245px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    border: 1px solid rgba(207, 195, 166, .78);
    border-radius: 999px;
    background: rgba(255, 252, 246, .94);
    color: #174b3f;
    box-shadow: 0 8px 20px rgba(18, 56, 47, .1);
    z-index: 1050;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .22s ease;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus {
    border-color: rgba(18, 56, 47, .78);
    background: #fff;
    color: #925106;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .16);
}

.sidebar-collapse-toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px var(--ring), 0 10px 24px rgba(18, 56, 47, .16);
}

.sidebar-collapse-toggle i {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1;
    font-size: 1rem;
    transform: translateX(-1px);
    transition: transform .22s ease;
}

body.sidebar-collapsed .sidebar {
    width: 84px;
    flex-basis: 84px;
    padding-inline: 10px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .sidebar .nav-link span,
body.sidebar-collapsed .sidebar-group-label span,
body.sidebar-collapsed .sidebar-group-chevron,
body.sidebar-collapsed .sidebar-user-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

body.sidebar-collapsed .sidebar-body {
    padding-right: 0;
}

body.sidebar-collapsed .sidebar-nav {
    align-items: center;
}

body.sidebar-collapsed .sidebar .nav-link,
body.sidebar-collapsed .sidebar-group-toggle {
    justify-content: center;
    width: 52px;
    min-height: 44px;
    padding: 10px;
}

body.sidebar-collapsed .sidebar .nav-link i,
body.sidebar-collapsed .sidebar-group-label i {
    flex-basis: auto;
    width: 22px;
    font-size: 1.08rem;
}

body.sidebar-collapsed .sidebar-group-items {
    display: none;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar-collapse-toggle i {
    transform: translateX(1px) rotate(180deg);
}

body.sidebar-collapsed .sidebar-collapse-toggle {
    left: 69px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.sidebar-group-toggle:hover,
.sidebar-group-toggle.active {
    color: #925106;
    background: rgba(239, 229, 207, .92);
    border-color: rgba(207, 195, 166, .75);
    box-shadow: 0 8px 20px rgba(18, 56, 47, .08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: 14px;
    padding: 12px 10px 2px;
    border-top: 1px solid rgba(207, 195, 166, .58);
}

.sidebar-user-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .78);
    box-shadow: 0 8px 20px rgba(18, 56, 47, .12);
}

.sidebar-user-avatar.empty {
    display: inline-grid;
    place-items: center;
    background: rgba(239, 229, 207, .92);
    color: #174b3f;
    font-weight: 700;
}

.sidebar-user-meta {
    min-width: 0;
    line-height: 1.35;
}

.sidebar-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-weight: 600;
}

.sidebar-user-detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: .86rem;
}

.main-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 100vh;
}

.topbar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, .58);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.topbar-actions > .btn {
    height: 46px;
    min-height: 46px;
    border-radius: 8px;
    padding-block: 0;
}

.topbar-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
}

.topbar-actions > a.btn:not(.topbar-icon-btn) {
    min-width: 150px;
    padding-inline: 18px;
}

.topbar-actions > .btn i {
    font-size: 1.05rem;
}

.appearance-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    z-index: 60;
    width: min(360px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 247, .96);
    box-shadow: 0 24px 70px rgba(18, 56, 47, .18);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.appearance-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.appearance-close {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    color: var(--ink);
}

.appearance-section {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.appearance-label {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
}

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

.appearance-segment button,
.appearance-swatches button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .62);
    color: var(--ink);
}

.appearance-segment button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 10px;
    white-space: nowrap;
}

.appearance-segment button.active,
.appearance-swatches button.active {
    border-color: var(--primary);
    background: var(--ring);
    box-shadow: 0 0 0 3px var(--ring);
}

.appearance-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.appearance-swatches button {
    width: 36px;
    height: 36px;
    padding: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .7), transparent),
        var(--swatch);
}

body.theme-dark .appearance-panel {
    background: rgba(20, 39, 31, .96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

body.theme-dark .appearance-close,
body.theme-dark .appearance-segment button,
body.theme-dark .appearance-swatches button {
    background-color: rgba(255, 255, 255, .06);
    color: var(--ink);
}

body.theme-density-compact .sidebar-nav {
    gap: 3px;
}

body.theme-density-compact .nav-link,
body.theme-density-compact .sidebar-group-toggle {
    min-height: 44px;
    padding-block: 8px;
}

body.theme-density-compact .container-fluid {
    padding-block: 20px;
}

body.theme-density-compact .card-body {
    padding: 18px;
}

.container-fluid {
    flex: 1 0 auto;
    padding: 28px;
}

.app-footer {
    flex: 0 0 auto;
    margin: 0 28px 24px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 18px 46px rgba(18, 56, 47, .08);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.app-footer-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.app-footer-title {
    color: var(--ink);
    font-weight: 600;
}

.app-footer-text,
.app-footer-copy {
    color: var(--muted);
    font-size: .92rem;
}

.app-footer-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #66756f;
    font-size: .92rem;
    text-align: right;
}

.app-footer-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 360px;
}

.app-footer-meta i {
    color: #5f8f78;
}

.app-footer-copy {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(207, 195, 166, .58);
}

.page-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 400;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .52);
    box-shadow: 0 18px 44px rgba(18, 56, 47, .12);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.card-body {
    min-width: 0;
}

.fw-bold {
    font-weight: 600 !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    border-radius: 8px;
    font-weight: 500;
    border-width: 1px;
    text-align: center;
    line-height: 1.35;
    vertical-align: middle;
    min-height: 38px;
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 8px 20px rgba(18, 56, 47, .06);
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    flex: 0 0 auto;
}

.btn-primary,
.btn-outline-primary,
.btn-info,
.btn-outline-info {
    border-color: #cfc3a6;
    background: rgba(255, 255, 255, .58);
    color: #174b3f;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-info:hover,
.btn-info:focus,
.btn-outline-info:hover,
.btn-outline-info:focus {
    border-color: rgba(18, 56, 47, .78);
    background: rgba(239, 229, 207, .94);
    color: #925106;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .14);
}

.btn-light,
.btn-outline-light,
.btn-secondary,
.btn-outline-secondary,
.btn-dark,
.btn-outline-dark {
    border-color: rgba(207, 195, 166, .72);
    background: rgba(255, 255, 255, .46);
    color: #66756f;
}

.btn-light:hover,
.btn-light:focus,
.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-dark:hover,
.btn-dark:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    border-color: #cfc3a6;
    background: rgba(255, 253, 247, .92);
    color: #925106;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .1);
}

.btn-success,
.btn-outline-success {
    border-color: #a7f3d0;
    background: rgba(255, 255, 255, .54);
    color: #047857;
}

.btn-success:hover,
.btn-success:focus,
.btn-outline-success:hover,
.btn-outline-success:focus {
    border-color: #6ee7b7;
    background: rgba(209, 250, 229, .86);
    color: #065f46;
    box-shadow: 0 10px 24px rgba(52, 211, 153, .12);
}

.btn-warning,
.btn-outline-warning {
    border-color: #fde68a;
    background: rgba(255, 255, 255, .54);
    color: #a16207;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-outline-warning:hover,
.btn-outline-warning:focus {
    border-color: #fcd34d;
    background: rgba(254, 243, 199, .9);
    color: #854d0e;
    box-shadow: 0 10px 24px rgba(245, 158, 11, .1);
}

.btn-danger,
.btn-outline-danger {
    border-color: #fecdd3;
    background: rgba(255, 255, 255, .54);
    color: #be123c;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    border-color: #fda4af;
    background: rgba(255, 228, 230, .9);
    color: #9f1239;
    box-shadow: 0 10px 24px rgba(244, 63, 94, .1);
}

.btn:active,
.btn.active,
.btn.show,
.btn:first-child:active {
    border-color: rgba(18, 56, 47, .82);
    background: rgba(239, 229, 207, .98);
    color: #925106;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--ring), 0 10px 24px rgba(18, 56, 47, .12);
}

.btn-sm {
    min-height: 34px;
    padding-inline: .65rem;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
    border-color: rgba(207, 195, 166, .48);
    background: rgba(255, 253, 247, .5);
    color: #a69982;
    box-shadow: none;
    opacity: 1;
}

.btn-close {
    border-radius: 8px;
    background-color: rgba(255, 255, 255, .58);
    border: 1px solid rgba(207, 195, 166, .72);
    box-shadow: 0 8px 20px rgba(18, 56, 47, .06);
    opacity: .78;
}

.btn-close:hover,
.btn-close:focus {
    background-color: rgba(239, 229, 207, .92);
    box-shadow: 0 0 0 3px var(--ring);
    opacity: 1;
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 8px;
    min-height: 42px;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: #cfc3a6;
    box-shadow: 0 0 0 3px var(--ring);
}

.form-label {
    color: #47645b;
    font-weight: 500;
}

.table {
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
    width: 100%;
}

.datatable {
    width: 100% !important;
}

.table > :not(caption) > * > * {
    padding: .82rem .75rem;
}

.table thead th {
    color: #47645b;
    font-size: .95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .38);
}

.table tbody td,
.table tfoot th {
    background: transparent;
}

.modal-content,
.dropdown-menu,
.alert {
    background: rgba(255, 255, 255, .72);
    border-color: var(--line);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.modal-backdrop.show {
    opacity: 1;
    background: rgba(18, 56, 47, .34);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-dialog {
    --bs-modal-border-radius: 8px;
    --bs-modal-inner-border-radius: 8px;
    --bs-modal-header-border-color: rgba(207, 195, 166, .58);
    --bs-modal-footer-border-color: rgba(207, 195, 166, .58);
    --bs-modal-padding: 1.25rem;
}

.modal-content {
    overflow: hidden;
    border: 1px solid rgba(207, 195, 166, .78);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .9), rgba(246, 237, 218, .88)),
        rgba(255, 255, 255, .84);
    color: var(--ink);
    box-shadow: 0 28px 78px rgba(18, 56, 47, .22);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.modal-header,
.modal-footer {
    background: rgba(255, 255, 255, .32);
}

.modal-header {
    align-items: center;
    padding: 1rem 1.25rem;
}

.modal-title {
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    gap: 8px;
    padding: 1rem 1.25rem;
}

.modal .form-control,
.modal .form-select {
    border-color: rgba(207, 195, 166, .84);
    background-color: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 18px rgba(18, 56, 47, .05);
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: rgba(18, 56, 47, .78);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--ring), 0 10px 24px rgba(18, 56, 47, .08);
}

.modal .btn-close {
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(255, 255, 255, .68);
    border-color: rgba(207, 195, 166, .82);
    box-shadow: 0 10px 24px rgba(18, 56, 47, .1);
}

.swal2-popup.dorm-swal {
    border: 1px solid rgba(207, 195, 166, .72);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .92), rgba(246, 237, 218, .9)),
        rgba(255, 255, 255, .86);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(18, 56, 47, .16);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    font-family: "LINE Seed Sans TH", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    padding: 1.45rem 1.5rem 1.35rem;
}

.swal2-popup.dorm-swal .swal2-icon {
    margin: .35rem auto 1rem;
    width: 4.25rem;
    height: 4.25rem;
}

.swal2-popup.dorm-swal .swal2-icon::before,
.swal2-popup.dorm-swal .swal2-icon::after,
.swal2-popup.dorm-swal .swal2-success-circular-line-left,
.swal2-popup.dorm-swal .swal2-success-circular-line-right,
.swal2-popup.dorm-swal .swal2-success-fix {
    display: none !important;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(18, 56, 47, .28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.swal2-title.dorm-swal-title {
    color: var(--ink);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 0;
    padding-top: .1rem;
}

.swal2-html-container.dorm-swal-html {
    color: var(--muted);
    font-size: .98rem;
    margin-top: .45rem;
}

.swal2-icon.swal2-success {
    border-color: rgba(167, 243, 208, .95);
    background: rgba(236, 253, 245, .78);
    color: #10b981;
    box-shadow: 0 10px 28px rgba(16, 185, 129, .12);
    animation: dorm-swal-success-pop .32s ease-out both;
}

.swal2-icon.swal2-success [class^="swal2-success-line"] {
    display: none !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(167, 243, 208, .88);
}

.swal2-popup.dorm-swal .swal2-icon.swal2-success::after {
    content: "";
    display: block !important;
    position: absolute;
    left: 1.18rem;
    top: 1.33rem;
    width: 1.72rem;
    height: .92rem;
    border-left: .32rem solid #10b981;
    border-bottom: .32rem solid #10b981;
    border-radius: 2px;
    transform: rotate(-45deg);
    transform-origin: center;
    opacity: 0;
    animation: dorm-swal-check-draw .34s ease-out .18s both;
}

@keyframes dorm-swal-success-pop {
    0% {
        opacity: 0;
        transform: scale(.72);
    }
    65% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dorm-swal-check-draw {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: rotate(-45deg) scale(.92);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: rotate(-45deg) scale(1);
    }
}

.swal2-icon.swal2-warning {
    border-color: #fde68a;
    color: #d97706;
}

.swal2-icon.swal2-error {
    border-color: #fecdd3;
    color: #e11d48;
}

.swal2-icon.swal2-info {
    border-color: #cfc3a6;
    color: #174b3f;
}

.dorm-swal-actions {
    gap: 10px;
}

.dorm-swal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 40px;
    padding: .48rem .95rem;
    border: 1px solid rgba(207, 195, 166, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    color: #174b3f;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 8px 20px rgba(18, 56, 47, .08);
}

.dorm-swal-button:hover,
.dorm-swal-button:focus {
    border-color: rgba(18, 56, 47, .78);
    background: rgba(239, 229, 207, .94);
    color: #925106;
    outline: 0;
    box-shadow: 0 0 0 3px var(--ring), 0 10px 24px rgba(18, 56, 47, .14);
}

.dorm-swal-cancel {
    border-color: rgba(207, 195, 166, .72);
    color: #66756f;
}

.swal2-toast.dorm-swal {
    border-radius: 12px;
    padding: .75rem .9rem;
}

.swal2-toast .dorm-swal-title {
    font-size: .98rem;
}

.dataTables_wrapper .form-control,
.dataTables_wrapper .form-select {
    min-height: 36px;
}

.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollHead,
.dataTables_scrollHeadInner,
.dataTables_scrollBody {
    width: 100% !important;
}

.dataTables_scrollHeadInner table,
.dataTables_scrollBody table {
    width: 100% !important;
    min-width: 100%;
}

.dataTables_scrollBody {
    overflow-x: auto;
}

.dataTables_wrapper .row {
    align-items: center;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dt-toolbar {
    row-gap: 10px;
}

.dataTables_wrapper .dt-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dt-button.btn {
    min-height: 36px;
    border-color: rgba(207, 195, 166, .86);
    background: rgba(255, 253, 247, .78);
    color: var(--ink);
    box-shadow: none;
}

.dataTables_wrapper .dt-buttons .btn:hover,
.dataTables_wrapper .dt-buttons .btn:focus,
.dataTables_wrapper .dt-button.btn:hover,
.dataTables_wrapper .dt-button.btn:focus {
    border-color: rgba(244, 155, 51, .72);
    background: rgba(244, 155, 51, .12);
    color: #9a4f07;
    box-shadow: 0 8px 18px rgba(244, 155, 51, .1);
}

.dataTables_wrapper .dt-buttons .btn i,
.dataTables_wrapper .dt-button.btn i {
    color: var(--primary);
}

.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 4px;
}

.dataTables_wrapper .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    border-color: rgba(207, 195, 166, .72);
    background: rgba(255, 255, 255, .54);
    color: #174b3f;
    box-shadow: 0 8px 20px rgba(18, 56, 47, .06);
}

.dataTables_wrapper .page-link:hover,
.dataTables_wrapper .page-link:focus {
    border-color: rgba(18, 56, 47, .78);
    background: rgba(239, 229, 207, .94);
    color: #925106;
    box-shadow: 0 0 0 3px var(--ring);
}

.dataTables_wrapper .page-item.active .page-link {
    border-color: rgba(18, 56, 47, .82);
    background: rgba(239, 229, 207, .98);
    color: #925106;
    box-shadow: 0 10px 24px rgba(18, 56, 47, .12);
}

.dataTables_wrapper .page-item.disabled .page-link {
    border-color: rgba(207, 195, 166, .48);
    background: rgba(255, 253, 247, .5);
    color: #a69982;
    box-shadow: none;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 108px;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 0;
    color: var(--primary);
    background: transparent;
    box-shadow: none;
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 12px 18px rgba(18, 56, 47, .22));
}

.stat-icon i {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--primary);
}

.badge-soft-success,
.badge-soft-primary,
.badge-soft-warning,
.badge-soft-danger {
    border-radius: 999px;
    padding: .45rem .65rem;
    font-weight: 600;
}

.badge-soft-success { color: #047857; background: #d1fae5; }
.badge-soft-primary { color: #174b3f; background: #e7dcc6; }
.badge-soft-warning { color: #b45309; background: #fef3c7; }
.badge-soft-danger { color: #be123c; background: #ffe4e6; }

.invoice-print {
    max-width: 900px;
    margin: 0 auto;
}

.invoice-print .invoice-table {
    min-width: 0;
    width: 100%;
}

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

.receipt-document {
    color: var(--ink);
    max-width: 210mm;
    border-color: rgba(207, 195, 166, .9);
    background: #fffdf7;
}

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

.receipt-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.receipt-logo {
    width: 24mm;
    height: 24mm;
    flex: 0 0 24mm;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 5px;
}

.receipt-title-box {
    flex: 0 0 260px;
    min-width: 260px;
    text-align: right;
}

.receipt-title-box .badge {
    margin-inline: auto 0;
}

.receipt-no {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 12px;
    border: 1px solid rgba(207, 195, 166, .86);
    border-radius: 8px;
    background: rgba(250, 244, 231, .58);
    color: var(--ink);
    font-weight: 700;
    max-width: 100%;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    justify-content: center;
    text-align: center;
    font-size: clamp(.78rem, .95vw, .92rem);
    line-height: 1.3;
}

.receipt-section-label {
    color: var(--muted);
    font-size: .92rem;
}

.receipt-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr);
    gap: 24px;
    margin-bottom: 26px;
}

.receipt-info-box {
    min-width: 0;
    color: #4f625a;
}

.receipt-person-name {
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
}

.receipt-info-box-right {
    display: grid;
    gap: 7px;
}

.receipt-info-box-right > div {
    display: grid;
    grid-template-columns: minmax(110px, .72fr) minmax(0, 1fr);
    gap: 10px;
}

.receipt-info-box-right span,
.receipt-meta-grid span {
    color: var(--ink);
    font-weight: 700;
}

.receipt-info-box-right strong,
.receipt-meta-grid strong {
    color: #4f625a;
    font-weight: 500;
}

.receipt-table {
    border: 1px solid rgba(207, 195, 166, .82);
}

.receipt-table thead th {
    background: rgba(250, 244, 231, .9);
    color: var(--ink);
}

.receipt-table > :not(caption) > * > * {
    padding: .9rem 1rem;
}

.receipt-table tfoot th {
    font-size: 1.04rem;
    background: rgba(255, 250, 239, .82);
    color: var(--ink);
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin-top: 22px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(207, 195, 166, .72);
    color: #4f625a;
}

.receipt-meta-grid > div {
    display: grid;
    grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
    gap: 10px;
}

.receipt-signature-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 56px;
    margin-top: 72px;
}

.receipt-signature {
    color: var(--muted);
    text-align: center;
}

.receipt-signature-line {
    height: 1px;
    margin-bottom: 10px;
    background: rgba(115, 129, 121, .45);
}

.tenant-dashboard-table {
    min-width: 0;
    width: 100%;
}

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

.table-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table-avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(207, 195, 166, .86);
    background: rgba(255, 253, 247, .88);
    color: #174b3f;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(18, 56, 47, .1);
}

.room-thumb {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fffdf7;
    color: var(--muted);
}

.room-thumb-lg {
    width: 220px;
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.payment-qr-preview,
.payment-qr-image {
    display: block;
    width: min(100%, 320px);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 12px;
}

.payment-qr-image {
    margin-inline: auto;
}

.payment-qr-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    width: min(100%, 320px);
    aspect-ratio: 1;
    margin-inline: auto;
    border: 1px dashed rgba(207, 195, 166, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .55);
    color: var(--muted);
    text-align: center;
}

.payment-qr-empty i {
    color: var(--primary);
    font-size: 3rem;
}

.payment-instruction {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    padding: 12px;
    color: #47645b;
}

.profile-avatar {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fffdf7;
    color: var(--muted);
    font-size: 2rem;
}

.profile-avatar.empty {
    font-weight: 700;
}

.profile-avatar-lg {
    width: 140px;
    height: 140px;
}

.profile-upload-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(207, 195, 166, .78);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 253, 247, .72));
    box-shadow: 0 14px 30px rgba(18, 56, 47, .08);
}

.profile-upload-info {
    flex: 1 1 240px;
    min-width: 0;
}

.settings-card .card-body {
    padding: 0;
}

.settings-form {
    display: grid;
}

.settings-section {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-bottom: 1px solid rgba(207, 195, 166, .68);
}

.settings-section:last-of-type {
    border-bottom: 0;
}

.settings-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.settings-section-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(207, 195, 166, .82);
    border-radius: 8px;
    background: rgba(250, 244, 231, .78);
    color: var(--primary);
    font-size: 1.2rem;
}

.settings-section-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.settings-section-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.settings-section-body {
    min-width: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
    gap: 20px;
    align-items: start;
}

.settings-fields {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.settings-upload-panel {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(207, 195, 166, .76);
    border-radius: 8px;
    background: rgba(250, 244, 231, .52);
}

.settings-preview-box {
    display: grid;
    place-items: center;
    min-height: 190px;
    overflow: hidden;
    border: 1px dashed rgba(207, 195, 166, .88);
    border-radius: 8px;
    background: rgba(255, 253, 247, .78);
}

.settings-preview-box-square {
    aspect-ratio: 1;
    min-height: 0;
}

.settings-logo-preview,
.settings-qr-preview {
    display: block;
    width: 100%;
    max-width: 240px;
    max-height: 220px;
    object-fit: contain;
    padding: 12px;
}

.settings-qr-preview {
    max-width: 260px;
    max-height: 260px;
}

.settings-empty-preview {
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
    font-size: .92rem;
}

.settings-empty-preview i {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(207, 195, 166, .82);
    border-radius: 999px;
    background: rgba(250, 244, 231, .82);
    color: var(--primary);
    font-size: 1.35rem;
}

.settings-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
    border-top: 1px solid rgba(207, 195, 166, .72);
    background: rgba(255, 253, 247, .86);
    backdrop-filter: blur(14px) saturate(135%);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.settings-actions .btn {
    min-width: 170px;
}

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

.rental-summary-card .card-body {
    position: relative;
    display: grid;
    gap: 4px;
    min-height: 92px;
    padding: 18px;
    overflow: hidden;
}

.rental-summary-card span {
    color: var(--muted);
    font-size: .92rem;
}

.rental-summary-card strong {
    color: var(--ink);
    font-size: 1.85rem;
    line-height: 1;
}

.rental-summary-card i {
    position: absolute;
    right: 18px;
    bottom: 14px;
    color: var(--primary);
    font-size: 2rem;
    opacity: .9;
}

.rental-building-list {
    display: grid;
    gap: 18px;
}

.rental-building-card .card-body {
    padding: 20px;
}

.rental-building-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.rental-building-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 700;
}

.rental-building-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .94rem;
}

.rental-building-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(222, 212, 191, .72);
}

.rental-building-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5f8f78, var(--primary));
}

.rental-floor-list {
    display: grid;
    gap: 18px;
}

.rental-floor {
    display: grid;
    gap: 12px;
}

.rental-floor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(207, 195, 166, .72);
    border-radius: 8px;
    background: rgba(250, 244, 231, .64);
    color: var(--ink);
}

.rental-floor-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.rental-floor-head i {
    color: var(--primary);
}

.rental-floor-head small {
    color: var(--muted);
}

.rental-room-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.rental-room-card {
    display: grid;
    gap: 10px;
    min-height: 198px;
    padding: 12px;
    border: 1px solid rgba(207, 195, 166, .74);
    border-left-width: 6px;
    border-radius: 8px;
    background: rgba(255, 253, 247, .78);
    box-shadow: 0 12px 28px rgba(18, 56, 47, .06);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rental-room-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 155, 51, .7);
    box-shadow: 0 18px 36px rgba(18, 56, 47, .1);
}

.rental-room-occupied {
    border-color: rgba(75, 119, 98, .34);
    border-left-color: #2f6f55;
    background:
        linear-gradient(135deg, rgba(230, 244, 236, .94), rgba(255, 253, 247, .78)),
        rgba(255, 253, 247, .82);
    box-shadow: 0 16px 34px rgba(47, 111, 85, .12);
}

.rental-room-available {
    border-color: rgba(244, 155, 51, .38);
    border-left-color: #f49b33;
    background:
        linear-gradient(135deg, rgba(255, 247, 232, .96), rgba(255, 253, 247, .82)),
        rgba(255, 253, 247, .82);
}

.rental-room-maintenance,
.rental-room-reserved {
    border-left-color: var(--primary);
}

.rental-room-occupied .badge {
    border-color: rgba(47, 111, 85, .24);
    background: #d8efe1;
    color: #185640;
}

.rental-room-available .badge {
    border-color: rgba(244, 155, 51, .34);
    background: #fff0d6;
    color: #a55305;
}

.rental-room-available .rental-room-number {
    color: #995407;
}

.rental-room-available .rental-room-person strong {
    color: #8a4c06;
}

.rental-room-available .rental-avatar-empty {
    border-color: rgba(244, 155, 51, .42);
    background: #fff7e8;
}

.rental-room-available .rental-avatar-empty i,
.rental-room-available .rental-room-meta i {
    color: #f49b33;
}

.rental-room-occupied .rental-avatar-empty,
.rental-room-occupied .rental-room-person img {
    border-color: rgba(47, 111, 85, .34);
    background: #e6f4ec;
}

.rental-room-occupied .rental-avatar-empty i,
.rental-room-occupied .rental-room-meta i {
    color: #2f6f55;
}

.rental-room-top,
.rental-room-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rental-room-number {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.rental-room-number:hover {
    color: var(--primary-dark);
}

.rental-room-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rental-room-person img,
.rental-avatar-empty {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid rgba(207, 195, 166, .82);
    border-radius: 999px;
    background: rgba(250, 244, 231, .84);
    color: var(--ink);
    font-weight: 800;
    object-fit: cover;
}

.rental-room-person strong,
.rental-room-person div > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rental-room-person strong {
    color: var(--ink);
    font-weight: 700;
}

.rental-room-person div > span {
    color: var(--muted);
    font-size: .9rem;
}

.rental-avatar-empty {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    color: var(--ink);
    font-size: 1.1rem;
}

.rental-avatar-empty i {
    color: #5f8f78;
    font-size: 1.45rem;
}

.rental-room-meta {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: .84rem;
}

.rental-room-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.rental-room-meta i {
    color: var(--primary);
}

.rental-room-actions {
    align-self: end;
    justify-content: flex-end;
}

.payment-room-chart-card .card-body {
    min-height: 410px;
}

.payment-room-chart-wrap {
    position: relative;
    width: 100%;
    height: 320px;
}

.report-link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 98px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(18, 56, 47, .07);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.report-link-card:hover,
.report-link-card:focus {
    border-color: rgba(244, 155, 51, .72);
    color: var(--ink);
    box-shadow: 0 18px 42px rgba(18, 56, 47, .12);
    transform: translateY(-1px);
}

.report-link-card > i:first-child {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: rgba(244, 155, 51, .14);
    color: var(--primary-dark);
    font-size: 1.35rem;
}

.report-link-card span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.report-link-card strong {
    font-size: 1.02rem;
    line-height: 1.25;
}

.report-link-card small {
    color: var(--muted);
    line-height: 1.35;
}

.report-link-chevron {
    margin-left: auto;
    color: var(--muted);
}

.payment-room-filter-card,
.payment-room-filter-card .card-body {
    overflow: visible;
}

.payment-room-filter-card {
    position: relative;
    z-index: 30;
}

.payment-room-filter-card ~ .rental-summary-grid,
.payment-room-filter-card ~ .payment-room-chart-card {
    position: relative;
    z-index: 1;
}

.searchable-room-select {
    position: relative;
    z-index: 20;
}

.searchable-select-open {
    z-index: 3000;
    margin-bottom: var(--searchable-popover-space, 0);
}

.searchable-select-open .searchable-room-popover {
    z-index: 3001;
}

.searchable-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.searchable-room-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: .375rem .75rem;
    border: 1px solid rgba(190, 181, 157, .95);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-align: left;
    box-shadow: 0 8px 18px rgba(18, 56, 47, .04);
}

.searchable-room-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-room-trigger i {
    flex: 0 0 auto;
    color: #47645b;
}

.searchable-room-trigger:hover,
.searchable-room-trigger:focus,
.searchable-room-trigger[aria-expanded="true"] {
    border-color: rgba(244, 155, 51, .9);
    background: #fff;
    box-shadow: 0 0 0 3px var(--ring);
}

.searchable-room-trigger[aria-expanded="true"] {
    border-bottom-color: rgba(190, 181, 157, .95);
    border-radius: 8px 8px 0 0;
}

.searchable-room-popover {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 2000;
    overflow: hidden;
    border: 1px solid rgba(190, 181, 157, .95);
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(18, 56, 47, .12);
}

.searchable-room-field {
    position: relative;
    padding: 8px;
    border-bottom: 1px solid rgba(207, 195, 166, .68);
    background: #fff;
}

.searchable-room-field > i {
    position: absolute;
    left: 24px;
    top: 50%;
    z-index: 2;
    color: #7a8d84;
    transform: translateY(-50%);
    pointer-events: none;
}

.searchable-room-field .form-control {
    min-height: 44px;
    padding-left: 42px;
    padding-right: 42px;
    border-color: rgba(244, 155, 51, .5);
    background: #fff;
}

.searchable-room-field:focus-within > i {
    color: var(--primary-dark);
}

.searchable-room-field .form-control:focus {
    border-color: rgba(244, 155, 51, .95);
    box-shadow: 0 0 0 3px var(--ring);
}

.searchable-room-clear {
    position: absolute;
    right: 17px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7a8d84;
    transform: translateY(-50%);
}

.searchable-room-clear:hover,
.searchable-room-clear:focus {
    background: rgba(239, 229, 207, .86);
    color: #925106;
}

.searchable-room-list {
    max-height: 300px;
    overflow-y: auto;
}

.searchable-room-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(207, 195, 166, .28);
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-size: 1rem;
}

.searchable-room-option:last-child {
    border-bottom: 0;
}

.searchable-room-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-room-option:hover,
.searchable-room-option:focus,
.searchable-room-option.active {
    background: #6ea2ef;
    color: #fff;
}

.searchable-room-empty {
    padding: 14px;
    color: var(--muted);
    text-align: center;
}

.rental-empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 42px 16px;
    color: var(--muted);
    text-align: center;
}

.rental-empty-state > i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(207, 195, 166, .82);
    border-radius: 999px;
    background: rgba(250, 244, 231, .82);
    color: var(--primary);
    font-size: 1.65rem;
}

.rental-empty-state h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 700;
}

.rental-empty-state p {
    margin: 0;
}

/* Kumram-inspired quiet theme */
.sidebar {
    background: rgba(250, 244, 231, .94);
    border-right-color: rgba(207, 195, 166, .78);
    box-shadow: none;
}

.brand,
.page-title,
.app-footer-title,
.sidebar-user-name {
    color: var(--ink);
}

.brand-logo {
    background: #fffdf7;
    box-shadow: 0 10px 22px rgba(18, 56, 47, .1);
}

.sidebar .nav-link,
.sidebar-group-toggle {
    color: #47645b;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.sidebar-group-toggle:hover,
.sidebar-group-toggle.active {
    color: var(--ink);
    background: rgba(222, 212, 191, .72);
    border-color: rgba(207, 195, 166, .74);
    box-shadow: none;
}

.sidebar-group-items {
    border-left-color: rgba(207, 195, 166, .78);
}

.sidebar-collapse-toggle {
    border-color: rgba(207, 195, 166, .86);
    background: rgba(255, 253, 247, .96);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(18, 56, 47, .08);
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus {
    border-color: rgba(244, 155, 51, .72);
    background: #fffdf7;
    color: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(244, 155, 51, .12);
}

.topbar {
    background: rgba(255, 253, 247, .62);
    border-bottom-color: rgba(207, 195, 166, .72);
    box-shadow: none;
}

.card,
.app-footer {
    border-color: rgba(207, 195, 166, .72);
    background: rgba(255, 253, 247, .66);
    box-shadow: 0 18px 42px rgba(18, 56, 47, .07);
}

.page-subtitle,
.sidebar-user-detail,
.app-footer-text,
.app-footer-copy {
    color: var(--muted);
}

.btn {
    border-color: rgba(207, 195, 166, .82);
    background: rgba(255, 253, 247, .7);
    color: var(--ink);
    box-shadow: none;
}

.btn:hover,
.btn:focus {
    border-color: rgba(244, 155, 51, .64);
    background: rgba(255, 248, 235, .9);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(244, 155, 51, .1);
}

.btn-primary {
    border-color: rgba(244, 155, 51, .88);
    background: #f49b33;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #d97816;
    background: #d97816;
    color: #fff;
}

.btn-outline-primary,
.btn-info,
.btn-outline-info {
    border-color: rgba(244, 155, 51, .72);
    background: rgba(255, 253, 247, .72);
    color: var(--primary-dark);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-info:hover,
.btn-info:focus,
.btn-outline-info:hover,
.btn-outline-info:focus {
    border-color: #f49b33;
    background: rgba(244, 155, 51, .12);
    color: #9a4f07;
}

.form-control,
.form-select {
    border-color: rgba(207, 195, 166, .9);
    background-color: rgba(255, 253, 247, .94);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(244, 155, 51, .82);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-label,
.table thead th {
    color: #3e554d;
}

.table {
    --bs-table-border-color: rgba(222, 212, 191, .84);
}

.table thead th {
    background: rgba(250, 244, 231, .64);
}

.table tbody td,
.table tfoot th {
    color: var(--ink);
}

.dataTables_wrapper .page-link {
    border-color: rgba(207, 195, 166, .82);
    background: rgba(255, 253, 247, .72);
    color: var(--ink);
    box-shadow: none;
}

.dataTables_wrapper .page-link:hover,
.dataTables_wrapper .page-link:focus,
.dataTables_wrapper .page-item.active .page-link {
    border-color: rgba(244, 155, 51, .78);
    background: rgba(244, 155, 51, .12);
    color: #9a4f07;
    box-shadow: none;
}

.badge-soft-success {
    color: #0f513f;
    background: #d7f0df;
}

.badge-soft-primary {
    color: #174b3f;
    background: #dce8dc;
}

.badge-soft-warning {
    color: #925106;
    background: #f9e4bf;
}

.badge-soft-danger {
    color: #9b2c22;
    background: #f6d6cf;
}

.room-thumb,
.table-avatar,
.profile-avatar,
.payment-qr-empty,
.payment-instruction {
    border-color: rgba(207, 195, 166, .78);
    background: rgba(250, 244, 231, .74);
}

.modal-content,
.dropdown-menu,
.alert,
.swal2-popup.dorm-swal {
    border-color: rgba(207, 195, 166, .8);
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(250, 244, 231, .9)),
        rgba(255, 253, 247, .88);
}

body.theme-dark::before {
    background:
        linear-gradient(135deg, rgba(7, 24, 18, .92), rgba(11, 31, 24, .72)),
        radial-gradient(circle at 78% 18%, rgba(248, 156, 47, .14), transparent 30%),
        radial-gradient(circle at 16% 82%, rgba(114, 203, 161, .1), transparent 34%);
}

body.theme-dark .sidebar,
body.theme-dark .topbar,
body.theme-dark .card,
body.theme-dark .app-footer,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu,
body.theme-dark .alert,
body.theme-dark .swal2-popup.dorm-swal {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(14, 34, 27, .84);
    color: var(--ink);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

body.theme-dark .sidebar {
    background: rgba(8, 26, 20, .94);
}

body.theme-dark .topbar {
    background: rgba(11, 31, 24, .72);
}

body.theme-dark .brand,
body.theme-dark .page-title,
body.theme-dark .app-footer-title,
body.theme-dark .sidebar-user-name,
body.theme-dark .table tbody td,
body.theme-dark .table tfoot th,
body.theme-dark .modal-title,
body.theme-dark .swal2-title.dorm-swal-title {
    color: var(--ink);
}

body.theme-dark .page-subtitle,
body.theme-dark .sidebar-user-detail,
body.theme-dark .app-footer-text,
body.theme-dark .app-footer-copy,
body.theme-dark .app-footer-meta,
body.theme-dark .app-footer-meta span,
body.theme-dark .app-footer-meta a,
body.theme-dark .text-muted,
body.theme-dark .small.text-muted {
    color: var(--muted) !important;
}

body.theme-dark .app-footer-meta i,
body.theme-dark .app-footer-meta .bi {
    color: #72cba1 !important;
}

body.theme-dark .sidebar .nav-link,
body.theme-dark .sidebar-group-toggle {
    color: #b6d2c5;
}

body.theme-dark .sidebar .nav-link:hover,
body.theme-dark .sidebar .nav-link.active,
body.theme-dark .sidebar-group-toggle:hover,
body.theme-dark .sidebar-group-toggle.active {
    color: #f3fff7;
    background: rgba(54, 85, 74, .58);
    border-color: rgba(77, 118, 101, .72);
}

body.theme-dark .sidebar-group-items,
body.theme-dark .sidebar-user,
body.theme-dark .app-footer-copy {
    border-color: rgba(54, 85, 74, .78);
}

body.theme-dark .sidebar-collapse-toggle,
body.theme-dark .btn,
body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .dataTables_wrapper .page-link,
body.theme-dark .room-thumb,
body.theme-dark .table-avatar,
body.theme-dark .profile-avatar,
body.theme-dark .payment-qr-empty,
body.theme-dark .payment-instruction,
body.theme-dark .settings-upload-panel,
body.theme-dark .settings-preview-box,
body.theme-dark .settings-empty-preview i,
body.theme-dark .rental-floor-head,
body.theme-dark .rental-room-card,
body.theme-dark .rental-room-person img,
body.theme-dark .rental-avatar-empty,
body.theme-dark .rental-empty-state > i {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(20, 45, 36, .82);
    color: var(--ink);
    box-shadow: none;
}

body.theme-dark .btn:hover,
body.theme-dark .btn:focus,
body.theme-dark .dataTables_wrapper .page-link:hover,
body.theme-dark .dataTables_wrapper .page-link:focus,
body.theme-dark .dataTables_wrapper .page-item.active .page-link {
    border-color: rgba(248, 156, 47, .78);
    background: rgba(248, 156, 47, .14);
    color: #ffd6a6;
}

body.theme-dark .dataTables_wrapper .page-item.active .page-link {
    border-color: rgba(248, 156, 47, .88);
    background: rgba(248, 156, 47, .18);
    color: #ffd089;
}

body.theme-dark .dataTables_wrapper .page-item.disabled .page-link,
body.theme-dark .dataTables_wrapper .page-link.disabled {
    border-color: rgba(54, 85, 74, .52);
    background: rgba(20, 45, 36, .46);
    color: rgba(155, 184, 170, .62);
    box-shadow: none;
    opacity: 1;
}

body.theme-dark .btn-primary {
    border-color: #f89c2f;
    background: #f89c2f;
    color: #081a14;
}

body.theme-dark .btn-primary:hover,
body.theme-dark .btn-primary:focus {
    border-color: #ffb45c;
    background: #ffb45c;
    color: #081a14;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
    border-color: rgba(248, 156, 47, .86);
    background: rgba(18, 42, 33, .96);
    color: var(--ink);
}

body.theme-dark .form-label,
body.theme-dark .table thead th,
body.theme-dark .settings-section-head h3,
body.theme-dark .rental-building-head h3,
body.theme-dark .rental-floor-head,
body.theme-dark .rental-room-number,
body.theme-dark .rental-room-person strong,
body.theme-dark .rental-empty-state h3 {
    color: #c3ded1;
}

body.theme-dark .settings-section,
body.theme-dark .settings-actions {
    border-color: rgba(54, 85, 74, .78);
}

body.theme-dark .settings-section-icon {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(20, 45, 36, .82);
    color: #ffb45c;
}

body.theme-dark .settings-section-head p,
body.theme-dark .settings-empty-preview,
body.theme-dark .rental-building-head p,
body.theme-dark .rental-floor-head small,
body.theme-dark .rental-room-person span,
body.theme-dark .rental-room-meta,
body.theme-dark .rental-empty-state {
    color: var(--muted);
}

body.theme-dark .settings-empty-preview i,
body.theme-dark .rental-floor-head i,
body.theme-dark .rental-room-meta i,
body.theme-dark .rental-empty-state > i {
    color: #72cba1;
}

body.theme-dark .settings-actions {
    background: rgba(11, 31, 24, .86);
}

body.theme-dark .rental-building-meter {
    background: rgba(54, 85, 74, .58);
}

body.theme-dark .rental-building-meter span {
    background: linear-gradient(90deg, #72cba1, #f89c2f);
}

body.theme-dark .rental-room-card:hover {
    border-color: rgba(248, 156, 47, .72);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

body.theme-dark .rental-room-occupied {
    border-color: rgba(114, 203, 161, .34);
    border-left-color: #72cba1;
    background:
        linear-gradient(135deg, rgba(26, 66, 50, .92), rgba(20, 45, 36, .8)),
        rgba(20, 45, 36, .82);
}

body.theme-dark .rental-room-available {
    border-color: rgba(248, 156, 47, .34);
    border-left-color: #f89c2f;
    background:
        linear-gradient(135deg, rgba(76, 52, 24, .9), rgba(20, 45, 36, .74)),
        rgba(20, 45, 36, .82);
}

body.theme-dark .rental-room-maintenance,
body.theme-dark .rental-room-reserved {
    border-left-color: #f89c2f;
}

body.theme-dark .rental-avatar-empty i {
    color: #72cba1;
}

body.theme-dark .rental-room-occupied .badge {
    border-color: rgba(114, 203, 161, .32);
    background: rgba(41, 112, 78, .46);
    color: #bff5d8;
}

body.theme-dark .rental-room-available .badge {
    border-color: rgba(248, 156, 47, .4);
    background: rgba(159, 94, 18, .48);
    color: #ffd089;
}

body.theme-dark .rental-room-available .rental-room-number,
body.theme-dark .rental-room-available .rental-room-person strong,
body.theme-dark .rental-room-available .rental-avatar-empty i,
body.theme-dark .rental-room-available .rental-room-meta i {
    color: #ffb45c;
}

body.theme-dark .rental-room-occupied .rental-avatar-empty i,
body.theme-dark .rental-room-occupied .rental-room-meta i {
    color: #72cba1;
}

@media (max-width: 1599.98px) {
    .rental-room-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1299.98px) {
    .rental-room-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

body.theme-dark .searchable-room-field > i,
body.theme-dark .searchable-room-clear {
    color: var(--muted);
}

body.theme-dark .searchable-room-trigger {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(20, 45, 36, .82);
    color: var(--ink);
}

body.theme-dark .searchable-room-trigger:hover,
body.theme-dark .searchable-room-trigger:focus,
body.theme-dark .searchable-room-trigger[aria-expanded="true"] {
    border-color: rgba(248, 156, 47, .78);
    background: rgba(20, 45, 36, .96);
}

body.theme-dark .searchable-room-trigger i {
    color: var(--muted);
}

body.theme-dark .searchable-room-popover {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(14, 34, 27, .98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
}

body.theme-dark .searchable-room-field {
    border-bottom-color: rgba(54, 85, 74, .72);
    background: rgba(14, 34, 27, .98);
}

body.theme-dark .searchable-room-option {
    border-bottom-color: rgba(54, 85, 74, .58);
    color: var(--ink);
}

body.theme-dark .searchable-room-option:hover,
body.theme-dark .searchable-room-option:focus,
body.theme-dark .searchable-room-option.active {
    background: #3168b8;
    color: #fff;
}

body.theme-dark .searchable-room-empty {
    color: var(--muted);
}

body.theme-dark .table {
    --bs-table-border-color: rgba(54, 85, 74, .78);
}

body.theme-dark .table thead th {
    background: rgba(20, 45, 36, .58);
}

body.theme-dark .badge-soft-success {
    color: #9be7b5;
    background: rgba(41, 112, 78, .36);
}

body.theme-dark .badge-soft-primary {
    color: #9edfc1;
    background: rgba(77, 118, 101, .42);
}

body.theme-dark .badge-soft-warning {
    color: #ffd089;
    background: rgba(159, 94, 18, .36);
}

body.theme-dark .badge-soft-danger {
    color: #ffb5aa;
    background: rgba(151, 55, 48, .34);
}

/* System polish layer */
.container-fluid > .d-flex {
    gap: 16px;
}

.page-title {
    line-height: 1.2;
}

.card {
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.payment-room-filter-card,
.payment-room-filter-card .card-body {
    overflow: visible;
}

.card.searchable-select-open-card,
.card.searchable-select-open-card .card-body {
    overflow: visible;
}

.modal-content.searchable-select-open-modal,
.modal-content.searchable-select-open-modal .modal-body {
    overflow: visible;
}

.modal-content.searchable-select-open-modal .modal-footer {
    position: relative;
    z-index: 1;
}

.card.searchable-select-open-card {
    padding-bottom: 0;
}

.card:hover {
    border-color: rgba(244, 155, 51, .42);
    box-shadow: 0 20px 48px rgba(18, 56, 47, .1);
}

.stat-card {
    min-height: 96px;
    padding: 1.15rem 1.25rem;
}

.stat-card .text-muted {
    color: #63786f !important;
    font-size: .94rem;
}

.stat-card .fs-2 {
    font-size: 1.8rem !important;
    line-height: 1.1;
}

.stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.75rem;
    filter: drop-shadow(0 10px 16px rgba(244, 155, 51, .18));
}

.btn:not(:disabled):not(.disabled):hover,
.sidebar .nav-link:hover,
.sidebar-group-toggle:hover,
.dataTables_wrapper .page-link:hover {
    transform: translateY(-1px);
}

.table {
    font-size: .96rem;
}

.table > :not(caption) > * > * {
    padding: .72rem .8rem;
    vertical-align: middle;
}

.table thead th {
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table tbody tr {
    transition: background .16s ease, box-shadow .16s ease;
}

.table tbody tr:hover > * {
    background: rgba(255, 248, 235, .72);
}

.table .col-number,
.table .col-money {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.table .col-status,
.table .col-actions {
    white-space: nowrap;
}

.table .col-actions {
    width: 1%;
}

.table.has-responsive-control > thead > tr > th.dtr-control-cell,
.table.has-responsive-control > tbody > tr > td.dtr-control-cell {
    width: 38px;
    min-width: 38px;
    padding-inline: .65rem;
    text-align: center;
}

table.dataTable.dtr-column > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control::before {
    position: static;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 1px solid rgba(207, 195, 166, .85);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #174b3f;
    box-shadow: none;
    content: "+";
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

table.dataTable.dtr-column > tbody > tr.parent > td.dtr-control::before,
table.dataTable.dtr-column > tbody > tr.parent > th.dtr-control::before {
    border-color: rgba(244, 155, 51, .85);
    background: rgba(244, 155, 51, .12);
    color: #925106;
    content: "-";
}

table.dataTable > tbody > tr.child ul.dtr-details {
    display: grid;
    gap: 8px;
    width: min(680px, 100%);
    margin: 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    display: grid;
    grid-template-columns: minmax(120px, .36fr) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(207, 195, 166, .5);
}

table.dataTable > tbody > tr.child span.dtr-title {
    color: var(--ink);
    font-weight: 700;
}

table.dataTable > tbody > tr.child span.dtr-data {
    min-width: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.responsive-child-table th {
    width: 34%;
    color: var(--ink);
    font-weight: 700;
}

.responsive-child-table td {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.table .col-actions .btn,
.table td.text-end .btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

.table td.migration-actions .btn {
    width: auto;
    min-width: 86px;
    padding-inline: .75rem;
}

.tenant-invoice-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.table .tenant-invoice-actions .btn-action-text,
.table td.text-end .tenant-invoice-actions .btn-action-text {
    width: auto;
    min-width: 78px;
    padding-inline: .75rem;
    gap: 6px;
}

.tenant-invoices-table .col-actions {
    min-width: 144px;
}

.table td.text-end form,
.table .col-actions form {
    margin-left: 4px;
}

.dataTables_wrapper .row:first-child {
    margin-bottom: 12px;
}

.dataTables_wrapper .row:last-child {
    margin-top: 12px;
}

.dataTables_wrapper .dataTables_info {
    color: var(--muted);
    padding-top: 0;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 220px;
}

.dataTables_empty,
.table-empty-state {
    padding: 2.8rem 1rem !important;
    color: var(--muted) !important;
    text-align: center !important;
}

.dataTables_empty::before,
.table-empty-state::before {
    content: "\f28a";
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border: 1px solid rgba(207, 195, 166, .8);
    border-radius: 999px;
    background: rgba(250, 244, 231, .82);
    color: var(--primary);
    font-family: "bootstrap-icons";
    font-size: 1.3rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .32rem;
    min-height: 28px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-soft-success {
    border-color: rgba(73, 151, 102, .2);
}

.badge-soft-primary {
    border-color: rgba(23, 75, 63, .18);
}

.badge-soft-warning {
    border-color: rgba(146, 81, 6, .2);
}

.badge-soft-danger {
    border-color: rgba(155, 44, 34, .18);
}

.modal-dialog {
    --bs-modal-padding: 1.1rem;
}

.modal-content {
    box-shadow: 0 24px 64px rgba(18, 56, 47, .18);
}

.modal-header,
.modal-footer {
    padding: .95rem 1.15rem;
}

.modal-body {
    padding: 1.15rem;
}

.modal .row.g-3 {
    --bs-gutter-x: .95rem;
    --bs-gutter-y: .95rem;
}

.modal textarea.form-control {
    min-height: 116px;
}

.modal .btn,
.modal-footer .btn {
    min-width: 88px;
}

body.theme-dark .card:hover {
    border-color: rgba(248, 156, 47, .42);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .22);
}

body.theme-dark .stat-card .text-muted,
body.theme-dark .dataTables_wrapper .dataTables_info,
body.theme-dark .dataTables_wrapper .dataTables_filter label,
body.theme-dark .dataTables_wrapper .dataTables_length label {
    color: var(--muted) !important;
}

body.theme-dark .table tbody tr:hover > * {
    background: rgba(28, 58, 46, .52);
}

body.theme-dark .dataTables_empty,
body.theme-dark .table-empty-state {
    color: var(--muted) !important;
}

body.theme-dark .dataTables_empty::before,
body.theme-dark .table-empty-state::before {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(20, 45, 36, .82);
    color: #72cba1;
}

body.theme-dark .dataTables_wrapper .dt-buttons .btn,
body.theme-dark .dataTables_wrapper .dt-button.btn {
    border-color: rgba(54, 85, 74, .86);
    background: rgba(20, 45, 36, .82);
    color: var(--ink);
}

body.theme-dark .dataTables_wrapper .dt-buttons .btn:hover,
body.theme-dark .dataTables_wrapper .dt-buttons .btn:focus,
body.theme-dark .dataTables_wrapper .dt-button.btn:hover,
body.theme-dark .dataTables_wrapper .dt-button.btn:focus {
    border-color: rgba(248, 156, 47, .78);
    background: rgba(248, 156, 47, .14);
    color: #ffd6a6;
}

body.theme-dark .dataTables_wrapper .dt-buttons .btn i,
body.theme-dark .dataTables_wrapper .dt-button.btn i {
    color: #ffb45c;
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
    background: rgba(8, 26, 20, .36);
}

@media (max-width: 1199.98px) {
    .login-panel {
        grid-template-columns: minmax(0, .9fr) minmax(360px, 1fr);
        min-height: 580px;
    }

    .login-panel-simple {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .sidebar {
        width: 232px;
        flex-basis: 232px;
        padding: 14px 10px;
    }

    .sidebar-collapse-toggle {
        left: 217px;
    }

    body.sidebar-collapsed .sidebar {
        width: 84px;
        flex-basis: 84px;
        padding-inline: 10px;
    }

    body.sidebar-collapsed .sidebar-collapse-toggle {
        left: 69px;
    }

    .sidebar .nav-link,
    .sidebar-group-toggle {
        padding: 10px;
    }

    .container-fluid {
        padding: 20px;
    }
}

@media (max-width: 991.98px) {
    .login-shell {
        align-items: start;
        padding: 18px;
    }

    .login-panel {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-form-wrap {
        padding: 24px;
    }

    .login-panel-simple .login-form-wrap {
        padding: 32px;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(300px, 86vw);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 20px 0 40px rgba(24, 24, 27, .16);
        overflow: hidden;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    body.sidebar-collapsed .sidebar {
        width: min(300px, 86vw);
        flex-basis: auto;
        padding: 14px 10px;
    }

    body.sidebar-collapsed .brand {
        justify-content: flex-start;
        padding: 8px 10px 18px;
    }

    body.sidebar-collapsed .brand-name,
    body.sidebar-collapsed .sidebar .nav-link span,
    body.sidebar-collapsed .sidebar-group-label span,
    body.sidebar-collapsed .sidebar-group-chevron,
    body.sidebar-collapsed .sidebar-user-meta {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    body.sidebar-collapsed .brand-name {
        display: -webkit-box;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body.sidebar-collapsed .sidebar-nav {
        align-items: stretch;
    }

    body.sidebar-collapsed .sidebar .nav-link,
    body.sidebar-collapsed .sidebar-group-toggle {
        justify-content: flex-start;
        width: 100%;
        min-height: 40px;
        padding: 10px;
    }

    body.sidebar-collapsed .sidebar-group-items {
        display: grid;
    }

    body.sidebar-collapsed .sidebar-group-items[hidden] {
        display: none;
    }

    body.sidebar-collapsed .sidebar-user {
        justify-content: flex-start;
        padding: 12px 10px 2px;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        background: rgba(24, 24, 27, .36);
        opacity: 0;
        transition: opacity .22s ease;
        z-index: 1030;
    }

    body.sidebar-open .sidebar-backdrop {
        pointer-events: auto;
        opacity: 1;
    }

    .sidebar-close,
    .menu-toggle {
        display: grid;
    }

    .main-panel {
        width: 100%;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1020;
        min-height: 64px;
        padding: 12px 16px;
    }

    .topbar .btn {
        white-space: nowrap;
    }

    .container-fluid {
        padding: 16px;
    }

    .app-footer {
        margin: 0 16px 18px;
    }

    .app-footer-main {
        flex-direction: column;
        gap: 12px;
    }

    .app-footer-meta {
        justify-content: flex-start;
        text-align: left;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .page-subtitle {
        font-size: .95rem;
    }

    .card-body {
        padding: 1rem;
    }

    .datatable,
    .card-body table.table:not(.invoice-table):not(.tenant-dashboard-table) {
        min-width: 720px;
    }

    .datatable.has-responsive-control,
    .card-body table.table.datatable.has-responsive-control:not(.invoice-table):not(.tenant-dashboard-table) {
        width: 100% !important;
        min-width: 0 !important;
    }

    .invoice-print .card-body {
        padding: 1.25rem !important;
    }

    .receipt-header,
    .receipt-brand {
        flex-direction: column;
    }

    .receipt-title-box {
        min-width: 0;
        width: 100%;
        flex-basis: auto;
        text-align: left;
    }

    .receipt-signature-row {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .dataTables_wrapper {
        overflow-x: auto;
    }

    .dataTables_wrapper.datatable-responsive-wrapper {
        overflow-x: visible;
    }

    .dataTables_wrapper .dataTables_filter {
        text-align: left;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_length label {
        width: 100%;
        justify-content: flex-start;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        max-width: 100%;
    }

    .dataTables_wrapper .dt-buttons {
        justify-content: flex-start;
    }

    .settings-section {
        padding: 18px;
    }

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

    .settings-preview-box-square {
        aspect-ratio: auto;
        min-height: 220px;
    }

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

    .rental-building-head {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 575.98px) {
    .login-shell {
        min-height: 100dvh;
        padding: 10px;
    }

    .login-panel {
        width: 100%;
        border-radius: 8px;
    }

    .login-logo {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .login-brand-name {
        font-size: 1.08rem;
    }

    .login-form-wrap {
        padding: 20px;
    }

    .login-panel-simple .login-form-wrap {
        padding: 22px;
    }

    .login-form-brand {
        align-items: flex-start;
        margin-bottom: 24px;
        padding-bottom: 18px;
    }

    .login-form-head {
        margin-bottom: 22px;
    }

    .login-form-head h2 {
        font-size: 1.35rem;
    }

    .login-form-head p,
    .login-footnote {
        font-size: .88rem;
    }

    .topbar {
        align-items: flex-start;
        gap: 10px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-actions > .btn,
    .topbar-actions > .topbar-icon-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .topbar-actions > .btn i {
        margin: 0;
    }

    .topbar .logout-text {
        display: none;
    }

    .container-fluid {
        padding: 12px;
    }

    .app-footer {
        margin: 0 12px 14px;
        padding: 14px;
    }

    .app-footer-meta {
        display: grid;
        gap: 8px;
    }

    .app-footer-meta span {
        max-width: 100%;
    }

    .container-fluid > .d-flex {
        align-items: stretch !important;
        flex-direction: column;
        gap: 12px;
    }

    .container-fluid > .d-flex .btn {
        width: 100%;
    }

    .stat-card {
        min-height: 96px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.55rem;
    }

    .card {
        box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
    }

    .form-label {
        margin-bottom: .35rem;
    }

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

    .profile-avatar-lg {
        width: 112px;
        height: 112px;
    }

    .btn {
        min-height: 40px;
    }

    .dataTables_wrapper .dt-buttons .btn,
    .dataTables_wrapper .dt-button.btn {
        flex: 1 1 calc(50% - 6px);
        padding-inline: .5rem;
    }

    .settings-section {
        padding: 16px;
        gap: 14px;
    }

    .settings-section-head {
        gap: 10px;
    }

    .settings-section-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .settings-upload-panel {
        padding: 12px;
    }

    .settings-preview-box {
        min-height: 180px;
    }

    .settings-actions {
        padding: 14px 16px;
    }

    .settings-actions .btn {
        width: 100%;
    }

    .rental-summary-grid,
    .rental-room-grid {
        grid-template-columns: 1fr;
    }

    .rental-building-card .card-body {
        padding: 16px;
    }

    .rental-room-card {
        min-height: 0;
    }

    .rental-room-top,
    .rental-room-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .rental-room-actions .btn {
        width: 100%;
    }

    .payment-room-chart-card .card-body {
        min-height: 330px;
    }

    .payment-room-chart-wrap {
        height: 250px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    .sidebar,
    .sidebar-collapse-toggle,
    .topbar,
    .app-footer,
    .btn,
    .no-print,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_info,
    .dataTables_paginate {
        display: none !important;
    }

    .main-panel,
    .container-fluid {
        padding: 0;
    }

    body {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body::before {
        display: none !important;
        content: none !important;
    }

    html,
    body,
    .main-panel,
    .container-fluid,
    .invoice-print,
    .invoice-print .card-body {
        background: #fff !important;
    }

    .card {
        border: 0;
        box-shadow: none;
        background: #fff !important;
    }

    .invoice-print {
        max-width: 100%;
        margin: 0;
    }

    .invoice-print .card-body {
        padding: 0 !important;
    }

    .receipt-document {
        width: 100%;
        max-width: none;
        color: #111827;
        background: #fff !important;
        border: 0;
    }

    .receipt-document hr {
        border-color: #cfc3a6;
        opacity: 1;
    }

    .receipt-header {
        display: flex;
        flex-direction: row !important;
        align-items: flex-start;
        justify-content: space-between;
        gap: 7mm;
    }

    .receipt-brand {
        flex: 1 1 105mm;
        flex-direction: row !important;
        gap: 5mm;
        min-width: 0;
    }

    .receipt-brand h2 {
        max-width: 100%;
        margin-bottom: 2mm !important;
        font-size: 17pt;
        line-height: 1.18;
        white-space: normal;
    }

    .receipt-logo {
        width: 20mm;
        height: 20mm;
        flex-basis: 20mm;
    }

    .receipt-title-box {
        flex: 0 0 54mm;
        min-width: 54mm;
        width: auto;
        text-align: center !important;
    }

    .receipt-title-box .badge {
        margin-inline: auto !important;
    }

    .receipt-no {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 9mm;
        padding-inline: 3mm;
        font-size: 8.5pt;
        line-height: 1.3;
        text-align: center;
        word-break: break-word;
    }

    .receipt-info-grid {
        grid-template-columns: 1fr .78fr;
        gap: 18mm;
        margin-bottom: 10mm;
    }

    .receipt-table {
        border-color: #d9cfb7;
        page-break-inside: avoid;
    }

    .receipt-table thead th,
    .receipt-table tfoot th {
        background: #faf4e7 !important;
    }

    .receipt-meta-grid,
    .receipt-signature-row {
        page-break-inside: avoid;
    }

    .receipt-signature-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18mm;
        margin-top: 24mm;
    }
}
