/* SPDX-License-Identifier: AGPL-3.0-only */
/* dini-IT: navy #25304e, slate #525d7a, secondary #757e95. */
:root {
  color-scheme: light;
  --navy: #25304e;
  --brand: #525d7a;
  --brand-soft: #eceef3;
  --ink: #25304e;
  --muted: #646e81;
  --line: #dfe3eb;
  --bg: #f5f6f8;
  --paper: #fff;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
[hidden] { display: none !important; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 34px); line-height: 1.25; font-weight: 650; letter-spacing: -1px; }
h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 650; letter-spacing: -.25px; }
h3 { font-size: 16px; font-weight: 600; }
p { margin-bottom: 16px; }
code { font-size: .9em; overflow-wrap: anywhere; }
.skip-link { position: fixed; z-index: 30; left: 16px; top: -100px; padding: 10px 16px; background: var(--navy); color: white; border-radius: 6px; }
.skip-link:focus { top: 16px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; padding: 32px 20px 24px; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--navy); text-decoration: none; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.8px; }
.brand img { flex-shrink: 0; object-fit: contain; }
.brand small { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; letter-spacing: .2px; color: var(--brand); }
.sidebar nav { margin-top: 32px; }
.nav-label { margin: 24px 12px 9px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 650; color: var(--muted); }
.nav-label:first-child { margin-top: 0; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin: 3px 0; border-radius: 7px; color: var(--brand); text-decoration: none; line-height: 1.4; font-size: 13px; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: var(--bg); color: var(--navy); }
.nav-item.active { background: var(--brand-soft); color: var(--navy); font-weight: 650; }
.sidebar-footer { margin: auto 12px 0; padding-top: 40px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.nav-toggle { display: none !important; }
.main { margin-left: 244px; min-height: 100vh; }
.topbar { min-height: 76px; padding: 16px 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); font-size: 12px; color: var(--muted); }
.topbar > span { font-weight: 600; }
.account-menu { display: flex; gap: 16px; align-items: center; }
.account-menu > span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-content { max-width: 1200px; margin: 0 auto; padding: 36px 42px 24px; }
.page-heading { margin-bottom: 28px; }
.lead { margin: 0; color: var(--muted); font-size: 14px; max-width: 760px; }
.eyebrow { margin-bottom: 9px; font-size: 10px; letter-spacing: 1px; font-weight: 650; color: var(--brand); }
.quiet { color: var(--muted); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; border: 1px solid #cdd2dd; border-radius: 7px; padding: 9px 16px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.5; text-decoration: none; white-space: normal; text-align: center; transition: background .15s, border-color .15s; }
.button:hover:not(:disabled) { background: var(--brand-soft); border-color: #b8c0d0; }
.button.primary { background: var(--navy); color: white; border-color: var(--navy); }
.button.primary:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); }
.button.small { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.text-link { font-size: 12px; font-weight: 550; text-decoration: underline; }
.text-button { border: 0; background: transparent; padding: 3px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.upload-panel { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: 0 2px 5px #25304e03; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-title > div { display: flex; align-items: center; gap: 12px; }
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 156px; padding: 26px; border: 1px dashed #b7bfce; border-radius: 8px; background: #f9fafc; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-within { background: var(--brand-soft); border-color: var(--brand); }
.dropzone:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-symbol { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; color: var(--brand); background: var(--brand-soft); border-radius: 12px; }
.upload-symbol .icon { width: 25px; height: 25px; }
.dropzone-copy { min-width: 0; }
.dropzone strong, .dropzone small, #file-description { display: block; }
.dropzone strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
#file-description { margin-top: 2px; color: var(--muted); font-size: 13px; }
.dropzone small { margin-top: 9px; font-size: 11px; color: var(--muted); }
.form-bottom { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 16px; margin-top: 20px; }
.field { min-width: 0; }
.field label, .cloud-search label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 550; color: var(--brand); }
select, .field input, .settings-form input:not([type=checkbox]), .cloud-toolbar input { width: 100%; height: 42px; border: 1px solid #cdd2dd; border-radius: 7px; background: white; color: var(--ink); padding: 9px 11px; font-size: 13px; }
select { padding-right: 25px; }
input::placeholder { color: #727b8b; opacity: 1; }
.worker-line { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid #edf0f5; color: var(--muted); font-size: 11px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.dot.ready { background: #3b7660; }
.dot.busy, .dot.starting { background: #a77822; }
.dot.offline, .dot.error { background: #b04949; }
.form-error, .flash.error { color: #9d3535; background: #fff3f2; border: 1px solid #e9c9c6; border-radius: 6px; padding: 10px 13px; font-size: 13px; }
.form-error { margin: 15px 0 0; }
.upload-progress { margin-top: 16px; font-size: 12px; color: var(--muted); }
progress { display: block; width: 100%; height: 6px; margin-bottom: 8px; accent-color: var(--brand); }
.recordings-section { margin-top: 30px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.list-heading h2 { display: flex; align-items: center; gap: 9px; }
.count { font-size: 11px; font-weight: 600; min-width: 23px; padding: 2px 7px; text-align: center; background: #e8ebf1; border-radius: 5px; color: var(--brand); }
.search { display: flex; align-items: center; gap: 9px; width: 260px; min-height: 38px; border: 1px solid var(--line); background: white; border-radius: 7px; padding: 7px 11px; color: var(--muted); }
.search .icon { width: 16px; height: 16px; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; outline: none; }
.search:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.list-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
#jobs-list:not(:empty), .api-token-list { border: 1px solid var(--line); background: white; border-radius: 9px; overflow: hidden; }
.job-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #e9ecf1; color: var(--ink); text-decoration: none; }
.job-row:last-child { border-bottom: 0; }
a.job-row:hover { background: #f8f9fc; }
a.job-row:focus-visible { outline-offset: -3px; }
.file-icon { display: grid; place-items: center; width: 34px; height: 40px; flex-shrink: 0; color: var(--brand); background: var(--brand-soft); border-radius: 7px; font-size: 23px; }
.job-info { flex: 1; min-width: 0; }
.job-name { display: block; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.job-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.job-info p { margin-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 3px 8px; font-size: 10px; font-weight: 550; white-space: nowrap; color: var(--brand); background: var(--brand-soft); }
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status.completed { color: #37634f; background: #edf4f0; }
.status.running, .status.importing { color: #3b5f8d; background: #edf1f8; }
.status.queued { color: #866220; background: #f7f2e6; }
.status.failed { color: #9d3535; background: #fbeeed; }
.row-arrow { color: #7f889b; font-size: 17px; margin-left: 3px; }
.empty-state { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 38px 24px; text-align: center; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); margin-bottom: 0; font-size: 13px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; max-width: 1200px; margin: 0 auto; padding: 10px 42px 26px; color: var(--muted); font-size: 10px; }
.flash { margin: 20px 42px 0; padding: 12px 16px; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 8px; }
/* Detail and processing states. */
.back-link { display: inline-block; margin-bottom: 22px; font-size: 12px; text-decoration: none; }
.detail-heading { margin-bottom: 24px; }
.detail-heading h1 { font-size: clamp(24px, 2.6vw, 32px); overflow-wrap: anywhere; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 15px; font-size: 12px; color: var(--muted); }
.audio-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 18px 22px; margin: 24px 0; }
.audio-panel > div { display: flex; gap: 12px; align-items: center; flex: 1; }
.audio-symbol { display: grid; place-items: center; width: 36px; height: 40px; background: var(--brand-soft); color: var(--brand); border-radius: 7px; font-size: 25px; }
.audio-panel strong { font-size: 13px; font-weight: 600; }
.audio-panel p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.audio-panel audio { width: 280px; max-width: 100%; height: 40px; }
.transcript-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; }
.transcript-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding: 20px 24px; }
.download-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.transcript-text { padding: 26px 30px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.9; min-height: 200px; color: #35415b; }
.transcript-note { margin: 0; padding: 15px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.processing-panel { padding: 48px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; }
.processing-panel h2 { font-size: 22px; margin-bottom: 14px; }
.processing-panel p { color: var(--muted); max-width: 530px; margin: 12px auto; overflow-wrap: anywhere; }
.processing-panel > .button { margin-top: 15px; }
.processing-wave { display: flex; align-items: center; justify-content: center; gap: 5px; height: 45px; margin-bottom: 22px; }
.processing-wave i { height: 17px; width: 4px; border-radius: 4px; background: var(--brand); animation: pulse 1.2s infinite alternate; }
.processing-wave i:nth-child(2), .processing-wave i:nth-child(4) { height: 28px; animation-delay: .3s; }
.processing-wave i:nth-child(3) { height: 38px; animation-delay: .5s; }
@keyframes pulse { to { transform: scaleY(.5); opacity: .45; } }
.processing-symbol { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; color: #9d3535; background: #fbeeed; border-radius: 50%; font-size: 24px; }
.center-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.detail-footnote { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.source-link { margin: 22px 0; }
/* Settings, administration and Microsoft 365 retain their existing controls. */
.settings-panel { margin-bottom: 24px; }
.settings-panel > h2 { margin-bottom: 12px; }
.settings-panel > p { color: var(--muted); }
.settings-panel > form { margin-top: 18px; }
.settings-panel .center-actions { justify-content: flex-start; }
.settings-form { display: grid; gap: 18px; }
.settings-form .button { justify-self: start; }
.settings-form input[type=checkbox] { width: 16px; height: 16px; margin-right: 7px; accent-color: var(--brand); }
.setup-steps { padding-left: 23px; color: var(--muted); }
.setup-steps li { padding-left: 3px; margin: 14px 0; }
.copy-value { display: block; background: var(--bg); padding: 10px 12px; border-radius: 5px; margin: 9px 0; color: var(--ink); }
.api-secret { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: var(--brand-soft); border-radius: 6px; }
.api-token-list { margin-top: 16px; }
.recordings-section > h2 { margin-bottom: 12px; }
.recordings-section > p, .recordings-section > ul { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; text-align: left; margin-top: 20px; font-size: 12px; }
.users-table th, .users-table td { border-bottom: 1px solid var(--line); padding: 13px 10px; }
.users-table th { color: var(--muted); font-weight: 550; background: #f9fafc; }
.users-table tr:last-child td { border-bottom: 0; }
.cloud-toolbar { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: end; }
.cloud-search > div { display: flex; gap: 10px; }
.cloud-location { display: flex; align-items: center; gap: 14px; margin: 22px 0; overflow-wrap: anywhere; }
.cloud-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px; border: 1px solid var(--line); border-bottom: 0; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.cloud-row:last-child { border-bottom: 1px solid var(--line); }
.cloud-row:hover { background: var(--brand-soft); }
.cloud-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cloud-row input { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.cloud-row .quiet { white-space: nowrap; }
.cloud-row.folder { font-weight: 550; }
#cloud-more { margin-top: 14px; }
#cloud-files + .button + .quiet { margin-top: 16px; }
.selection-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
/* The navigation remains available at every viewport width. */
@media (max-width: 1100px) {
  .sidebar { width: 224px; padding-inline: 14px; }
  .main { margin-left: 224px; }
  .page-content { padding-inline: 28px; }
  .topbar, .page-footer { padding-inline: 28px; }
  .form-bottom { gap: 12px; grid-template-columns: 1fr 1fr; }
  .form-bottom .button { grid-column: 1 / -1; justify-self: end; min-width: 180px; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; padding: 17px 24px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { font-size: 23px; padding: 0; gap: 10px; }
  .brand img { width: 40px; height: 40px; }
  .brand small { margin-top: 3px; font-size: 11px; }
  .nav-toggle { display: inline-flex !important; }
  .sidebar nav { display: none; width: 100%; margin-top: 0; }
  .sidebar.nav-open nav { display: block; }
  .sidebar-footer { display: none; }
  .nav-item { padding: 12px; }
  .main { margin-left: 0; }
  .topbar { min-height: 58px; padding: 11px 24px; }
  .page-content { padding: 28px 24px 22px; }
  .page-footer { padding-inline: 24px; }
  .flash { margin: 18px 24px 0; }
  .form-bottom { grid-template-columns: 1fr 1fr auto; }
  .form-bottom .button { grid-column: auto; min-width: 0; justify-self: stretch; }
}
@media (max-width: 600px) {
  .sidebar { padding: 15px 18px; }
  .topbar { padding-inline: 18px; font-size: 11px; }
  .account-menu { gap: 10px; }
  .account-menu > span { max-width: 135px; }
  .page-content { padding: 25px 16px 20px; }
  .page-heading { margin-bottom: 22px; }
  h1 { font-size: 28px; letter-spacing: -.7px; }
  .lead { font-size: 13px; }
  .upload-panel { padding: 18px; }
  .section-title { flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
  h2 { font-size: 16px; }
  .dropzone { flex-direction: column; gap: 12px; padding: 22px 14px; text-align: center; min-height: 190px; }
  .upload-symbol { width: 42px; height: 42px; border-radius: 9px; }
  .dropzone small { font-size: 10px; }
  .form-bottom { grid-template-columns: 1fr; gap: 15px; }
  .form-bottom .button { margin-top: 2px; min-height: 44px; }
  select, .field input, .settings-form input:not([type=checkbox]), .cloud-toolbar input { font-size: 16px; }
  .list-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .search { width: 100%; min-height: 42px; }
  .search input { font-size: 16px; }
  .job-row { padding: 14px 12px; gap: 10px; }
  .file-icon { width: 29px; height: 36px; font-size: 20px; }
  .job-name { font-size: 12px; }
  .job-meta { font-size: 10px; line-height: 1.6; }
  .row-arrow { display: none; }
  .status { font-size: 10px; padding: 3px 6px; }
  .page-footer { padding: 8px 18px 22px; flex-wrap: wrap; }
  .flash { margin-inline: 16px; }
  .detail-heading h1 { font-size: 25px; }
  .detail-meta { gap: 10px; font-size: 11px; }
  .audio-panel { padding: 18px; gap: 16px; }
  .audio-panel > div, .audio-panel audio, .audio-panel > .button { width: 100%; }
  .transcript-header { padding: 18px; align-items: flex-start; flex-direction: column; }
  .transcript-text { padding: 20px; font-size: 14px; }
  .transcript-note { padding: 14px 18px; }
  .processing-panel { padding: 34px 20px; }
  .processing-panel h2 { font-size: 21px; }
  .detail-footnote { gap: 10px; }
  .cloud-toolbar { grid-template-columns: 1fr; gap: 15px; }
  .cloud-row { padding: 12px 8px; }
  .cloud-location { align-items: flex-start; font-size: 12px; }
  .settings-panel .center-actions { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
