/* Alya Hotel System — shared documentation chrome (offline, no CDN) */
:root {
  --teal: #1B4845;
  --teal-2: #2a6b66;
  --bronze: #C4A574;
  --ink: #000E19;
  --muted: #475259;
  --canvas: #ECF2F8;
  --paper: #F8FAFC;
  --line: #E4E5E7;
  --ok: #1a7a4c;
  --err: #a32020;
  --sky: #0b5f9a;
  --side: 280px;
  --font: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 12px 32px rgba(0, 14, 25, 0.08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
}
a { color: var(--teal-2); }
a:hover { color: var(--teal); }
code { font-size: 0.92em; background: #eef2f4; padding: 1px 5px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -48px; background: #fff; padding: 8px; z-index: 40;
}
.skip:focus { top: 8px; }

.layout {
  display: grid;
  grid-template-columns: var(--side) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, var(--teal) 0%, #123330 100%);
  color: #fff;
  padding: 22px 16px 48px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.sidebar a { color: #e3ecea; text-decoration: none; }
.sidebar a:hover, .sidebar a[aria-current="page"] { color: var(--bronze); }
.brand { font-weight: 700; letter-spacing: 0.02em; margin-bottom: 4px; }
.brand img { height: 28px; vertical-align: middle; margin-right: 8px; }
.brand-sub { font-size: 0.75rem; color: var(--bronze); margin-bottom: 16px; }
.nav-group h2 {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 16px 0 6px;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0 0 6px; font-size: 0.88rem; }
.doc-search { display: block; margin: 0 0 10px; font-size: 0.75rem; color: #c9d6d4; }
.doc-search input {
  width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  font: inherit; background: rgba(0,0,0,0.2); color: #fff;
}
.search-results { list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.82rem; }
.search-results li { margin: 0 0 6px; }

.menu-toggle {
  display: none;
  position: fixed; top: 10px; left: 10px; z-index: 30;
  background: var(--teal); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px;
}
.content { padding: 32px 40px 80px; max-width: 1100px; }
.crumb { font-size: 0.8rem; color: var(--muted); margin: 0 0 16px; }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 46rem; }
h1 { font-size: 2rem; color: var(--teal); margin: 0 0 10px; }
h2 { font-size: 1.35rem; color: var(--teal); margin: 28px 0 10px; }
h3 { font-size: 1.05rem; color: var(--teal); }

.badge, .ev {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  margin-right: 4px; margin-bottom: 4px;
}
.ev-live { background: #d8f3e4; color: var(--ok); }
.ev-code { background: #d7ebf8; color: var(--sky); }
.ev-both { background: #e3ecea; color: var(--teal); }
.ev-part { background: #f6ead8; color: #7a4e12; }
.ev-no { background: #f8d7d5; color: var(--err); }
.ev-req { background: #eee; color: #444; }
.ev-unk { background: #e8e4f4; color: #4a3a7a; }

.card, .shot-card, .feature-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.feature-block { padding: 20px 22px 24px; margin: 0 0 22px; }
.shot-card { overflow: hidden; margin: 14px 0; }
.shot-card img { display: block; width: 100%; height: auto; }
.shot-card figcaption { padding: 10px 14px 12px; font-size: 0.82rem; color: var(--muted); }
.shot-missing {
  padding: 28px 16px; text-align: center; color: var(--muted);
  border: 1px dashed var(--bronze); border-radius: 16px; background: #fff;
  margin: 14px 0;
}

.grid-2, .grid-3 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.mini { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--teal); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow span {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 12px; font-weight: 600; font-size: 0.88rem;
}
.flow .arr { border: 0; background: none; color: var(--bronze); font-weight: 700; padding: 0; }
.flow-v { display: flex; flex-direction: column; align-items: stretch; gap: 6px; max-width: 420px; }
.flow-v span {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px; font-weight: 600; text-align: center;
}
.flow-v .arr { border: 0; background: none; color: var(--bronze); padding: 0; }

.limitations { border-left: 4px solid var(--bronze); padding: 8px 0 8px 14px; }
.related { font-size: 0.9rem; }
.footer-note { font-size: 0.82rem; color: var(--muted); margin-top: 40px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -100%; width: min(88vw, 320px); z-index: 20; transition: left 0.2s; }
  .sidebar.is-open { left: 0; }
  .menu-toggle { display: block; }
  .content { padding: 64px 18px 60px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.alya-hub-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}
.alya-hub-langs button {
  margin-left: 4px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font: inherit;
}
.alya-hub-langs button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.alya-hub-mode {
  color: var(--muted);
  font-weight: 600;
}
.alya-internal-banner {
  background: #f8e0d8;
  color: #a32020;
  padding: 10px 16px;
  font-weight: 700;
  text-align: center;
}
body.alya-docs-commercial [data-internal] { display: none !important; }
body.alya-docs-internal [data-commercial] { display: none !important; }
html[dir="rtl"] .sidebar { text-align: right; }
html[dir="rtl"] .alya-hub-bar { flex-direction: row-reverse; }

html { transition: background .35s ease, color .35s ease; }

.logo-3d {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; margin-right: 8px; vertical-align: middle;
  border-radius: 8px; background: #0f2f2d; color: var(--bronze);
  font-weight: 800; font-size: 0.85rem;
  transform-style: preserve-3d;
  animation: spin3d 8s linear infinite;
}
@keyframes spin3d {
  from { transform: rotateY(0) rotateX(8deg); }
  to { transform: rotateY(360deg) rotateX(8deg); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.feature-block, .mini, .shot-card, .shot-missing {
  animation: fadeInUp .5s ease both;
}
.feature-block, .mini, .shot-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-block:hover, .mini:hover, .shot-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 36px rgba(0, 14, 25, 0.12);
}
.search-spin {
  display: none; width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: var(--bronze);
  border-radius: 50%; animation: spin .7s linear infinite;
  position: absolute; right: 12px; top: 28px;
}
.search-spin.on { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.doc-search { position: relative; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.chart-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; margin-top: 12px; color: var(--ink); }
html[data-theme="dark"] {
  --ink: #eef4f2; --muted: #9bb0ab; --canvas: #0e1514; --paper: #15201e; --line: #2a3f3c;
}
html[data-theme="dark"] body { background: var(--canvas); color: var(--ink); }
html[data-theme="dark"] .feature-block, html[data-theme="dark"] .mini, html[data-theme="dark"] .shot-card, html[data-theme="dark"] .shot-missing {
  background: #15201e; border-color: var(--line); color: var(--ink);
}
html[data-theme="dark"] .alya-hub-bar { background: #15201e; border-color: var(--line); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3 { color: #e2c59a; }
html[data-theme="dark"] .footer-note { color: var(--muted); }
html[data-theme="dark"] .content { color: var(--ink); }
.alya-hub-bar button[data-adp-theme] {
  margin-left: 8px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 4px 8px; cursor: pointer; font: inherit;
}
@media print {
  .sidebar, .menu-toggle, .doc-search, .alya-hub-bar { display: none !important; }
  .layout { display: block; }
  .content { max-width: none; padding: 0; }
  .logo-3d { animation: none; }
}
