:root {
    --paper: #f5f3ef;
    --surface: #ffffff;
    --ink: #1e211f;
    --muted: #777872;
    --line: #e7e3dc;
    --gold: #b98236;
    --gold-soft: #f4eadb;
    --teal: #287b76;
    --blue: #4779b8;
    --green: #42805a;
    --red: #b4514f;
    --shadow: 0 12px 32px rgba(56, 45, 33, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    line-height: 1.45;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.guest-app {
    display: grid;
    grid-template-columns: 232px minmax(520px, 1fr) 348px;
    min-height: 100vh;
}

.guest-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 26px 20px 20px;
    background: #fbfaf8;
    border-inline-end: 1px solid var(--line);
}

.hotel-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}
.hotel-brand img, .brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid #ddc9aa;
    border-radius: 8px;
    object-fit: cover;
}
.brand-mark {
    display: grid;
    place-items: center;
    color: var(--gold);
    background: var(--gold-soft);
}
.brand-mark svg { width: 22px; }
.brand-copy { min-width: 0; }
.brand-copy strong {
    display: block;
    overflow: hidden;
    font-family: "Libre Caslon Display", serif;
    font-size: 18px;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-copy small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.language-select {
    display: grid;
    grid-template-columns: 18px 1fr 16px;
    align-items: center;
    gap: 8px;
    margin: 34px 0 22px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
.country-flag {
    display: block;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(75, 67, 57, .16);
}
.language-select > svg { width: 17px; color: var(--gold); }
.language-select select {
    min-width: 0;
    border: 0;
    outline: 0;
    appearance: none;
    color: var(--ink);
    background: transparent;
}

.guest-nav { display: grid; gap: 4px; }
.guest-nav a, .guest-nav button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #5f615d;
    background: transparent;
    text-align: start;
    text-decoration: none;
}
.guest-nav a:hover, .guest-nav button:hover, .guest-nav .active {
    color: #8f5f20;
    background: var(--gold-soft);
}
.guest-nav svg { width: 18px; }

.room-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 14px;
    border: 1px solid #ead7b8;
    border-radius: 8px;
    background: #fffaf3;
}
.room-summary > svg { color: var(--gold); }
.room-summary small, .room-summary strong { display: block; }
.room-summary small { color: var(--muted); font-size: 11px; }
.room-summary strong { font-family: "Libre Caslon Display", serif; font-size: 18px; }

.guest-main {
    min-width: 0;
    padding: 24px 26px 48px;
}
.mobile-header { display: none; }
.mobile-header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-language-select {
    position: relative;
    display: inline-flex;
    width: 62px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
.mobile-language-select select {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}
.mobile-language-select svg { width: 14px; color: var(--muted); }

.hero {
    position: relative;
    min-height: 278px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(26, 24, 21, .42);
}
.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 58px 42px;
    color: white;
}
.hero-copy > span, .section-heading span, .support-header span, .modal-heading span {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hero-copy h1 {
    max-width: 480px;
    margin: 8px 0 12px;
    font-family: "Libre Caslon Display", serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.08;
}
.hero-copy p { max-width: 430px; margin: 0; color: rgba(255,255,255,.82); font-size: 14px; }

.content-section { padding-top: 34px; }
.section-heading, .support-header, .modal-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.section-heading h2, .support-header h2, .modal-heading h2 {
    margin: 3px 0 0;
    font-family: "Libre Caslon Display", serif;
    font-size: 25px;
    font-weight: 400;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.service-card {
    position: relative;
    min-height: 128px;
    padding: 18px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: start;
    box-shadow: 0 7px 22px rgba(56,45,33,.04);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.service-card:hover {
    transform: translateY(-3px);
    border-color: #d9ba88;
    box-shadow: var(--shadow);
}
.service-card > span:nth-child(2) { display: block; margin-top: 18px; font-weight: 600; }
.service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}
.service-meta span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #f6f1e8;
}
.service-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    color: var(--gold);
    background: var(--gold-soft);
}
.service-icon svg { width: 21px; }
.service-arrow {
    position: absolute;
    top: 16px;
    inset-inline-end: 14px;
    width: 16px;
    color: #b6b3ad;
}

.text-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    color: #8f5f20;
    background: transparent;
    font-weight: 600;
}
.text-button svg { width: 16px; }

.request-list { display: grid; gap: 9px; }
.request-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: start;
}
.request-row:hover, .request-row.active { border-color: #d9ba88; background: #fffaf3; }
.request-copy { min-width: 0; }
.request-copy strong, .request-copy small { display: block; }
.request-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.request-status {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue);
    background: #eaf1fa;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.request-status.Completed { color: var(--green); background: #e8f3eb; }
.request-status.Cancelled { color: var(--red); background: #f8e9e8; }
.request-status.Pending { color: #986916; background: #fbf0d7; }
.request-row > svg { width: 16px; color: #aaa7a1; }
.empty-state {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 24px;
    border: 1px dashed #d8d1c6;
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}
.empty-state > svg { width: 30px; color: var(--gold); }
.empty-state p { margin: 8px 0 2px; }

.support-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fbfaf8;
    border-inline-start: 1px solid var(--line);
}
.support-header { align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.icon-button.support-close { display: none; }
.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
}
.icon-button:hover { border-color: #d5b57f; color: #8f5f20; }
.icon-button svg { width: 18px; }
.support-empty {
    display: grid;
    flex: 1;
    place-content: center;
    justify-items: center;
    color: var(--muted);
    text-align: center;
}
.support-empty-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    color: var(--gold);
    background: var(--gold-soft);
}
.support-empty-icon svg { width: 28px; }
.support-empty p { max-width: 230px; }
.support-content { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.request-meta { padding: 6px 0 16px; }
.request-meta span, .request-meta strong, .request-meta small { display: block; }
.request-meta span { color: var(--gold); font-size: 11px; font-weight: 700; }
.request-meta strong { margin-top: 3px; font-size: 17px; }
.request-meta small { margin-top: 3px; color: var(--muted); }

.status-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}
.status-timeline li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #aaa7a1;
    text-align: center;
}
.status-timeline li::before {
    position: absolute;
    top: 14px;
    inset-inline-start: -50%;
    width: 100%;
    height: 1px;
    background: var(--line);
    content: "";
}
.status-timeline li:first-child::before { display: none; }
.status-timeline li > span {
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fbfaf8;
}
.status-timeline li svg { width: 13px; }
.status-timeline li small { font-size: 9px; line-height: 1.2; }
.status-timeline li.done, .status-timeline li.current { color: var(--teal); }
.status-timeline li.done::before, .status-timeline li.current::before { background: var(--teal); }
.status-timeline li.done > span, .status-timeline li.current > span { border-color: var(--teal); background: #e5f1ef; }
.status-timeline li.cancelled { color: var(--red); }

.chat-feed {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 14px 3px;
    border-top: 1px solid var(--line);
}
.chat-message { display: flex; margin-bottom: 12px; }
.chat-message.Guest { justify-content: flex-end; }
.chat-bubble {
    max-width: 86%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
.chat-message.Guest .chat-bubble { border-color: #dfc79f; background: #fff7eb; }
.chat-message.System .chat-bubble { width: 100%; max-width: none; color: #5e6f6b; background: #edf5f3; }
.chat-bubble strong { display: block; margin-bottom: 2px; font-size: 10px; color: var(--muted); }
.chat-bubble p { margin: 0; font-size: 13px; white-space: pre-wrap; }
.chat-bubble time { display: block; margin-top: 4px; color: #aaa7a1; font-size: 9px; text-align: end; }
.chat-composer {
    display: grid;
    grid-template-columns: 1fr 38px;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.chat-composer input, .field-label input, .field-label textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: var(--surface);
}
.chat-composer input { min-width: 0; height: 38px; padding: 0 12px; }
.chat-composer input:focus, .field-label input:focus, .field-label textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,130,54,.12); }
.send-button { border-color: var(--gold); color: white; background: var(--gold); }

.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(28, 26, 23, .58);
}
.request-modal {
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 28px 70px rgba(0,0,0,.24);
}
.modal-heading { align-items: center; }
.selected-service {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid #ead7b8;
    border-radius: 8px;
    background: #fffaf3;
}
.selected-service-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.selected-service-copy strong,
.selected-service-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
.selected-service-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.field-label { display: grid; gap: 7px; margin-top: 15px; color: #5f615d; font-size: 12px; font-weight: 600; }
.field-label input { height: 44px; padding: 0 12px; }
.field-label textarea { resize: vertical; min-height: 108px; padding: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.primary-button, .secondary-button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 700;
}
.primary-button { border: 1px solid var(--gold); color: white; background: var(--gold); }
.primary-button:hover { background: #a8732e; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }

@media (max-width: 1180px) {
    .guest-app { grid-template-columns: 210px minmax(500px, 1fr); }
    .support-rail {
        position: fixed;
        z-index: 80;
        top: 0;
        inset-inline-end: 0;
        width: min(380px, 92vw);
        transform: translateX(110%);
        box-shadow: -18px 0 45px rgba(0,0,0,.14);
        transition: transform .22s ease;
    }
    [dir="rtl"] .support-rail { transform: translateX(-110%); }
    .support-rail.open { transform: translateX(0); }
    .icon-button.support-close { display: inline-grid; }
}

@media (max-width: 820px) {
    .guest-app { display: block; }
    .guest-sidebar { display: none; }
    .guest-main { padding: 0 16px 36px; }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 68px;
    }
    .hotel-brand.compact .brand-mark { width: 36px; height: 36px; }
    .hero { min-height: 300px; margin-inline: -16px; border-radius: 0; }
    .hero-copy { padding: 68px 24px 36px; }
    .hero-copy h1 { font-size: 39px; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-heading { align-items: center; }
    .section-heading h2 { font-size: 21px; }
    .text-button { max-width: 132px; font-size: 12px; text-align: end; }
    .request-row { grid-template-columns: 40px minmax(0, 1fr) 18px; }
    .request-status { grid-column: 2; justify-self: start; }
}

@media (max-width: 430px) {
    .service-card { min-height: 118px; }
    .status-timeline li small { font-size: 8px; }
    .request-modal { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
