*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Palet dari logo: putih, oranye (ikon H), ungu (teks hello.vibe) */
    --bg: #ffffff;
    --surface: #f7f7f8;
    --surface-elevated: #ffffff;
    --text: #333333;
    --text-muted: #6b6b6b;
    --border: #e2e2e6;
    --primary: #ef9a0b;
    --primary-hover: #d98a0a;
    --accent: #4b3f72;
    --accent-light: #6b5f96;
    --accent-bg: rgba(75, 63, 114, 0.08);
    --accent-bg-strong: rgba(75, 63, 114, 0.14);
    --danger: #dc2626;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --touch-min: 44px;
    --page-padding: 1rem;
    --font-brand: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --sidebar-width: 260px;
    --topbar-height: 56px;
    --bottom-nav-height: 64px;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

/* Brand */
.brand-logo {
    display: block;
    width: 140px;
    height: auto;
    margin: 0 auto 1.25rem;
}

.brand-logo--sm {
    width: 100px;
    margin: 0;
}

.auth-brand {
    text-align: center;
    margin-bottom: 0.25rem;
}

/* Auth */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--page-padding);
    padding-top: max(var(--page-padding), env(safe-area-inset-top));
    padding-right: max(var(--page-padding), env(safe-area-inset-right));
    padding-bottom: max(var(--page-padding), env(safe-area-inset-bottom));
    padding-left: max(var(--page-padding), env(safe-area-inset-left));
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.auth-card .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--accent);
}

.form-group--fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1rem;
}

.form-group--fieldset legend {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--accent);
    padding: 0;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--touch-min);
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.radio-option input {
    width: 1rem;
    height: 1rem;
    min-height: auto;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.radio-option:has(input:focus-visible) {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form-group input:not([type="radio"]) {
    display: block;
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.input-password {
    position: relative;
}

.input-password input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(245, 166, 35, 0.08);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.password-toggle[aria-pressed="true"] {
    color: var(--primary);
}

.password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

.password-toggle .icon-eye-off[hidden],
.password-toggle .icon-eye[hidden] {
    display: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.form-group input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a.btn,
a.btn-primary,
a.btn-outline,
a.btn-ghost,
a.btn-ghost-danger {
    text-decoration: none;
}

a.btn:hover,
a.btn-primary:hover,
a.btn-outline:hover,
a.btn-ghost:hover,
a.btn-ghost-danger:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #000000;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(245, 166, 35, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn--inline {
    width: auto;
    margin-top: 0;
}

.btn-sm {
    min-height: 34px;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    width: auto;
    margin-top: 0;
    border-radius: var(--radius-sm);
}

.btn-ghost {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.07);
    color: var(--primary);
}

.btn-ghost-danger {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    border: 1px solid transparent;
}

.btn-ghost-danger:hover {
    background: rgba(248, 113, 113, 0.22);
    color: var(--danger);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    border: none;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.22);
}

.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    min-height: var(--touch-min);
}

.form-group textarea {
    min-height: 96px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.required {
    color: var(--danger);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.alert-list {
    margin: 0;
    padding-left: 1.25rem;
}

.alert-list li + li {
    margin-top: 0.25rem;
}

/* Page sections */
.page-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-toolbar--start {
    justify-content: flex-start;
}

.page-toolbar__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-toolbar__meta strong {
    color: var(--accent);
    font-weight: 600;
}

.page-toolbar__back {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.page-toolbar__back:hover {
    text-decoration: underline;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.1);
    color: var(--primary);
}

.empty-state__icon svg {
    width: 28px;
    height: 28px;
}

.empty-state__text {
    font-size: 0.9375rem;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.5;
}

/* Room cards */
.room-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.room-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.room-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.room-card--kosong {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.room-card--kosong:hover {
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

.room-card--reserved {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.room-card--reserved:hover {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.room-card--occupied {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
}

.room-card--occupied:hover {
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 4px 20px rgba(248, 113, 113, 0.15);
}

.room-card__top {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.room-card__head-main {
    flex: 1 1 auto;
    min-width: 0;
}

.room-card__number {
    font-family: var(--font-brand);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

.room-card__booking-id {
    margin-top: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.room-card__guest-label {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 100%;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: right;
    background: var(--accent-bg-strong);
    color: var(--accent);
}

.room-card__guest-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex: 0 0 auto;
    max-width: 55%;
    margin-left: auto;
    text-align: right;
}

.room-card__head > .badge {
    flex-shrink: 0;
    margin-left: auto;
}

.room-card__stay-dates {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: right;
    color: var(--primary);
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.2);
}

.room-card__meta {
    margin: 0;
    display: grid;
    gap: 0.25rem;
}

.room-card__meta-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.room-card__meta-row dt {
    flex: 0 0 4.5rem;
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.room-card__meta-row dd {
    margin: 0;
    color: var(--text);
}

.room-card__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.room-card__status-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.room-card__status-form label {
    flex: 0 0 4.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.room-card__status-select {
    flex: 1;
    min-height: 36px;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.room-card__status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.15);
}

.room-card__status-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: var(--surface-elevated);
}

.label-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.room-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.modal__title {
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.modal__message {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.modal__form .form-group:last-of-type {
    margin-bottom: 0.5rem;
}

.modal__hint {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-bottom: 1rem;
}

.modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.guest-search__field {
    position: relative;
}

.guest-search__field > input[type="text"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    color: var(--text);
}

.guest-search__field > input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 59, 130, 246), 0.15);
}

.guest-search__wa-input {
    margin-top: 0.5rem;
}

.guest-search__results {
    position: absolute;
    z-index: 10;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.guest-search__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.guest-search__option:hover,
.guest-search__option--active {
    background: rgba(0, 0, 0, 0.04);
}

.guest-search__option-name {
    font-weight: 500;
    color: var(--text);
}

.guest-search__option-wa {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.guest-search__option--add {
    justify-content: flex-start;
    color: var(--accent);
    font-weight: 500;
}

.guest-search__option-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 1.125rem;
    line-height: 1;
    flex-shrink: 0;
}

.guest-search__option-add-text {
    line-height: 1.3;
}

.form-row {
    display: grid;
    gap: 0.75rem;
}

.form-row--dates {
    grid-template-columns: 1fr 1fr;
}

.form-group--inline {
    margin-bottom: 0;
}

.form-group input[type="date"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    color: var(--text);
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 59, 130, 246), 0.15);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
}

.table-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.table-search__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-muted);
}

.table-search__input {
    display: block;
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.table-search__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.15);
}

.table-empty-filter {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-pagination__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.table-pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-pagination__pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.table-pagination__page {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.table-pagination__page:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.table-pagination__page--active {
    border-color: var(--primary);
    background: rgba(245, 166, 35, 0.12);
    color: var(--primary);
}

.table-pagination__page:focus-visible,
.table-pagination__controls .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.table-pagination__controls .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.data-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--accent-bg);
}

.data-table__row--current {
    background: var(--accent-bg);
}

.data-table__col-no {
    width: 3rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.data-table__muted {
    color: var(--text-muted);
}

.data-table__link {
    color: var(--primary);
    text-decoration: none;
}

.data-table__link:hover {
    text-decoration: underline;
}

.data-table__actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.375rem;
}

.data-table__actions > * {
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.btn-icon:hover {
    color: var(--accent);
    background: var(--accent-bg);
}

.btn-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.btn-ghost-danger.btn-icon:hover {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.22);
}

.guest-detail {
    display: grid;
    gap: 0.875rem;
}

.guest-detail__row {
    display: grid;
    gap: 0.25rem;
}

.guest-detail__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.guest-detail__value {
    font-size: 0.9375rem;
    color: var(--text);
}

.badge--developer {
    background: var(--accent-bg-strong);
    color: var(--accent);
}

.badge--owner {
    background: rgba(239, 154, 11, 0.15);
    color: var(--primary);
}

.badge--marketing {
    background: rgba(75, 63, 114, 0.12);
    color: var(--accent-light);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.badge--kosong {
    background: rgba(245, 166, 35, 0.15);
    color: var(--primary);
}

.badge--reserved {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.badge--occupied {
    background: var(--accent-bg-strong);
    color: var(--accent);
}

.badge--perawatan {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.inline-form {
    display: inline-flex;
}

/* Form panel */
.form-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 480px;
    box-shadow: var(--shadow-card);
}

.form-panel__title {
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.form-panel__section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-panel__subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.form-hint--section {
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-actions .btn-primary {
    margin-top: 0;
}

.form-actions .btn-ghost-danger {
    margin-top: 0;
}

/* Profile page */
.profile-page {
    max-width: 480px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.profile-header__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-header__info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.profile-header__name {
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

.profile-header__username {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
}

.profile-meta__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
}

.profile-meta__item dt {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.profile-meta__item dd {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.profile-logout-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.profile-logout-card__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.profile-logout-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-logout-card__btn svg {
    width: 18px;
    height: 18px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.alert {
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    word-break: break-word;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.alert-success {
    background: rgba(245, 166, 35, 0.1);
    color: var(--primary);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

/* App shell — mobile: bottom nav, desktop: sidebar */
body.has-app-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Sidebar — desktop only */
.app-sidebar {
    display: none;
    flex-direction: column;
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.app-sidebar__brand {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

.brand-logo--sidebar {
    width: 110px;
    margin: 0 auto;
}

.app-sidebar__nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.app-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.app-nav-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.app-nav-link__icon svg {
    width: 20px;
    height: 20px;
}

.app-nav-link:hover {
    background: var(--accent-bg);
    color: var(--accent);
}

.app-nav-link.is-active {
    background: var(--accent-bg-strong);
    color: var(--accent);
}

.app-nav-link.is-active .app-nav-link__icon {
    color: var(--accent);
}

.app-nav-link--logout {
    margin-top: 0.5rem;
    color: var(--accent-light);
}

.app-nav-link--logout:hover {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.08);
}

.logout-form {
    display: contents;
}

.logout-form button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    text-align: inherit;
    width: 100%;
}

.logout-form button.app-topbar__logout {
    width: auto;
}

.logout-form .profile-logout-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    text-align: center;
}

.logout-form .profile-logout-card__btn:hover {
    background: rgba(248, 113, 113, 0.22);
    color: var(--danger);
}

.app-sidebar__footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border);
}

.app-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    background: var(--surface-elevated);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

a.app-user-card:hover {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}

a.app-user-card.is-active {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.app-user-card__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.app-user-card__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.app-user-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-user-card__username {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main content area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 var(--page-padding);
    padding-top: env(safe-area-inset-top);
    background: var(--primary);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-topbar__title h1 {
    font-family: var(--font-brand);
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.app-topbar__logout {
    display: none;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: var(--radius);
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.app-topbar__logout svg {
    width: 20px;
    height: 20px;
}

.app-topbar__logout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.app-content {
    flex: 1;
    padding: var(--page-padding);
    padding-bottom: calc(var(--bottom-nav-height) + var(--page-padding) + env(safe-area-inset-bottom));
    min-width: 0;
}

/* Bottom navigation — mobile only */
.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: var(--accent);
    border-top: none;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 24px rgba(75, 63, 114, 0.35);
}

.app-bottom-nav__list {
    list-style: none;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: var(--bottom-nav-height);
    margin: 0;
    padding: 0;
}

.app-bottom-nav__list > li {
    flex: 1;
    min-width: 0;
    display: flex;
}

.app-bottom-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.25rem;
    padding: 0.375rem 0.25rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.app-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: inherit;
    transition: background 0.15s, color 0.15s;
}

.app-bottom-nav__icon svg {
    width: 22px;
    height: 22px;
}

.app-bottom-nav__link.is-active {
    color: var(--primary);
}

.app-bottom-nav__label {
    line-height: 1.2;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dashboard home content */
.dashboard-welcome {
    margin-bottom: 1.5rem;
}

.dashboard-welcome__greeting {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.dashboard-welcome__name {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.3;
    margin-bottom: 0.375rem;
}

.dashboard-welcome__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dashboard-welcome__meta strong {
    color: var(--accent-light);
    font-weight: 600;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    text-align: left;
}

.stat-card__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    color: var(--accent);
}

.stat-card__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.stat-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.stat-card__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    margin-bottom: 0;
}

.stat-card__value {
    display: block;
    flex-shrink: 0;
    font-family: var(--font-brand);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.dashboard-stats--rooms .stat-card__value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    font-size: 1.125rem;
    background: var(--accent-bg-strong);
}

.dashboard-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.dashboard-panel__title {
    font-family: var(--font-brand);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.dashboard-panel__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.dashboard-panel .btn-outline {
    margin-top: 1rem;
}

.dashboard-room-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-elevated);
}

.dashboard-room-list__item + .dashboard-room-list__item {
    border-top: 1px solid var(--border);
}

.dashboard-room-list__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
    min-height: var(--touch-min);
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dashboard-room-list__link:hover {
    background: var(--accent-bg);
}

.dashboard-room-list__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: var(--accent-bg);
}

.dashboard-room-list__room {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--accent);
    background: var(--accent-bg-strong);
    border-radius: 999px;
    white-space: nowrap;
}

.dashboard-room-list__guest {
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-room-list__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.dashboard-room-list__date {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-light);
    white-space: nowrap;
}

.dashboard-room-list__chevron {
    font-size: 1.125rem;
    line-height: 1;
    color: var(--text-muted);
    transition: color 0.15s ease, transform 0.15s ease;
}

.dashboard-room-list__link:hover .dashboard-room-list__chevron {
    color: var(--accent);
    transform: translateX(2px);
}

.dashboard-panel + .dashboard-panel {
    margin-top: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-min);
    padding: 0.625rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
}

.btn-outline:hover {
    background: var(--accent-bg);
    border-color: rgba(75, 63, 114, 0.35);
    color: var(--accent);
}

.btn-outline:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (min-width: 480px) {
    :root {
        --page-padding: 1.5rem;
    }

    .brand-logo {
        width: 160px;
    }

    .auth-card {
        padding: 2rem;
    }

    .auth-card .subtitle {
        margin-bottom: 1.75rem;
    }

    .dashboard-welcome__name {
        font-size: 1.75rem;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

    .stat-card__value {
        font-size: 1.5rem;
    }

    .dashboard-stats--rooms .stat-card__value {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

/* Desktop: sidebar layout */
@media (min-width: 768px) {
    .app-sidebar {
        display: flex;
    }

    .app-main {
        margin-left: var(--sidebar-width);
    }

    .app-bottom-nav {
        display: none;
    }

    .app-topbar__logout {
        display: none;
    }

    .app-content {
        padding: 1.5rem 2rem 2rem;
        max-width: 1080px;
        margin: 0 auto;
        width: 100%;
    }

    .app-topbar {
        padding-left: 2rem;
        padding-right: 2rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }

    .app-topbar__title h1 {
        font-size: 1.25rem;
        color: var(--accent);
    }

    .dashboard-stats {
        gap: 1rem;
    }

    .room-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Report */
.report-filters {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.period-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.period-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.period-pill:hover {
    border-color: var(--accent-light);
    color: var(--accent);
}

.period-pill--active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.period-pill--active:hover {
    color: #fff;
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.report-filters__custom {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.report-filters__custom--hidden {
    display: none;
}

.report-filters .form-row--dates {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.report-filters .form-row--dates .form-group {
    flex: 1 1 140px;
    margin-bottom: 0;
}

.dashboard-stats--rooms,
.dashboard-stats--report {
    grid-template-columns: 1fr;
    margin-bottom: 1rem;
}

.stat-card--kosong .stat-card__icon {
    background: rgba(245, 166, 35, 0.15);
    color: var(--primary);
}

.stat-card--kosong .stat-card__value {
    color: var(--primary);
    background: rgba(245, 166, 35, 0.2);
}

.stat-card--reserved .stat-card__icon {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.stat-card--reserved .stat-card__value {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.2);
}

.stat-card--occupied .stat-card__icon {
    background: var(--accent-bg-strong);
    color: var(--accent);
}

.stat-card--occupied .stat-card__value {
    color: var(--accent);
    background: var(--accent-bg-strong);
}

.stat-card--link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card--link:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(75, 63, 114, 0.12);
}

.stat-card--link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.data-table--report {
    min-width: 820px;
}

.data-table__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .dashboard-stats--rooms,
    .dashboard-stats--report {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-stats--report-owner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .data-table--report {
        min-width: 720px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
