:root {
  --bg: #f2f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #102a43;
  --muted: #627d98;
  --line: #d6e4ee;
  --primary: #087ea4;
  --primary-soft: #e3f4fa;
  --teal: #00a6a6;
  --amber: #a8660c;
  --amber-soft: #fff2d9;
  --red: #b83b3b;
  --red-soft: #fae9e8;
  --blue: #1d64b5;
  --blue-soft: #e6f0fb;
  --sidebar: #08344c;
  --radius: 7px;
  --shadow: 0 12px 32px rgba(18, 32, 42, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Manrope, Arial, sans-serif; color: var(--ink); background: var(--bg); letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; background: var(--sidebar); color: #dbe4e8; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 8px 22px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #34c6d3; color: #052b3d; font-weight: 800; }
.brand span:last-child, .hotel-switcher span:nth-child(2), .user-row span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.brand small, .sidebar small { color: #91a1a9; font-size: 11px; }
nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 6px; color: #aebbc1; background: transparent; text-align: left; font-size: 13px; }
.nav-item svg { width: 18px; }
.nav-item:hover, .nav-item.active { background: #0d4b69; color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 #48d1df; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 10px; background: #a94343; color: #fff; font-size: 10px; text-align: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; border-top: 1px solid #235a73; padding-top: 13px; }
.hotel-switcher, .user-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 0; color: #eef3f5; background: transparent; text-align: left; }
.hotel-switcher svg { margin-left: auto; width: 15px; }
.hotel-badge, .avatar { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #176181; font-size: 11px; font-weight: 700; }
.user-row strong, .hotel-switcher strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; min-height: 76px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.3; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; width: 270px; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.search svg { width: 16px; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); }
.icon-btn svg { width: 17px; }
.sidebar .icon-btn { border-color: transparent; color: #aebbc1; background: transparent; }
.notification-btn span { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 17px; height: 17px; border: 2px solid white; border-radius: 50%; background: var(--red); color: #fff; font-size: 8px; }
.primary-btn, .secondary-btn, .danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 13px; border-radius: 6px; font-weight: 650; font-size: 12px; }
.primary-btn { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.secondary-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.danger-btn { border: 1px solid #e6b7b4; background: var(--red-soft); color: var(--red); }
.primary-btn svg, .secondary-btn svg, .danger-btn svg { width: 15px; }
.view { padding: 20px 24px 36px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 15px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.section-head .actions { display: flex; gap: 7px; margin-left: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); }
.stat-icon svg { width: 15px; }
.stat strong { display: block; margin: 9px 0 3px; font-size: 25px; line-height: 1; }
.stat small { color: var(--muted); font-size: 10px; }
.trend-up { color: var(--primary); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .75fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.panel-head { display: flex; align-items: center; min-height: 54px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 13px; }
.panel-head .meta { margin-left: 8px; color: var(--muted); font-size: 10px; }
.panel-head .actions { display: flex; gap: 6px; margin-left: auto; }
.link-btn { padding: 4px; border: 0; color: var(--primary); background: transparent; font-size: 11px; font-weight: 650; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 38px; padding: 0 12px; background: var(--surface-soft); color: var(--muted); text-align: left; font-size: 9px; text-transform: uppercase; }
td { height: 52px; padding: 7px 12px; border-top: 1px solid #edf0f2; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f8fbfa; }
.guest-cell { display: flex; align-items: center; gap: 9px; }
.guest-cell .avatar { background: #e7edef; color: #40515a; }
.guest-cell strong, .guest-cell small { display: block; }
.guest-cell small { margin-top: 2px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.tag::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.tag.green { background: var(--primary-soft); color: var(--primary); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.gray { background: #edf1f3; color: #65737d; }
.task-list { display: grid; }
.task-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; min-height: 68px; padding: 10px 14px; border-top: 1px solid #edf0f2; }
.task-item:first-child { border-top: 0; }
.task-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--amber-soft); color: var(--amber); }
.task-icon svg { width: 16px; }
.task-item strong { display: block; font-size: 11px; }
.task-item small { color: var(--muted); font-size: 9px; }
.task-item time { color: var(--muted); font-size: 9px; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .search { width: min(360px, 100%); background: #fff; }
.toolbar select { height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 11px; }
.toolbar .spacer { flex: 1; }
.calendar-strip { display: grid; grid-template-columns: 150px repeat(7, minmax(78px,1fr)); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.calendar-strip > div { min-height: 48px; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.calendar-strip > div:first-child { border-left: 0; }
.calendar-strip strong { display: block; color: var(--ink); font-size: 12px; }
.room-row { display: grid; grid-template-columns: 150px repeat(7, minmax(78px,1fr)); min-height: 65px; border-bottom: 1px solid var(--line); }
.room-label { padding: 13px; background: #fbfcfc; }
.room-label strong, .room-label small { display: block; }
.room-label small { color: var(--muted); font-size: 9px; }
.day-cell { position: relative; border-left: 1px solid var(--line); }
.booking-block { position: absolute; top: 12px; left: 4px; right: 4px; height: 40px; padding: 6px 8px; border-left: 3px solid var(--primary); border-radius: 4px; background: var(--primary-soft); overflow: hidden; font-size: 9px; }
.booking-block.amber { border-color: var(--amber); background: var(--amber-soft); }
.booking-block.blue { border-color: var(--blue); background: var(--blue-soft); }
.booking-block strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); min-height: calc(100vh - 150px); }
.conversation-list { border-right: 1px solid var(--line); }
.conversation { display: grid; grid-template-columns: 38px 1fr auto; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.conversation.active { background: #f0f7f5; box-shadow: inset 3px 0 var(--primary); }
.conversation p { margin: 4px 0 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 800; }
.conversation time { color: var(--muted); font-size: 8px; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-head .actions { display: flex; gap: 6px; margin-left: auto; }
.messages { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #f7f9fa; }
.bubble { max-width: 66%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; line-height: 1.55; }
.bubble.out { align-self: flex-end; border-color: #c9e3dc; background: var(--primary-soft); }
.ai-review { margin: 4px 18px 12px; padding: 11px; border: 1px solid #e7cd99; border-radius: 6px; background: var(--amber-soft); }
.ai-review strong { font-size: 10px; }
.ai-review p { margin: 5px 0 9px; font-size: 10px; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 42px; max-height: 100px; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; outline: 0; font-size: 11px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px,1fr)); gap: 10px; overflow-x: auto; }
.board-column { min-width: 220px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #eef2f4; }
.board-column h3 { display: flex; align-items: center; margin: 0 0 9px; font-size: 11px; }
.board-column h3 span { margin-left: auto; color: var(--muted); }
.work-card { margin-bottom: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.work-card strong { display: block; font-size: 11px; }
.work-card p { margin: 5px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.work-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.work-meta .avatar { width: 23px; height: 23px; margin-left: auto; font-size: 7px; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.integration { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.integration-head { display: flex; align-items: center; gap: 9px; }
.integration-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #edf2f4; color: var(--teal); font-weight: 800; font-size: 10px; }
.integration h3 { margin: 0; font-size: 12px; }
.integration p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.health-line { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 9px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(16,28,35,.25); opacity: 0; pointer-events: none; transition: .2s; }
.drawer { position: fixed; top: 0; right: 0; z-index: 40; width: min(460px,100%); height: 100vh; background: #fff; box-shadow: var(--shadow); transform: translateX(102%); transition: .22s; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.drawer-head .icon-btn { margin-left: auto; }
.drawer-section { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 11px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.detail-grid label { color: var(--muted); font-size: 9px; }
.detail-grid strong { display: block; margin-top: 3px; font-size: 11px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px 18px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; width: min(360px,calc(100vw - 36px)); padding: 11px 13px; border: 1px solid #b9d8d0; border-radius: 6px; background: #f3fbf8; box-shadow: var(--shadow); font-size: 11px; }
.toast svg { width: 17px; color: var(--primary); }
.empty { display: grid; place-items: center; min-height: 240px; color: var(--muted); text-align: center; }
.empty svg { width: 36px; margin-bottom: 8px; }
.mobile-only { display: none; }
.auth-locked .sidebar, .auth-locked .topbar, .auth-locked .drawer, .auth-locked .drawer-backdrop, .auth-locked .toast-stack { display: none !important; }
.auth-locked .app-shell { display: block; min-height: 100vh; }
.auth-locked .workspace { min-height: 100vh; }
.auth-locked .view { min-height: 100vh; padding: 0; }
.login-screen { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 20px; background: #edf2f3; }
.auth-locked .login-screen { min-height: 100vh; }
.login-box { width: min(380px,100%); padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.login-box h2 { margin: 0 0 4px; font-size: 18px; }
.login-box > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.login-box label { display: block; margin-top: 11px; color: var(--muted); font-size: 10px; }
.login-box input { width: 100%; height: 39px; margin-top: 5px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: 0; }
.login-box .primary-btn { width: 100%; margin-top: 16px; }
.auth-switch { width: 100%; margin-top: 12px; border: 0; background: transparent; color: var(--ocean); font-size: 10px; font-weight: 700; cursor: pointer; }
.login-error { min-height: 18px; margin-top: 8px; color: var(--red); font-size: 10px; }
.mode-pill { position: fixed; right: 14px; bottom: 12px; z-index: 15; padding: 4px 8px; border: 1px solid #d9b872; border-radius: 4px; background: #fff8e8; color: #805616; font-size: 9px; font-weight: 700; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2,1fr); } .layout-2 { grid-template-columns: 1fr; } .integration-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); transition: .2s; width: 248px; }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .topbar { padding: 10px 12px; }
  .topbar h1 { font-size: 16px; }
  .topbar-actions .search, .notification-btn { display: none; }
  .primary-btn { padding: 0 10px; }
  .view { padding: 14px 12px 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; } .stat strong { font-size: 21px; }
  .integration-grid { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; }
  .conversation-list { border-right: 0; }
  .chat-pane { display: none; }
  .calendar-strip, .room-row { min-width: 800px; }
  .board { grid-template-columns: repeat(4,260px); }
  .toolbar { flex-wrap: wrap; }
}
