:root {
  --app-bg: #dae3ed;
  --panel-bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --line: #d0d9e4;
  --text: #1a2332;
  --muted: #5a6a7e;
  --primary: #01B5EA;
  --primary-dark: #0194c3;
  --primary-darker: #036d8f;
  --active-bg: #e3f3fb;
  --active-border: #01B5EA;
  --shadow-soft: 0 10px 25px rgba(0, 40, 80, 0.10);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Tahoma, Arial, sans-serif;
  color: var(--text); background: var(--app-bg);
}
.app-shell {
  width: min(1440px, calc(100vw - 48px)); height: calc(100vh - 40px);
  margin: 20px auto; background: var(--panel-bg);
  border: 1px solid #bcc8d8; border-radius: 28px;
  overflow: hidden; box-shadow: var(--shadow-soft);
}
.layout { height: 100%; display: grid; grid-template-columns: 310px 1fr; }
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafe 0%, #eef3f9 100%);
  padding: 12px; overflow-y: auto; scrollbar-width: thin;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.brand-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #01B5EA 0%, #0194c3 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.brand h1 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #0c3b5e; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.sidebar-tools { margin-bottom: 10px; }
.search-input {
  width: 100%; border: 1px solid var(--line); background: #fff;
  color: var(--text); border-radius: 10px; padding: 9px 12px; font-size: 0.9rem; outline: none;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,181,234,0.15); }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu details { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.menu details[open] { border-color: #b8d4ea; }
.menu details.subdetails { margin-top: 4px; background: var(--surface-2); padding: 5px; }
.menu summary {
  cursor: pointer; font-weight: 600; font-size: 0.88rem; list-style: none;
  position: relative; padding: 5px 24px 5px 6px; border-radius: 6px; color: #1a3552;
}
.menu summary:hover { background: #edf4fa; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after {
  content: "\25B8"; position: absolute; right: 6px; top: 5px; color: #8ba3bc; font-size: 0.8rem;
}
.menu details[open] > summary::after { content: "\25BE"; }
.menu-link {
  display: block; text-decoration: none; color: #2a3d52; margin-top: 2px;
  padding: 6px 10px; border-radius: 8px; border: 1px solid transparent;
  font-size: 0.86rem; transition: all 100ms ease;
}
.menu-link:hover { background: #edf5fc; border-color: #d0e4f4; }
.menu-link.is-sub { margin-left: 10px; font-size: 0.84rem; }
.menu-link.active {
  background: var(--active-bg); border-color: var(--active-border);
  color: var(--primary-darker); font-weight: 600;
}
.content-wrap { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: #fafcfe; }
.topbar { border-bottom: 1px solid var(--line); background: #fff; padding: 14px 20px; }
.topbar h2 { margin: 0; font-size: 1.05rem; font-weight: 650; color: #0c3b5e; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 0.88rem; }
.content-frame { width: 100%; height: 100%; border: 0; background: transparent; }
.page { max-width: 1100px; margin: 16px auto; padding: 0 16px 40px; }
.hero {
  background: linear-gradient(150deg, #0284c7 0%, #01B5EA 60%, #38d0f7 100%);
  color: #fff; border-radius: 14px; padding: 22px 24px;
  box-shadow: 0 6px 18px rgba(1,148,195,0.25);
}
.hero h1, .hero h2 { margin: 0 0 6px; }
.hero p { margin: 0; color: #e3f4fe; line-height: 1.55; }
.section-title { margin: 22px 0 10px; color: #0c3b5e; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; margin-top: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  display: block; text-decoration: none; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  color: inherit; box-shadow: 0 2px 6px rgba(0,30,60,0.04);
  transition: border-color 120ms, box-shadow 120ms;
}
.card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(1,181,234,0.12); }
.card h3, .card h4 { margin: 0 0 6px; color: #0c3b5e; }
.card p, .card li { color: #4a5d72; line-height: 1.55; font-size: 0.92rem; }
.card-icon { font-size: 1.6rem; margin-bottom: 6px; }
.step {
  display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; margin-top: 6px;
}
.step .n {
  width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--active-bg); border: 1px solid var(--active-border);
  color: var(--primary-darker); font-weight: 700; font-size: 0.85rem;
}
.img-box { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; margin-top: 8px; }
.img-box img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.caption { margin-top: 6px; color: var(--muted); font-size: 0.88rem; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 0.9rem;
}
th, td { padding: 9px 12px; border-bottom: 1px solid #e8edf2; text-align: left; }
th { background: #eef3f9; color: #1a3552; font-weight: 600; }
.badge-list { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; padding: 5px 10px; font-size: 0.84rem; color: var(--primary-darker);
}
.info-box {
  border-left: 4px solid var(--primary); background: var(--active-bg);
  padding: 12px 14px; border-radius: 0 10px 10px 0; margin-top: 12px;
  font-size: 0.92rem; color: #0c3b5e;
}
.feature-list { list-style: none; padding: 0; margin: 8px 0 0; }
.feature-list li { padding: 6px 0; border-bottom: 1px solid #eef2f7; font-size: 0.92rem; color: #3a4f65; }
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "\2713  "; color: var(--primary); font-weight: 700; }
@media (max-width: 1150px) {
  .app-shell { width: calc(100vw - 20px); height: calc(100vh - 20px); margin: 10px; border-radius: 16px; }
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { max-height: 44vh; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
