    :root {
    --surface: #f7f9fb;
    --surface-dim: #d8dadc;
    --surface-bright: #f7f9fb;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f2f4f6;
    --surface-container: #eceef0;
    --surface-container-high: #e6e8ea;
    --surface-container-highest: #e0e3e5;
    --on-surface: #191c1e;
    --on-surface-variant: #45464d;
    --inverse-surface: #2d3133;
    --inverse-on-surface: #eff1f3;
    --outline: #76777d;
    --outline-variant: #c6c6cd;
    --surface-tint: #565e74;
    --primary: #0f172a;
    --on-primary: #ffffff;
    --primary-container: #131b2e;
    --secondary: #334155;
    --secondary-container: #d5e3fd;
    --on-secondary-container: #57657b;
    --tertiary: #3b82f6;
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --pending-bg: #dbeafe;
    --pending-text: #1d4ed8;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --background: #f8fafc;
    --border: #e2e8f0;
    --font-headline: 'Hanken Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-km: 'Khmer OS Battambang', 'Battambang', 'Noto Sans Khmer', sans-serif;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --shadow-ghost: 0 2px 4px rgba(15, 23, 42, 0.05);
    --page-x: 16px;
    --bottom-space: 92px;
    }

    * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    }

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

    body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--on-surface);
    overflow-x: hidden;
    }

    .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  direction: ltr;
  width: 1em;
  min-width: 1em;
  overflow: hidden;
  color: transparent;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.icons-ready .material-symbols-outlined {
  color: inherit;
}

    body.km,
    body.km * {
    font-family: var(--font-km);
    }

    body.km .mono,
    body.km .amount,
    body.km .invoice-id,
    body.km .data,
    body.km input,
    body.km select,
    body.km .summary-card strong,
    body.km .calc-row strong,
    body.km .calc-total > strong,
    body.km .bill-amount {
    font-family: var(--font-mono);
    }

    button,
    input,
    select {
    font: inherit;
    }

    button {
    border: 0;
    cursor: pointer;
    background: transparent;
    }

    select,
    input {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--on-surface);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }

    select:focus,
    input:focus {
    border-color: var(--tertiary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
    }

    input::placeholder {
    color: #94a3b8;
    }

    select {
    appearance: none;
    }

    .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    }

    .hidden {
    display: none !important;
    }

    .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: 56px;
    background: var(--surface-container-lowest);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--page-x);
    }

    .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    }

    .brand-icon {
    font-size: 26px;
    }

    .brand-name {
    font-family: var(--font-headline);
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    }

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

    .lang-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    background: var(--surface-container-low);
    border-radius: var(--radius-xl);
    }

    .lang-btn {
    padding: 5px 10px;
    border-radius: var(--radius-lg);
    color: var(--on-surface-variant);
    font-size: 12px;
    font-weight: 700;
    }

    .lang-btn.active {
    background: var(--primary);
    color: var(--on-primary);
    }

    .app-main {
    max-width: 448px;
    margin: 0 auto;
    min-height: calc(100dvh - 56px);
    }

    .page {
    display: none;
    padding: 12px var(--page-x) 32px;
    animation: fade-in 0.2s ease;
    }

    .page.active {
    display: block;
    }

    @keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
    }

    .home-wrap {
    min-height: calc(100dvh - 68px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0 32px;
    }

    .hero-art {
    position: relative;
    width: min(280px, 78vw);
    aspect-ratio: 1;
    margin: 0 auto 28px;
    }

    .hero-glow {
    position: absolute;
    inset: 2%;
    background: var(--secondary-container);
    opacity: 0.35;
    filter: blur(34px);
    border-radius: 999px;
    }

    .hero-circle {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-ghost);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    }

    .building-card {
    width: 128px;
    min-height: 128px;
    background: var(--primary);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    }

    .building-icon {
    font-size: 50px;
    }

    .mini-building {
    display: grid;
    grid-template-columns: repeat(4, 10px);
    gap: 6px;
    }

    .mini-building span {
    height: 10px;
    border-radius: 2px;
    background: rgba(255,255,255,0.8);
    }

    .home-copy {
    text-align: center;
    margin-bottom: 28px;
    }

    .home-copy h1 {
    font-family: var(--font-headline);
    font-size: 28px;
    line-height: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    }

    .home-copy p {
    max-width: 340px;
    margin: 8px auto 0;
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 21px;
    }

    .home-actions,
    .manager-login-block {
    width: 100%;
    }

    .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    font-weight: 700;
    transition: transform 0.12s ease, opacity 0.16s ease, background 0.16s ease;
    }

    .btn:active {
    transform: scale(0.98);
    }

    .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    }

    .btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: var(--shadow-ghost);
    }

    .btn-secondary {
    width: 100%;
    color: var(--secondary);
    border: 1px solid var(--border);
    background: #fff;
    }

    .btn-danger {
    color: var(--error);
    border: 1px solid rgba(186, 26, 26, 0.2);
    background: rgba(255, 218, 214, 0.35);
    }

    .btn-large {
    min-height: 58px;
    border-radius: var(--radius-xl);
    font-family: var(--font-headline);
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    }

    .verify-card {
    margin-top: 12px;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-ghost);
    display: grid;
    gap: 16px;
    }

    .field-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 18px;
    }

    .field-group label {
    margin-left: 2px;
    color: var(--on-surface-variant);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    }

    body.km .field-group label,
    body.km .eyebrow,
    body.km .invoice-label,
    body.km .table-head,
    body.km .divider-label p,
    body.km .summary-card p {
    text-transform: none;
    letter-spacing: 0;
    }

    .select-wrap,
    .input-wrap {
    position: relative;
    }

    .select-wrap span,
    .input-wrap span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--outline);
    pointer-events: none;
    }

    .input-wrap input {
    padding-right: 44px;
    }

    .currency-input input {
    padding-right: 58px;
    }

    .currency-input span {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    }

    .divider-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 12px;
    }

    .divider-label span {
    flex: 1;
    height: 1px;
    background: var(--border);
    }

    .divider-label p {
    color: var(--outline);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    }

    .manager-login-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface-container-low);
    color: var(--on-surface);
    text-align: left;
    }

    .manager-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-ghost);
    }

    .manager-text {
    display: grid;
    gap: 2px;
    }

    .manager-text strong {
    font-family: var(--font-headline);
    font-size: 16px;
    font-weight: 700;
    }

    .manager-text small {
    color: var(--on-surface-variant);
    font-size: 12px;
    }

    .chevron {
    margin-left: auto;
    color: var(--outline);
    }

    .screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-top: 4px;
    }

    .compact-header {
    margin-bottom: 0;
    }

    .admin-header {
    justify-content: space-between;
    }

    .icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    }

    .eyebrow {
    color: var(--on-secondary-container);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    }

    .screen-header h2 {
    font-family: var(--font-headline);
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    color: var(--primary);
    }

    .invoice-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ghost);
    overflow: hidden;
    }

    .invoice-top {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(242, 244, 246, 0.45);
    }

    .invoice-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    }

    .invoice-label {
    color: var(--outline);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    }

    .invoice-id,
    .data {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    color: var(--primary);
    }

    .status-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    }

    .status-issued,
    .status-pending {
    background: var(--pending-bg);
    color: var(--pending-text);
    }

    .status-paid {
    background: var(--success-bg);
    color: var(--success-text);
    }

    .status-overdue {
    background: var(--error-container);
    color: var(--error);
    }

    .invoice-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    }

    .invoice-meta-grid .right {
    text-align: right;
    }

    .invoice-meta-grid strong {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    line-height: 20px;
    }

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

    .invoice-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    }

    .invoice-table th {
    padding: 9px 16px;
    color: var(--outline);
    font-size: 11px;
    line-height: 16px;
    font-weight: 800;
    text-transform: uppercase;
    }

    .invoice-table th:first-child,
    .invoice-table td:first-child {
    text-align: left;
    }

    .invoice-table th:last-child,
    .invoice-table td:last-child {
    text-align: right;
    }

    .invoice-table tbody tr {
    border-bottom: 1px solid var(--border);
    }

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

    .invoice-table td {
    padding: 13px 16px;
    vertical-align: top;
    }

    .invoice-table .desc {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--primary);
    }

    .invoice-table .note {
    margin-top: 2px;
    color: var(--outline);
    font-size: 10px;
    line-height: 14px;
    font-style: italic;
    }

    .invoice-table .amount {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    color: var(--primary);
    }

    .invoice-table .sub-amount {
    display: block;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 14px;
    color: var(--outline);
    }

    .invoice-total-box {
    padding: 16px;
    background: #f8fafc;
    border-top: 2px solid var(--primary);
    }

    .invoice-total-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    }

    .invoice-total-row span {
    font-size: 14px;
    line-height: 20px;
    font-weight: 800;
    color: var(--primary);
    }

    .invoice-total-row strong {
    font-family: var(--font-headline);
    font-size: 20px;
    line-height: 28px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--primary);
    text-align: right;
    }

    .invoice-total-usd {
    display: block;
    margin-top: 2px;
    text-align: right;
    color: var(--on-surface-variant);
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    }

    .invoice-actions {
    padding: 16px;
    background: #fff;
    }

    .info-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    }

    .info-card {
    border: 1px solid var(--border);
    background: var(--surface-container-low);
    border-radius: var(--radius-lg);
    padding: 14px;
    }

    .info-card p {
    color: var(--outline);
    font-size: 11px;
    line-height: 16px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 6px;
    }

    .info-card strong {
    font-family: var(--font-mono);
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    }

    .info-card small {
    color: var(--outline);
    font-size: 11px;
    font-weight: 700;
    }

    .qr-placeholder {
    margin-top: 12px;
    border: 1px dashed var(--outline-variant);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    }

    .qr-box {
    width: 128px;
    height: 128px;
    border-radius: var(--radius-lg);
    background: #f1f5f9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    }

    .qr-box span {
    font-size: 74px;
    }

    .qr-placeholder p {
    color: var(--outline);
    font-size: 11px;
    line-height: 16px;
    font-weight: 800;
    text-transform: uppercase;
    }

    .empty-state,
    .loading-state {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 18px;
    text-align: center;
    color: var(--on-surface-variant);
    }

    .empty-state span,
    .loading-state span {
    display: block;
    color: var(--outline);
    font-size: 42px;
    margin-bottom: 10px;
    }

    .loading-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .history-list,
    .recent-list,
    .room-settings-list {
    display: grid;
    gap: 10px;
    }

    .bill-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--border);
    border-left: 4px solid var(--tertiary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ghost);
    color: var(--on-surface);
    text-align: left;
    }

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

    .bill-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-lg);
    background: var(--surface-container-low);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
    flex-shrink: 0;
    }

    .bill-title {
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
    color: var(--primary);
    }

    .bill-meta {
    margin-top: 2px;
    color: var(--on-surface-variant);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    }

    .bill-right {
    text-align: right;
    flex-shrink: 0;
    }

    .bill-amount {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 18px;
    font-weight: 800;
    color: var(--primary);
    }

    .bill-subamount {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--outline);
    }

    .bill-delete {
    margin-top: 5px;
    color: var(--error);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 800;
    }

    .pin-wrap {
    min-height: calc(100dvh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 32px;
    }

    .pin-lock {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: var(--primary-container);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    }

    .pin-lock span {
    font-size: 32px;
    }

    .pin-wrap h2 {
    font-family: var(--font-headline);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    }

    .pin-wrap p {
    margin-top: 6px;
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    }

    .pin-dots {
    display: flex;
    gap: 22px;
    margin: 34px 0 32px;
    }

    .pin-dots span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid var(--outline);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    }

    .pin-dots span.filled {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.18);
    }

    .pin-dots.error span {
    background: var(--error);
    border-color: var(--error);
    }

    .pin-dots.shake {
    animation: shake 0.4s ease;
    }

    @keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
    }

    .keypad {
    width: 100%;
    max-width: 320px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    }

    .keypad button {
    height: 64px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface-container-low);
    color: var(--on-surface);
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.12s ease, background 0.12s ease;
    }

    .keypad button:active {
    transform: scale(0.94);
    background: var(--surface-container);
    }

    .keypad .keypad-soft,
    .keypad .keypad-danger {
    background: transparent;
    border-color: transparent;
    }

    .keypad .keypad-danger {
    color: var(--error);
    }

    .pin-error {
    min-height: 20px;
    color: var(--error) !important;
    font-weight: 700;
    margin-top: 14px !important;
    }

    .secure-note {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(69,70,77,0.64);
    font-size: 11px;
    font-weight: 700;
    }

    .secure-note span {
    font-size: 16px;
    }

    .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    }

    .summary-card {
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-ghost);
    padding: 16px;
    }

    .summary-card p {
    color: var(--on-surface-variant);
    font-size: 11px;
    line-height: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    }

    .summary-card div:not(.progress) {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 4px;
    }

    .summary-card strong {
    font-family: var(--font-headline);
    font-size: 26px;
    line-height: 32px;
    font-weight: 800;
    color: var(--primary);
    }

    .summary-card span:not(.progress span) {
    color: var(--on-surface-variant);
    font-size: 14px;
    }

    .progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: var(--surface-container);
    border-radius: 999px;
    margin-top: 12px;
    }

    .progress span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    }

    .module-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-ghost);
    margin-bottom: 24px;
    }

    .module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    background: var(--surface-container-low);
    border-bottom: 1px solid var(--border);
    }

    .module-header h3,
    .section-head-row h3 {
    font-family: var(--font-headline);
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    color: var(--primary);
    }

    .module-header span {
    color: var(--primary);
    }

    .module-body {
    padding: 16px;
    display: grid;
    gap: 16px;
    }

    .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    }

    .calc-preview {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--secondary-container);
    background: rgba(213, 227, 253, 0.34);
    }

    .calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--on-secondary-container);
    font-size: 14px;
    }

    .calc-row strong {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 12px;
    text-align: right;
    }

    .calc-total {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    }

    .calc-total div strong {
    display: block;
    font-family: var(--font-headline);
    font-size: 20px;
    line-height: 26px;
    color: var(--primary);
    }

    .calc-total small {
    display: block;
    color: var(--on-surface-variant);
    margin-top: 2px;
    }

    .calc-total > strong {
    font-family: var(--font-headline);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    text-align: right;
    }

    .section-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 12px;
    }

    .section-head-row.topless {
    margin-top: 4px;
    }

    .link-btn {
    color: var(--on-surface-variant);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    }

    .admin-tab {
    display: none;
    padding-bottom: var(--bottom-space);
    }

    .admin-tab.active {
    display: block;
    }

    .setting-grid {
    display: grid;
    gap: 14px;
    }

    .room-setting-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ghost);
    padding: 14px;
    display: grid;
    gap: 12px;
    }

    .room-setting-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    }

    .room-setting-title strong {
    font-family: var(--font-headline);
    color: var(--primary);
    }

    .room-setting-title small {
    color: var(--on-surface-variant);
    font-family: var(--font-mono);
    }

    .room-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
    }

    .room-editor-card {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 24px;
    }

    .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    }

    .room-editor-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    }

    .room-editor-id {
    font-size: 14px;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    }

    .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: 66px;
    background: var(--surface-container-lowest);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.03);
    }

    .bottom-nav > button {
    width: 33.333%;
    max-width: 148px;
    color: var(--on-surface-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: transform 0.12s ease, color 0.12s ease, background 0.12s ease;
    }

    .bottom-nav > button:active {
    transform: scale(0.95);
    }

    .bottom-nav > button.active span {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    }

    .bottom-nav > button span {
    padding: 4px 14px;
    border-radius: 999px;
    }

    .bottom-nav small {
    font-size: 11px;
    font-weight: 800;
    }

    .toast {
    position: fixed;
    left: 50%;
    bottom: 82px;
    z-index: 100;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    min-width: 180px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--inverse-surface);
    color: var(--inverse-on-surface);
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
    }

    .toast.success {
    background: #064e3b;
    color: #ecfdf5;
    }

    .toast.error {
    background: #7f1d1d;
    color: #fee2e2;
    }

    @media (max-width: 360px) {
    :root { --page-x: 12px; }
    .two-col { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .brand-name { font-size: 21px; }
    .lang-btn { padding-inline: 8px; }
    .invoice-total-row { display: block; }
    .invoice-total-row strong,
    .invoice-total-usd { text-align: left; }
    }

    .loading-state {
    padding: 28px 16px;
    text-align: center;
    color: var(--on-surface-variant);
    font-size: 14px;
    }

    .loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--outline-variant);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
    to {
        transform: rotate(360deg);
    }
    }

    .loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay.hidden {
  display: none !important;
}

.loading-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.loading-box p {
  margin-top: 10px;
  font-size: 14px;
  color: #475569;
  font-weight: 700;
}

    .loading-spinner {
    width: 36px;
    height: 36px;

    border: 4px solid #E2E8F0;
    border-top: 4px solid #0F172A;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
    to {
        transform: rotate(360deg);
    }
    }

    .premium-loading {
    padding: 16px;
    }

    .skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    }

    .skeleton-card,
    .skeleton-panel,
    .skeleton-line,
    .skeleton-pill {
    background: linear-gradient(
        90deg,
        #eef2f7 25%,
        #f8fafc 50%,
        #eef2f7 75%
    );
    background-size: 200% 100%;
    animation: skeletonMove 1.2s ease-in-out infinite;
    }

    .skeleton-card {
    height: 110px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    }

    .skeleton-panel {
    height: 260px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    }

    .skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    }

    .skeleton-pill {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    }

    .skeleton-lines {
    flex: 1;
    }

    .skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    }

    .skeleton-line.short {
    width: 45%;
    }

    .skeleton-line.medium {
    width: 70%;
    }

    .skeleton-line.long {
    width: 100%;
    }

    .skeleton-title {
    width: 140px;
    height: 18px;
    border-radius: 4px;
    margin-bottom: 14px;
    }

    @keyframes skeletonMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
    }

.gap-sm {
  height: 14px;
}

.danger-box {
  border: 1px solid rgba(186, 26, 26, 0.2);
  background: rgba(255, 218, 214, 0.35);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.danger-box p {
  color: var(--error);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.app-footer {
  text-align: center;
  padding: 24px 16px 32px;
  border-top: 1px solid #E2E8F0;
  margin-top: 32px;
}

.footer-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}

.footer-subtitle {
  font-size: 12px;
  color: #94A3B8;
}

.settings-home {
  display: grid;
  gap: 12px;
}

.settings-tile {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ghost);
  text-align: left;
  color: var(--on-surface);
}

.settings-tile:active {
  transform: scale(0.985);
}

.settings-tile-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  background: var(--surface-container-low);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-tile strong {
  display: block;
  font-family: var(--font-headline);
  font-size: 17px;
  color: var(--primary);
  margin-bottom: 2px;
}

.settings-tile p {
  font-size: 12px;
  line-height: 18px;
  color: var(--on-surface-variant);
}

.tile-arrow {
  color: var(--outline);
}

.settings-panel {
  margin-top: 16px;
}

.settings-panel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ghost);
  padding: 16px;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-panel-header h3 {
  font-family: var(--font-headline);
  font-size: 20px;
  color: var(--primary);
}

.settings-panel-header p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--on-surface-variant);
}

.invoice-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.invoice-switch button {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--on-surface-variant);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-ghost);
}

.invoice-switch button.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
} 

.brand-logo-text {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  overflow: hidden;
}

.brand-rynx {
  height: 38px;
  width: auto;
  display: block;
}

.brand-rent {
  font-family: "Rubik", sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  background: linear-gradient(135deg, #7C3CFF 0%, #18C8FF 100%);
  -webkit-text-fill-color: transparent;
}