:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --panel: #ffffff;
  --line: #dde5ee;
  --text: #17263b;
  --muted: #627389;
  --accent: #087e83;
  --danger: #b63745;
  font: 14px/1.55 "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  cursor: pointer; background: #fff; border: 1px solid #ced9e5;
  border-radius: 9px; padding: 10px 16px; min-height: 42px;
  font-weight: 600; transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover { background: #f0f6f9; border-color: #9eb4c8; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 4px #087e831a; }
button.primary:hover { background: #066b70; border-color: #066b70; }
button.danger { color: var(--danger); border-color: #ecd1d7; }
button.danger:hover { background: #fff3f4; border-color: #dca7b1; }
button:disabled { opacity: .5; cursor: wait; }
input, select, textarea {
  background: #fff; border: 1px solid #cbd7e3; border-radius: 8px;
  padding: 10px 12px; min-width: 0; min-height: 43px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #8191a3; }
input[type=checkbox], input[type=radio] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--accent); }
input[type=file] { padding: 7px; font-size: 13px; }
input[type=file]::file-selector-button { background: #edf4f8; color: var(--text); border: 0; padding: 7px 10px; border-radius: 5px; margin-right: 10px; cursor: pointer; }
textarea { resize: vertical; min-height: 112px; }
input:focus, textarea:focus, select:focus, button:focus-visible, summary:focus-visible { outline: 3px solid #65bdc35c; outline-offset: 2px; border-color: var(--accent); }
label { display: grid; gap: 7px; margin: 15px 0; font-weight: 600; color: #41526a; }
label:has(input[type=checkbox]) { display: flex; align-items: flex-start; flex-direction: row-reverse; justify-content: flex-end; gap: 11px; font-weight: 400; padding: 12px; background: #f5f8fb; border-radius: 8px; }
label:has(input[type=checkbox]) input { flex: 0 0 18px; margin: 2px 0 0; }
form > button[type=submit] { margin-top: 6px; }
h1,h2,h3,p { margin: 0 0 12px; }
h1 { font-size: 29px; font-weight: 700; letter-spacing: -.8px; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 650; letter-spacing: -.25px; }
h3 { font-size: 16px; font-weight: 650; }
p { line-height: 1.65; }
small, .muted { color: var(--muted); }
small { font-size: 12px; }
a { color: var(--accent); text-underline-offset: 3px; }
.layout { display: grid; grid-template-columns: 226px minmax(0,1fr); min-height: 100vh; }
.sidebar {
  background: #14263d; color: #d8e3ee; padding: 30px 15px 18px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid #14263d; overflow-y: auto;
}
.brand { font-size: 20px; line-height: 1.3; font-weight: 650; letter-spacing: -.5px; padding: 0 11px 32px; color: #fff; }
.brand span { color: #75d7cf; display: block; font-size: 15px; letter-spacing: .6px; font-weight: 400; margin-top: 3px; }
.nav { background: transparent; border-color: transparent; color: #becddd; text-align: left; width: 100%; padding: 12px 14px; border-radius: 8px; font-weight: 500; min-height: 46px; }
.nav:hover { background: #233a54; color: #fff; border-color: transparent; }
.nav.active { background: #23445c; color: #9ae6df; border-color: #31556a; box-shadow: inset 3px 0 #73d7ce; }
.sidebar footer { margin-top: auto; padding: 24px 12px 8px; font-size: 12px; color: #9db0c5; white-space: pre-line; line-height: 1.8; border-top: 1px solid #304157; }
main { padding: 34px 38px 50px; min-width: 0; max-width: 1480px; width: 100%; margin: 0 auto; }
.top,.row,.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.top { justify-content: space-between; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); gap: 18px; }
.top h1 { margin: 5px 0 0; }
.top small { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.top .actions { margin: 0; }
.top .actions button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.row { align-items: flex-start; gap: 18px; }
.row > * { flex: 1 1 180px; min-width: 0; }
.actions { margin: 16px 0; gap: 10px; }
.actions > input { flex: 1 1 180px; max-width: 370px; }
.actions > select { width: auto; max-width: 100%; }
main > .actions:first-of-type { margin-top: 0; margin-bottom: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #bddfd9; background: #eaf7f3; color: #226d60; border-radius: 30px; padding: 4px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.warn { color: #936416; background: #fff8e8; border-color: #eedaa9; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 24px; margin-bottom: 20px; box-shadow: 0 3px 12px #233c5804; overflow-wrap: anywhere; }
.card > h2 { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid #edf1f6; }
.card > p.muted { max-width: 850px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(265px,100%),1fr)); gap: 18px; }
.meeting-card { text-align: left; width: 100%; border: 1px solid var(--line); background: var(--panel); padding: 24px; border-radius: 12px; display: grid; gap: 9px; box-shadow: 0 3px 10px #1c375008; position: relative; min-height: 174px; align-content: start; }
.meeting-card:hover { background: #fff; border-color: #6aaeb1; box-shadow: 0 5px 18px #173e5b12; }
.meeting-card h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.meeting-card time { font-size: 12px; color: var(--muted); font-weight: 400; }
.meeting-card > .muted { font-size: 13px; font-weight: 400; }
.meeting-card > small { margin-top: 5px; font-size: 11px; color: #297d70; }
.tabs { display: flex; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin: 10px 0 22px; }
.tabs button { border-color: transparent; background: transparent; color: var(--muted); padding: 8px 13px; }
.tabs button:hover { background: #e7eef4; color: var(--text); }
.tabs button.active { background: #e2f2f1; border-color: #c5e5e1; color: #066f72; }
.segment { border-bottom: 1px solid #e8edf3; padding: 16px 0; display: grid; grid-template-columns: 86px minmax(0,1fr) auto; gap: 14px; align-items: start; }
.time { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 12px; cursor: pointer; }
.segment p { white-space: pre-wrap; margin: 0; }
.segment small { display: block; margin-bottom: 5px; }
.note,.result { padding: 17px; border: 1px solid var(--line); background: #fafcfe; border-radius: 9px; margin: 12px 0; white-space: pre-wrap; }
.result { cursor: pointer; }
.result:hover { border-color: #69afb0; background: #f2f9f8; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 12px; }
.empty { grid-column: 1 / -1; border: 1px dashed #bdcddc; background: #fff; text-align: center; padding: 64px 32px; border-radius: 13px; color: var(--muted); line-height: 1.8; }
.empty::before { content: ""; display: block; width: 42px; height: 34px; border: 2px solid #b9cbd9; border-radius: 7px; margin: 0 auto 19px; background: linear-gradient(#dce7ef,#dce7ef) 9px 10px / 20px 2px no-repeat, linear-gradient(#dce7ef,#dce7ef) 9px 19px / 14px 2px no-repeat; }
.error { border: 1px solid #efc1c8; background: #fff1f3; color: #a1283d; padding: 14px 16px; border-radius: 9px; margin: 14px 0; white-space: pre-wrap; }
.notice { border: 1px solid #c6e4df; border-left: 3px solid var(--accent); padding: 13px 16px; background: #edf8f5; color: #315e59; border-radius: 0 8px 8px 0; margin: 14px 0; white-space: pre-wrap; }
.player { width: 100%; max-height: 480px; border-radius: 9px; background: #14263d; margin: 10px 0; }
audio.player { background: #f1f3f4; height: 48px; }
.slides img { max-width: 100%; max-height: 340px; object-fit: contain; background: #e9eef4; }
.slide { border: 1px solid var(--line); padding: 17px; border-radius: 10px; margin: 14px 0; background: #fff; }
.slide pre { white-space: pre-wrap; }
pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.7 Consolas,monospace; background: #f4f7fa; padding: 14px; border-radius: 8px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 15px; max-width: 620px; width: calc(100vw - 36px); padding: 28px; box-shadow: 0 24px 80px #0d203b33; max-height: calc(100vh - 48px); overflow-y: auto; }
dialog::backdrop { background: #10243c70; backdrop-filter: blur(3px); }
dialog h2 { font-size: 22px; }
.connection { max-width: 580px; margin: 7vh auto; padding: 28px; }
.connection .brand { color: var(--text); padding: 0 0 26px; font-size: 27px; }
.connection .brand span { color: var(--accent); display: inline; font-size: inherit; letter-spacing: -.5px; font-weight: 650; }
.connection .card { padding: 28px; }
.file { display: inline-block; }
.chat-answer { white-space: pre-wrap; line-height: 1.85; }
.sources { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.busy { opacity: .7; pointer-events: none; }
.upload-list { display: grid; gap: 12px; margin-top: 18px; }
.upload-row { display: grid; gap: 8px; background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.upload-row .badge { justify-self: start; white-space: normal; }
.upload-row progress { width: 100%; height: 10px; accent-color: var(--accent); }
.upload-row .actions { margin: 4px 0 0; }
.secret { word-break: break-all; padding: 14px; border: 1px dashed #8fc3bc; border-radius: 8px; background: #f1faf7; color: #176c60; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td,th { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 12px; vertical-align: top; }
th { color: var(--muted); background: #f7f9fc; font-size: 11px; letter-spacing: .4px; font-weight: 650; }
details { margin: 15px 0; }
summary { cursor: pointer; color: var(--accent); padding: 6px 0; font-weight: 600; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 205px minmax(0,1fr); }
  main { padding: 27px 25px 40px; }
  .card { padding: 21px; }
  h1 { font-size: 26px; }
}
@media (max-width: 750px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; padding: 15px; flex-direction: row; flex-wrap: wrap; gap: 5px; }
  .brand { width: 100%; padding: 0 8px 12px; font-size: 20px; }
  .brand span { display: inline; font-size: inherit; margin-left: 3px; }
  .nav { width: auto; padding: 8px 11px; min-height: 38px; font-size: 12px; }
  .sidebar footer { display: none; }
  main { padding: 24px 17px 35px; }
  .segment { grid-template-columns: 67px minmax(0,1fr); gap: 9px; }
  .segment > button { grid-column: 2; justify-self: start; }
  .top { align-items: start; padding-bottom: 18px; margin-bottom: 20px; }
  .top .actions { gap: 6px; }
  .card { padding: 19px; }
  .actions > input { max-width: none; }
  .empty { padding: 40px 20px; }
  .connection { padding: 20px; margin: 3vh auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
