/* Video Agent admin: a light workspace without changing Django admin behaviour. */
:root {
  --primary: #2778df;
  --secondary: #2778df;
  --accent: #2778df;
  --primary-fg: #fff;
  --body-bg: #f3f4f6;
  --body-fg: #172333;
  --body-quiet-color: #738093;
  --body-medium-color: #506075;
  --body-loud-color: #172333;
  --header-bg: #fff;
  --header-color: #172333;
  --header-branding-color: #172333;
  --header-link-color: #506075;
  --breadcrumbs-bg: #fff;
  --breadcrumbs-fg: #748094;
  --breadcrumbs-link-fg: #2778df;
  --link-fg: #2169c4;
  --link-hover-color: #1454a5;
  --link-selected-fg: #1454a5;
  --hairline-color: #e8ebef;
  --border-color: #dce2e9;
  --darkened-bg: #f7f8fa;
  --selected-bg: #eef5ff;
  --selected-row: #eef5ff;
  --button-bg: #eef2f6;
  --button-hover-bg: #e0e8f1;
  --default-button-bg: #2778df;
  --default-button-hover-bg: #1766ca;
  --object-tools-bg: #eef2f6;
  --object-tools-hover-bg: #e0e8f1;
  --object-tools-fg: #253953;
  color-scheme: light;
}

html, body { background: #f3f4f6; }
body { color: #172333; }
#container { min-width: 0; }

/* Header */
#header {
  min-height: 64px;
  box-sizing: border-box;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid #e8ebef;
  box-shadow: none;
}
#site-name { font-size: 18px; font-weight: 700; margin: 0; }
#site-name a, #header #site-name a:link, #header #site-name a:visited {
  color: #172333;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.va-brand-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #287fff;
  color: #fff;
  font-size: 12px;
  padding-left: 2px;
  box-sizing: border-box;
}
#user-tools { color: #68778b; font-size: 12px; display: flex; align-items: center; gap: 16px; }
#header #user-tools a, #header #user-tools a:link, #header #user-tools a:visited,
#header #logout-form button { color: #506075; font-size: 12px; text-decoration: none; }
#header #user-tools a:hover, #header #logout-form button:hover { color: #2169c4; }
#logout-form { display: inline-flex; }
#logout-form button { padding: 0; }
.va-user-name { font-weight: 700; color: #26374c; }

/* Navigation */
#container > .main { min-height: calc(100vh - 65px); }
#nav-sidebar {
  flex: 0 0 300px;
  left: -301px;
  margin-left: -301px;
  padding: 24px 10px;
  box-sizing: border-box;
  background: #fff;
  border-right: 1px solid #e8ebef;
  overflow-y: auto;
  scrollbar-width: thin;
}
.main.shifted > #nav-sidebar { margin-left: 0; }
.toggle-nav-sidebar {
  flex-basis: 20px;
  width: 20px;
  background: #fff;
  color: #8b98aa;
  border-color: #e8ebef;
}
.toggle-nav-sidebar:hover { background: #eef5ff; }
.va-nav-top { padding: 0 5px 17px; }
.va-nav-label {
  display: block;
  color: #8c98a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 0 12px 10px;
}
.va-home-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 9px;
  color: #344255;
  font-size: 13px;
  text-decoration: none;
}
.va-home-link:hover, .va-home-link.va-active {
  background: transparent;
  color: #174e9b;
}
.va-home-link.va-active { font-weight: 700; }
.va-home-icon { font-size: 22px; line-height: 15px; color: #748297; }
.va-filter-label { padding-left: 17px; }
#nav-filter {
  display: block;
  box-sizing: border-box;
  width: calc(100% - 20px);
  margin: 0 10px 14px;
  border-radius: 8px;
  border: 1px solid #e1e6ed;
  padding: 9px 11px;
  background: #f8fafc;
  color: #26374c;
}
#nav-filter:focus { border-color: #91b8f6; outline: 2px solid #dceaff; }
#nav-sidebar .module { border: 0; margin: 0 0 14px; background: transparent; }
#nav-sidebar .module table { display: block; width: 100%; }
#nav-sidebar .module caption {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 12px 9px;
  background: transparent;
  border-left: 3px solid #287fff;
  color: #183a68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}
#nav-sidebar .module caption a,
#nav-sidebar .module caption a:link,
#nav-sidebar .module caption a:visited { color: #183a68; }
.va-sidebar-section-toggle {
  float: right;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #56708e;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 18px;
}
.va-sidebar-section-toggle:hover { color: #2169c4; background: #eef5ff; border-radius: 5px; }
#nav-sidebar .module.va-sidebar-section-collapsed { margin-bottom: 4px; }
#nav-sidebar .module.va-sidebar-section-collapsed tbody,
#nav-sidebar .module tbody[hidden] { display: none !important; }
#nav-sidebar .module tbody, #nav-sidebar .module tr { display: block; }
#nav-sidebar .module tr,
#nav-sidebar .module tr:nth-child(even),
#nav-sidebar .module th { background: transparent; }
#nav-sidebar .module th { display: block; padding: 0; width: 100%; font-weight: 400; }
#nav-sidebar .module th a {
  display: block;
  padding: 10px 12px;
  margin: 1px 5px;
  border-left: 2px solid transparent;
  color: #344255;
  background: transparent;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#nav-sidebar .module th a:hover { color: #2169c4; background: transparent; }
#nav-sidebar .module tr.current-model th a {
  border-left-color: #287fff;
  background: transparent;
  color: #174e9b;
  font-weight: 700;
}
#nav-sidebar .module tr.current-model { background: transparent; }
#nav-sidebar .module td { display: none; }
.va-mobile-link { display: inline-block; padding: 7px 10px; border-radius: 8px; background: #e8f1ff; color: #1768cb !important; font-weight: 700; }

/* Standalone phone workflow: uses the existing /static/admin/ route served by Caddy. */
.mobile-shell{min-height:100vh;max-width:620px;margin:auto;background:#fff}.mobile-shell *{box-sizing:border-box}.mobile-shell{--mobile-blue:#287fff;--mobile-ink:#15243a;--mobile-muted:#6c7d92;--mobile-paper:#fff;--mobile-soft:#f4f7fb;--mobile-line:#dce5ef;font-family:Arial,sans-serif;color:var(--mobile-ink)}body:has(.mobile-shell){margin:0;background:var(--mobile-soft)}.mobile-top{height:64px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--mobile-line)}.brand{display:flex;align-items:center;gap:8px;color:var(--mobile-ink);font-weight:700;text-decoration:none}.brand span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--mobile-blue);color:#fff;font-size:13px}.mobile-top small{color:var(--mobile-muted);max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.intro{padding:28px 20px 12px}.intro.compact{padding-bottom:4px}.eyebrow{margin:0;color:var(--mobile-muted);font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.intro h1{margin:8px 0;font-size:27px;line-height:1.15}.intro p:not(.eyebrow){margin:0;color:var(--mobile-muted);font-size:15px;line-height:1.45}.content-types{padding:8px 15px}.content-type{margin:10px 0;padding:16px;display:flex;align-items:center;gap:13px;border:1px solid var(--mobile-line);border-radius:14px;color:var(--mobile-ink);text-decoration:none}.content-type i{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#e6f0ff;color:var(--mobile-blue);font-style:normal;font-size:20px}.content-type span{display:grid;gap:4px;flex:1}.content-type small{color:var(--mobile-muted);font-size:13px}.content-type strong{font-size:24px;color:var(--mobile-muted)}.mobile-note{padding:8px 20px 25px;margin:0;color:var(--mobile-muted);font-size:13px;line-height:1.45}.back{display:block;padding:18px 20px 0;color:var(--mobile-blue);font-size:14px;text-decoration:none}.mobile-form{padding:18px 20px 36px}.field{margin:0 0 18px}.field label{display:block;margin-bottom:7px;font-size:14px;font-weight:700}.field input:not([type=file]),.field textarea{width:100%;padding:12px;border:1px solid var(--mobile-line);border-radius:10px;background:#fff;color:var(--mobile-ink);font:16px Arial,sans-serif}.field textarea{min-height:130px;resize:vertical}.field input[type=file]{width:100%;padding:12px;border:1px dashed #9bc4fb;border-radius:10px;background:#fafdff}.field small{display:block;margin-top:6px;color:var(--mobile-muted)}.primary{width:100%;margin-top:8px;border:0;border-radius:11px;padding:15px;background:var(--mobile-blue);color:#fff;font-size:16px;font-weight:700}.error{margin:7px 0 0;color:#c52935;font-size:13px}@media(min-width:621px){body:has(.mobile-shell){padding:24px}.mobile-shell{border:1px solid var(--mobile-line);border-radius:20px;overflow:hidden;box-shadow:0 12px 36px #c7d2df}}

/* App section landing pages */
.va-section-index { max-width: 1120px; }
.va-section-index > h1 { margin: 0 0 7px; }
.va-section-index > .va-muted { margin: 0 0 24px; }
.va-section-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.va-section-index-card {
  min-height: 108px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #183a68;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(18, 39, 69, .025);
}
.va-section-index-card:hover {
  border-color: #91b8f6;
  background: #f7fbff;
  color: #1766ca;
}
.va-section-index-card > span:last-child { color: #287fff; font-size: 21px; }
.va-section-index-card-disabled { color: #8995a5; }
.va-section-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 7px 12px;
  border: 1px solid #cbd9e8;
  border-radius: 7px;
  background: #fff;
  color: #2169c4;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.va-section-back:hover { background: #eef5ff; border-color: #91b8f6; color: #1454a5; }

/* Main administration screen */
.va-dashboard-content { max-width: 1180px; }
.va-dashboard-lead { margin: 0 0 22px; }
.va-dashboard-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.va-dashboard-section {
  position: relative;
  display: flex;
  min-height: 172px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  padding: 26px 58px 26px 26px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #fff;
  color: #183a68;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(18, 39, 69, .025);
}
.va-dashboard-section:hover { color: #1454a5; border-color: #8eb8f5; background: #f7fbff; }
.va-dashboard-section-title { margin-bottom: 12px; font-size: 18px; font-weight: 800; }
.va-dashboard-section-models { color: #71829a; font-size: 13px; line-height: 1.6; }
.va-dashboard-section-arrow { position: absolute; right: 24px; top: calc(50% - 13px); color: #287fff; font-size: 26px; }
@media (max-width: 980px) {
  .va-dashboard-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .va-dashboard-sections { grid-template-columns: 1fr; }
}

/* Shared page surface */
main.content { min-width: 0; background: #f3f4f6; }
#content { box-sizing: border-box; width: 100%; padding: 28px 36px 50px; }
#content h1 { color: #132236; font-size: 24px; font-weight: 700; line-height: 1.35; }
.breadcrumbs { background: #fff; border-bottom: 1px solid #e8ebef; color: #748094; }
.breadcrumbs a, .breadcrumbs a:link, .breadcrumbs a:visited { color: #2169c4; }
.module, #changelist, #content-related .module {
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(18, 39, 69, .025);
  overflow: hidden;
}
.module h2, .module caption, .inline-group h2 {
  background: #fff;
  color: #172333;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f3;
}
.module table, #result_list { background: #fff; }
thead th { background: #f7f9fb; color: #66778c; }
tbody tr:nth-child(even) { background: #fbfcfd; }
tbody tr:hover { background: #f3f8ff; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
input[type=search], textarea, select, .vTextField, .vLargeTextField {
  border: 1px solid #dce2e9;
  border-radius: 7px;
  background: #fff;
  color: #172333;
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus { outline: 2px solid #dceaff; border-color: #91b8f6; }
.button, input[type=submit], input[type=button], .submit-row input, a.button {
  border: 0;
  border-radius: 7px;
  background: #e9eef4;
  color: #253953;
  box-shadow: none;
  font-weight: 600;
  text-decoration: none;
}
.button:hover, input[type=submit]:hover, input[type=button]:hover, a.button:hover {
  background: #dfe8f2;
  color: #174e9b;
}
.button.default, input[type=submit].default, .submit-row input.default {
  background: #287fff;
  color: #fff;
}
.button.default:hover, input[type=submit].default:hover, .submit-row input.default:hover {
  background: #146ce9;
  color: #fff;
}
.submit-row { background: #fff; border: 1px solid #e7ebef; border-radius: 10px; }
.object-tools a, .object-tools a:link, .object-tools a:visited {
  border-radius: 7px;
  background: #e9eef4;
  color: #253953;
}
.object-tools a:hover { background: #dfe8f2; }
ul.messagelist li { border-radius: 8px; border: 1px solid #e7ebef; }

/* Home */
.va-dashboard #content { width: 100%; padding-top: 55px; }
.va-dashboard-content { max-width: 1340px; margin: 0 auto; }
.va-dashboard-content h1 { margin: 0 0 24px; }
.va-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.va-dashboard-main, .va-dashboard-aside { display: grid; gap: 16px; min-width: 0; }
.va-card { background: #fff; border-radius: 10px; padding: 22px; }
.va-card h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 18px; font-weight: 700; }
.va-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.va-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; }
.va-muted { color: #8190a2; }
.va-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 13px; padding: 18px; margin-top: 12px; border: 1px solid #e4e9ef; border-radius: 8px; }
.va-step-number { display: flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: #2786ff; color: #fff; font-size: 13px; font-weight: 700; }
.va-step p { color: #748297; }
.va-step .button, .va-accounts-card .button { display: inline-block; padding: 10px 13px; margin-top: 2px; font-size: 12px; }
.va-step-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.va-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.va-link-grid a { display: flex; justify-content: space-between; align-items: center; padding: 15px; border: 1px solid #e6ebf0; border-radius: 8px; color: #344255; font-weight: 600; text-decoration: none; }
.va-link-grid a:hover { background: #f2f7ff; border-color: #cddff7; color: #2169c4; }
.va-accounts-card { text-align: center; }
.va-accounts-card h2 { text-align: left; }
.va-accounts-symbol { margin: 16px auto 8px; color: #a7b1bc; font-size: 42px; line-height: 1; }
.va-accounts-card p:not(.va-muted) { font-weight: 700; }
.va-quick-card a { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #edf0f3; text-decoration: none; }

/* Keep Django's sign-in form compact; the workspace's full-height main is for admin pages. */
.login #container {
  width: min(420px, calc(100% - 32px));
  min-width: 0;
  margin: 80px auto;
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(18, 39, 69, .07);
}
.login #container > .main { min-height: 0; }
.login #header { min-height: 60px; padding: 12px 20px; justify-content: center; }
.login main.content { background: #fff; }
.login #content { padding: 22px 24px 26px; }
.login .submit-row { border: 0; padding-top: 12px; }
.login .submit-row input { padding: 10px 22px; }

.va-operation-backdrop[hidden] { display: none; }
.va-operation-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: rgba(18, 32, 52, .46); padding: 20px; }
.va-operation-card { width: min(520px, 100%); box-sizing: border-box; padding: 26px; border-radius: 14px; background: #fff; color: #172436; box-shadow: 0 20px 65px rgba(17, 30, 49, .23); }
.va-operation-card h2 { margin: 0 0 14px; color: #172436; font-size: 22px; }
.va-operation-stage { margin: 0 0 14px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.va-operation-detail { min-height: 35px; margin: 10px 0 16px; color: #66768a; font-size: 12px; line-height: 1.4; }
.va-operation-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e8eef5; }
.va-operation-fill { width: 35%; height: 100%; border-radius: inherit; background: #277ef0; transition: width .2s ease; }
.va-operation-indeterminate .va-operation-fill { animation: va-operation-slide 1.5s ease-in-out infinite alternate; }
.va-operation-error .va-operation-fill { background: #d84646; }
.va-operation-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
@keyframes va-operation-slide { from { transform: translateX(-100%); } to { transform: translateX(285%); } }

@media (max-width: 1100px) {
  .va-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .va-dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  #header { min-height: 60px; padding: 10px 16px; gap: 10px; }
  #site-name { font-size: 15px; }
  #user-tools { gap: 8px; flex-wrap: wrap; }
  #content, .va-dashboard #content { padding: 22px 16px 35px; }
  .va-dashboard-aside, .va-link-grid { grid-template-columns: 1fr; }
  #nav-sidebar { position: fixed; top: 60px; bottom: 0; max-height: calc(100vh - 60px); z-index: 30; }
  .main.shifted > #nav-sidebar { margin-left: 0; }
}
