:root {
    --font-ui: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
    --font-heading: "Sora", "Plus Jakarta Sans", "Segoe UI", sans-serif;

    --bg-page: #eef3f8;
    --bg-surface: #ffffff;
    --bg-surface-soft: #f7fafc;
    --bg-elevated: #f2f7fb;

    --bg-nav: #0e1f36;
    --bg-nav-alt: #132b49;

    --text-main: #0e223a;
    --text-subtle: #4f6278;
    --text-soft: #52657a;
    --text-inverse: #edf4ff;

    --line: #d7e2ee;
    --line-strong: #bdccdd;

    --brand: #087f92;
    --brand-strong: #066273;
    --brand-soft: #def4f8;
    --brand-ink: #0a3951;

    --ok: #1f946d;
    --warn: #b27614;
    --danger: #b43c4b;
    --info: #1d61ac;

    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;

    --shadow-xs: 0 2px 8px rgba(14, 34, 58, 0.06);
    --shadow-sm: 0 10px 26px rgba(14, 34, 58, 0.09);
    --shadow-md: 0 18px 40px rgba(14, 34, 58, 0.12);
    --shadow-lg: 0 28px 64px rgba(14, 34, 58, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--text-main);
    line-height: 1.5;
    background:
        radial-gradient(circle at 100% 0%, rgba(8, 127, 146, 0.12), transparent 34%),
        radial-gradient(circle at 0% 100%, rgba(19, 43, 73, 0.1), transparent 40%),
        var(--bg-page);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: -0.015em;
}

a {
    color: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.nav-panel {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow: auto;
    padding: 24px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-inverse);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 48%),
        linear-gradient(180deg, var(--bg-nav) 0%, var(--bg-nav-alt) 100%);
}

.brand {
    border-radius: var(--radius-md);
    padding: 15px 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fbff;
}

.brand-subtitle {
    margin-top: 4px;
    color: #b6c7da;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 700;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-title {
    margin: 10px 10px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9eb2c9;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.nav-group {
    display: grid;
    gap: 3px;
}

.nav-group-title {
    margin: 4px 10px 2px;
    color: #c7d6e7;
    font-size: 0.72rem;
    font-weight: 780;
}

.nav-link {
    display: block;
    border-radius: 8px;
    padding: 9px 11px;
    text-decoration: none;
    color: #dde9f8;
    font-size: 0.92rem;
    font-weight: 560;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(1px);
}

.nav-link.active {
    background:
        linear-gradient(95deg, rgba(67, 194, 214, 0.34), rgba(67, 194, 214, 0.16));
    border: 1px solid rgba(150, 234, 244, 0.3);
    color: #ffffff;
}

.nav-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-panel {
    min-width: 0;
    padding: 28px;
}

.auth-stage {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    padding: 16px;
}

.auth-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.auth-stage-header .brand {
    background: rgba(255, 255, 255, 0.86);
    border-color: #c9d8e8;
    box-shadow: var(--shadow-xs);
}

.auth-stage-header .brand-title {
    color: var(--text-main);
}

.auth-stage-header .brand-subtitle {
    color: #3f5872;
}

.auth-stage-header .language-label {
    color: #39536e;
}

.auth-stage-header .ghost-btn {
    color: var(--brand-ink);
    background: rgba(255, 255, 255, 0.78);
    border-color: #a9bdcf;
}

.auth-stage-header .ghost-btn:hover {
    background: #ffffff;
    border-color: #7890a7;
}

.auth-stage-content {
    display: grid;
    align-items: center;
}

.page-header {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-header > div {
    min-width: 0;
}

.pms-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.page-header h1,
h1 {
    font-size: clamp(1.4rem, 2.1vw, 1.92rem);
    color: var(--text-main);
}

.grid {
    display: grid;
    gap: 16px;
}

.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.data-card,
.state-card,
.auth-card,
.metric-card,
.detail-item,
.modal-card,
.notfound-wrap {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
    box-shadow: var(--shadow-sm);
}

.data-card,
.state-card {
    padding: 16px;
    margin-bottom: 14px;
}

.state-card {
    background: linear-gradient(180deg, #f6fbff 0%, #f1f8ff 100%);
    border-color: #cfe0f3;
}

.state-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
    font-weight: 700;
}

.operator-page {
    display: grid;
    gap: 16px;
}

.operator-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-xs);
}

.operator-panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: var(--shadow-xs);
}

.operator-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.operator-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 760;
}

.operator-panel-body {
    padding: 16px;
}

.operator-status-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.operator-status-item {
    min-width: 0;
    border: 1px solid #dbe5ef;
    border-radius: 9px;
    background: #f8fbfd;
    padding: 10px;
}

.operator-status-item span {
    display: block;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.operator-status-item strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.operator-empty {
    border: 1px dashed #b8c8d9;
    border-radius: 10px;
    background: #f8fbfd;
    padding: 18px;
    text-align: center;
}

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

.operator-form-grid .form-field {
    min-width: 0;
}

.operator-form-grid .wide {
    grid-column: 1 / -1;
}

.muted {
    margin: 0;
    color: var(--text-subtle);
    font-size: 0.9rem;
}

.field-help {
    margin: -2px 0 0;
    color: var(--text-subtle);
    font-size: 0.78rem;
}

.table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:has(> :nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-row:has(> :nth-child(4)) {
    grid-template-columns: 1.1fr 1fr 1fr 0.8fr;
}

.table-row:has(> :nth-child(5)) {
    grid-template-columns: 1.1fr 1fr 1fr 0.7fr 1.2fr;
}

.table-row:has(> :nth-child(6)) {
    grid-template-columns: 1.2fr 1fr 1fr 0.65fr 1.3fr auto;
}

.table-row.pms-reservation-row {
    grid-template-columns: minmax(130px, 0.9fr) minmax(150px, 1fr) minmax(190px, 1.05fr) minmax(90px, 0.65fr) minmax(110px, 0.75fr) minmax(110px, 0.9fr) minmax(270px, auto);
}

.table-row.accounting-log-row {
    grid-template-columns: minmax(150px, 0.8fr) minmax(110px, 0.6fr) minmax(160px, 1fr) minmax(220px, 1.4fr) minmax(120px, auto);
}

.table-header {
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--text-soft);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.inline-link {
    color: var(--brand-ink);
    text-decoration: none;
    font-weight: 620;
}

.inline-link:hover {
    text-decoration: underline;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.form-field {
    min-width: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.76rem;
    color: #40566d;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--bg-surface);
    color: var(--text-main);
    font: inherit;
    font-size: 0.95rem;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.form-input:hover,
.form-textarea:hover {
    background: #fcfeff;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(8, 127, 146, 0.16);
}

.form-textarea {
    min-height: 130px;
    resize: vertical;
}

.accounting-preview {
    margin-top: 14px;
    min-height: 220px;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
    font-size: 0.84rem;
}

.checkbox {
    flex-direction: row;
    align-items: center;
    min-width: auto;
    gap: 8px;
}

.form-checkbox {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 660;
    line-height: 1;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(140deg, #0c9ab0 0%, #087f92 42%, #066273 100%);
    box-shadow: 0 9px 18px rgba(6, 98, 115, 0.28);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px rgba(6, 98, 115, 0.33);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: var(--brand-soft);
    color: var(--brand-ink);
    border-color: #b7dbe2;
}

.secondary-btn:hover {
    background: #d4eef4;
}

.ghost-btn {
    color: #dce8f8;
    background: transparent;
    border-color: rgba(220, 232, 248, 0.38);
    white-space: nowrap;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.11);
}

.content-panel .ghost-btn {
    color: var(--brand-ink);
    border-color: #b7d2db;
    background: #f8fcff;
}

.content-panel .ghost-btn:hover {
    background: #eaf5fb;
}

.auth-actions {
    margin-top: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-link {
    color: #0a3951;
    font-size: 0.9rem;
}

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.language-switcher .ghost-btn {
    min-height: 34px;
    font-size: 0.81rem;
    padding: 8px 10px;
}

.language-label {
    font-size: 0.69rem;
    color: #a6bbd2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.metric-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.pms-summary-grid {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.pms-section-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(247, 250, 252, 0.94);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-xs);
}

.pms-section-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 8px 11px;
    color: var(--brand-ink);
    background: #ffffff;
    border: 1px solid #c9dce8;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
}

.pms-section-nav a:hover {
    background: #eaf5fb;
}

.housekeeping-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-xs);
}

.housekeeping-toolbar .primary-btn,
.housekeeping-toolbar .secondary-btn {
    flex: 0 0 auto;
    min-height: 42px;
}

.housekeeping-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.housekeeping-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.checkbox-line {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.dashboard-grid {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.metric-spotlight {
    grid-column: span 2;
    background:
        radial-gradient(circle at 100% 0%, rgba(8, 127, 146, 0.14), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, #eff8fa 100%);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
}

.dashboard-donut-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.dashboard-donut {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.dashboard-donut-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: var(--shadow-xs);
}

.dashboard-donut-inner span {
    font-size: 1.45rem;
    font-weight: 760;
    color: var(--brand-ink);
    line-height: 1;
}

.dashboard-donut-inner small {
    margin-top: 2px;
    color: var(--text-subtle);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dashboard-legend {
    display: grid;
    gap: 8px;
}

.dashboard-legend-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d7e2ee;
    background: #f9fcff;
}

.dashboard-legend-label {
    color: var(--text-main);
    font-weight: 620;
}

.dashboard-legend-value {
    color: var(--brand-ink);
    font-weight: 760;
}

.metric-card {
    padding: 14px;
    background: linear-gradient(180deg, #fafdff 0%, #f4f9fd 100%);
}

.metric-label {
    font-size: 0.7rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 700;
}

.metric-value {
    margin-top: 6px;
    color: var(--brand-ink);
    font-size: 1.38rem;
    font-weight: 750;
}

.status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.email-status-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.email-status-grid {
    justify-content: flex-end;
    margin-bottom: 0;
}

.status-badge {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.71rem;
    font-weight: 720;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-badge.info {
    color: var(--info);
    background: #e9f2ff;
}

.status-badge.success {
    color: var(--ok);
    background: #e8f8f1;
}

.status-badge.warning {
    color: var(--warn);
    background: #fff6e4;
}

.status-badge.danger {
    color: var(--danger);
    background: #ffedf0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.detail-item {
    background: var(--bg-surface-soft);
    padding: 12px;
}

.detail-label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 700;
}

.detail-value {
    margin-top: 4px;
    font-weight: 700;
}

.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button-row,
.portal-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mobile-only {
    display: none !important;
}

.mobile-card-list {
    display: grid;
    gap: 12px;
}

.mobile-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-xs);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.mobile-card h2 {
    font-size: 1rem;
    line-height: 1.25;
}

.mobile-facts {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mobile-facts div {
    border-radius: 10px;
    border: 1px solid #d7e2ee;
    background: #f8fbfd;
    padding: 8px;
    min-width: 0;
}

.mobile-facts span {
    display: block;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.mobile-facts strong {
    display: block;
    margin-top: 2px;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.mobile-action-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
}

.mobile-action-grid .primary-btn,
.mobile-action-grid .secondary-btn,
.mobile-action-grid .ghost-btn {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.portal-action-links {
    margin-top: 8px;
}

.portal-action-links .secondary-btn {
    min-height: 34px;
    padding: 8px 10px;
    text-decoration: none;
}

button:disabled,
.primary-btn:disabled,
.secondary-btn:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
    box-shadow: none;
}

.auth-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(370px, 530px);
    gap: 22px;
    align-items: stretch;
}

.auth-shell-single {
    max-width: 620px;
    grid-template-columns: 1fr;
}

.auth-hero,
.auth-panel {
    border-radius: var(--radius-lg);
    border: 1px solid #cbdced;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.auth-hero {
    color: #e8f3ff;
    padding: 34px;
    display: grid;
    gap: 14px;
    background:
        radial-gradient(circle at 0% 0%, rgba(120, 214, 235, 0.34), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(30, 106, 178, 0.42), transparent 50%),
        linear-gradient(155deg, #0f2c4b 0%, #17436f 52%, #0f304f 100%);
}

.auth-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #c7d9eb;
    font-weight: 760;
}

.auth-hero h2 {
    margin: 0;
    font-size: clamp(1.48rem, 2.8vw, 2.06rem);
    color: #f4f8ff;
}

.auth-hero p {
    margin: 0;
    color: #e5eef8;
}

.auth-benefits {
    margin: 6px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 9px;
    color: #edf5ff;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.inline-link:focus-visible,
.form-input:focus-visible,
.form-textarea:focus-visible,
.form-checkbox:focus-visible {
    outline: 3px solid #0b7285;
    outline-offset: 3px;
}

.auth-panel {
    padding: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
    display: grid;
    align-content: start;
    gap: 12px;
}

.setup-card {
    width: min(760px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px;
    display: grid;
    gap: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

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

.setup-card .form-field {
    min-width: 0;
}

.setup-card .auth-actions {
    margin-top: 6px;
    justify-content: flex-end;
}

.setup-card .state-title {
    font-size: 1.28rem;
}

.setup-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.setup-step {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #cbdced;
    background: #f6f9fc;
    color: #40566d;
    font-size: 0.78rem;
    font-weight: 760;
    text-align: center;
}

.setup-step.active {
    background: #0a3951;
    border-color: #0a3951;
    color: #ffffff;
}

.setup-step.done {
    background: var(--brand-soft);
    border-color: #99d0da;
    color: var(--brand-ink);
}

.checkbox-row {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.toast-host {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 3200;
    display: flex;
    flex-direction: column;
    gap: 11px;
    max-width: min(440px, calc(100vw - 20px));
}

.toast-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 10px;
    border-radius: 14px;
    padding: 12px 12px 12px 16px;
    border: 1px solid #d4dfeb;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    animation: toast-in 220ms ease;
}

.toast-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
    background: #8ea0b3;
}

.toast-item.info {
    background: #edf5ff;
    color: var(--info);
    border-color: #bfd5f1;
}

.toast-item.info::before {
    background: var(--info);
}

.toast-item.success {
    background: #ecfbf4;
    color: var(--ok);
    border-color: #bde8d5;
}

.toast-item.success::before {
    background: var(--ok);
}

.toast-item.warning {
    background: #fff7e7;
    color: var(--warn);
    border-color: #f0dbad;
}

.toast-item.warning::before {
    background: var(--warn);
}

.toast-item.danger {
    background: #fff1f3;
    color: var(--danger);
    border-color: #efc4cb;
}

.toast-item.danger::before {
    background: var(--danger);
}

.toast-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(14, 34, 58, 0.1);
    color: inherit;
    font-size: 1rem;
    font-weight: 760;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2900;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(14, 34, 58, 0.44);
    backdrop-filter: blur(4px);
}

.modal-card {
    width: min(640px, 100%);
    padding: 20px;
    gap: 14px;
    display: grid;
    border-radius: 20px;
    border-color: #cddced;
    box-shadow: var(--shadow-lg);
    animation: modal-in 220ms ease;
}

.modal-card h3 {
    margin: 0;
    font-size: 1.24rem;
}

.notfound-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px;
    display: grid;
    gap: 16px;
    border-radius: 20px;
    border: 1px solid #c9dcf2;
    background:
        radial-gradient(circle at 100% 0%, rgba(8, 127, 146, 0.12), transparent 44%),
        linear-gradient(170deg, #ffffff 0%, #eef6ff 100%);
    box-shadow: var(--shadow-lg);
}

.notfound-code {
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    font-weight: 820;
    color: #113d63;
}

.notfound-wrap h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.notfound-wrap .muted {
    max-width: 64ch;
    font-size: 0.98rem;
}

.notfound-scene {
    position: relative;
    height: 180px;
    border-radius: 15px;
    border: 1px solid #c8dff8;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.68), transparent 38%),
        linear-gradient(180deg, #e8f3ff 0%, #d7e9ff 100%);
}

.hotel-building {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(360px, 84%);
    height: 126px;
    border-radius: 8px 8px 0 0;
    background:
        repeating-linear-gradient(to right, #173b5f 0 16px, #25517b 16px 20px),
        linear-gradient(180deg, #1f507d 0%, #143755 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hotel-door {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 58px;
    border-radius: 6px 6px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: #0b2239;
}

.hotel-sign {
    position: absolute;
    right: 16px;
    top: 14px;
    border-radius: 999px;
    border: 1px solid #bcd5ef;
    background: #ffffff;
    color: #1a4b79;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 730;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.notfound-wrap .action-grid .primary-btn,
.notfound-wrap .action-grid .ghost-btn {
    min-width: 170px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
}

.invoice-print {
    max-width: 840px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.invoice-print table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.invoice-print td,
.invoice-print th {
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    text-align: left;
}

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

.guest-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.guest-hero {
    padding: 24px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background:
        linear-gradient(140deg, rgba(8, 127, 146, 0.92), rgba(14, 34, 58, 0.96)),
        url("/guest-journey-bg.png") center/cover;
    box-shadow: var(--shadow-md);
}

.guest-hero span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bfeef5;
}

.guest-hero h1 {
    color: #ffffff;
    font-size: clamp(1.65rem, 7vw, 2.5rem);
    line-height: 1.05;
}

.guest-hero p {
    max-width: 54ch;
    margin: 10px 0 0;
    color: #e0f1f5;
}

.guest-panel,
.guest-option {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.guest-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.guest-wide,
.guest-full {
    grid-column: 1 / -1;
}

.guest-list {
    display: grid;
    gap: 12px;
}

.guest-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.guest-option h2,
.guest-panel h2 {
    font-size: 1.08rem;
}

.guest-price {
    color: var(--brand-ink);
    font-size: 1.22rem;
    font-weight: 780;
    white-space: nowrap;
}

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

.guest-summary div {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-surface-soft);
    padding: 10px;
}

.guest-summary span {
    display: block;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.guest-summary strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1180px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: grid !important;
    }

    .app-shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .content-panel {
        padding: 20px;
    }

    .pms-header {
        flex-direction: column;
    }

    .pms-section-nav {
        position: static;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .pms-section-nav a {
        flex: 0 0 auto;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .nav-panel {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .content-panel {
        padding: 14px;
    }

    .auth-stage {
        padding: 12px;
    }

    .auth-stage-header {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .metric-spotlight {
        grid-column: span 1;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-donut-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .auth-hero,
    .auth-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .form-field {
        min-width: 100%;
    }

    .email-status-card {
        flex-direction: column;
    }

    .email-status-grid {
        justify-content: flex-start;
    }

    .table-row,
    .table-row:has(> :nth-child(3)),
    .table-row:has(> :nth-child(4)),
    .table-row:has(> :nth-child(5)),
    .table-row:has(> :nth-child(6)),
    .table-row.pms-reservation-row,
    .table-row.accounting-log-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .toast-host {
        right: 10px;
        left: 10px;
        bottom: 10px;
        max-width: none;
    }

    .notfound-wrap {
        padding: 16px;
    }

    .notfound-scene {
        height: 150px;
    }
}

@media (max-width: 640px) {
    .metric-grid,
    .pms-summary-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .portal-action-links,
    .mobile-action-grid {
        grid-template-columns: 1fr;
    }

    .mobile-card {
        padding: 12px;
    }

    .mobile-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn,
    .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .guest-form-grid,
    .guest-option,
    .guest-summary {
        grid-template-columns: 1fr;
    }

    .guest-hero,
    .guest-panel,
    .guest-option {
        border-radius: 16px;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .nav-panel,
    .no-print {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .content-panel {
        padding: 0;
    }

    .invoice-print {
        max-width: none;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}
