/* ip360 hub — Vartotojo vadovas (user guide) styles.
   Matches the hub landing gradient palette. Printable, mobile-first. */

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-dim: #94a3b8;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --amber: #f59e0b;
  --danger: #e11d48;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc, #eef2ff, #e0e7ff);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.topbar-brand:hover { color: var(--accent); }
.topbar-brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.topbar-brand .title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.topbar-brand .title .main { font-size: 15px; }
.topbar-brand .title .sub { font-size: 11px; color: var(--ink-dim); font-weight: 500; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 13px;
}
.topbar-search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  width: 160px;
  color: var(--ink);
}
.topbar-search input::placeholder { color: var(--ink-dim); }

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-btn:hover { background: var(--bg); color: var(--ink); border-color: var(--ink-dim); }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.sidebar h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}
.sidebar h3:first-child { margin-top: 0; }

.sidebar ul {
  list-style: none;
}
.sidebar li { margin: 0; }
.sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition: all 0.12s;
}
.sidebar a:hover { background: var(--bg); color: var(--ink); }
.sidebar a.active,
.sidebar a[aria-current="page"] {
  background: #e0f2fe;
  color: var(--accent-dark);
  font-weight: 600;
}
.sidebar a .num {
  display: inline-block;
  width: 20px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

/* Main content */
main {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow);
}

main h1 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 4px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
main .subtitle {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

main h2 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 8px;
  color: var(--ink);
  scroll-margin-top: 80px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 24px;
}
main h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

main h3 {
  font-size: 17px;
  margin-top: 28px;
  margin-bottom: 6px;
  color: var(--ink);
  scroll-margin-top: 80px;
}

main h4 {
  font-size: 14px;
  margin-top: 20px;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 700;
}

main p {
  margin-bottom: 12px;
  color: var(--ink-muted);
}
main p.lead {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 24px;
}

main a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
main a:hover { border-bottom-color: var(--accent); }

main ul, main ol {
  margin: 12px 0 16px 24px;
  color: var(--ink-muted);
}
main li { margin-bottom: 4px; }

main strong { color: var(--ink); }
main em { color: var(--ink-muted); }

main code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

main pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}
main pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

main blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 16px 0;
  background: #f0f9ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}

/* Callout boxes */
.callout {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border-left: 4px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.callout .callout-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
.callout .callout-body {
  flex: 1;
  font-size: 14px;
  line-height: 1.55;
}
.callout .callout-body strong { display: block; margin-bottom: 2px; }

.callout.tip { background: #ecfeff; border-color: var(--teal); color: #134e4a; }
.callout.tip strong { color: var(--teal-dark); }

.callout.warn { background: #fffbeb; border-color: var(--amber); color: #78350f; }
.callout.warn strong { color: #92400e; }

.callout.danger { background: #fef2f2; border-color: var(--danger); color: #7f1d1d; }
.callout.danger strong { color: #9f1239; }

.callout.info { background: #eff6ff; border-color: var(--accent); color: #1e3a8a; }
.callout.info strong { color: var(--accent-dark); }

.callout.step {
  background: #f0fdf4;
  border-color: var(--success);
  color: #14532d;
}
.callout.step strong { color: #166534; }

/* Step-numbered workflow lists */
ol.steps {
  list-style: none;
  counter-reset: step;
  margin-left: 0;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 56px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  color: var(--ink);
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
ol.steps > li strong { color: var(--ink); }
ol.steps > li ol, ol.steps > li ul {
  margin-top: 8px;
  margin-left: 18px;
  color: var(--ink-muted);
}

/* Tables */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
main table th {
  text-align: left;
  padding: 10px 14px;
  background: #f1f5f9;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
main table td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
}
main table tr:nth-child(even) td { background: #fafbfc; }

/* Screenshots & figures */
figure {
  margin: 20px 0;
  text-align: center;
}
figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
figure.placeholder img {
  background: repeating-linear-gradient(
    45deg,
    #f1f5f9,
    #f1f5f9 10px,
    #e2e8f0 10px,
    #e2e8f0 20px
  );
  min-height: 200px;
  display: block;
  position: relative;
}
figure.placeholder {
  padding: 40px 20px;
  background: #fafbfc;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: 13px;
  font-style: italic;
}
figure.placeholder::before {
  content: "📸 ";
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
  font-style: normal;
}
figcaption {
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 8px;
  font-style: italic;
}

/* KBD (keyboard shortcuts) */
kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fafbfc;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Topic cards (used on index.html) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.card {
  display: block;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
}
.card .card-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}
.card .card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.card .card-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.card .card-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card .chip {
  font-size: 11px;
  background: #f1f5f9;
  color: var(--ink-muted);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ink-muted);
}
.menu-toggle svg { display: block; }

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 16px 12px 60px;
    gap: 12px;
  }
  main {
    padding: 20px 18px;
  }
  main h1 { font-size: 24px; }
  main h2 { font-size: 19px; margin-top: 36px; padding-top: 18px; }
  main h3 { font-size: 16px; }

  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: none;
    width: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    padding: 16px 20px 80px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    z-index: 90;
  }
  .sidebar.open { transform: translateX(0); }

  .menu-toggle { display: inline-flex; }
  .topbar-search input { width: 100px; }
}

/* Print */
@media print {
  body { background: white; }
  .topbar, .sidebar, .menu-toggle, .topbar-search, .topbar-btn { display: none !important; }
  .layout { grid-template-columns: 1fr; max-width: none; padding: 0; margin: 0; }
  main { box-shadow: none; border: none; padding: 0; }
  main h1 { font-size: 24pt; }
  main h2 { font-size: 16pt; page-break-after: avoid; }
  main h3 { font-size: 13pt; page-break-after: avoid; }
  main p, main li { font-size: 11pt; color: #000; }
  main a { color: #000; text-decoration: underline; }
  figure.placeholder { display: none; }
  .callout { border: 1px solid #000; background: white !important; }
  pre { border: 1px solid #000; background: white !important; color: #000 !important; }
}
