/* ===========================================================================
   VYNAKRO WORKSPACE — STYLESHEET (td134: the Vynakro Workspace design, Main.dc.html, owner 2026-10-06)
   ---------------------------------------------------------------------------
   The operator-portal stylesheet is still imported for the pieces the older
   pages use (page-header, metric-card, table-wrap, alerts). Everything below
   it is the design: its colours, fonts, shell, and every class its pages use
   (.card .card-h .card-b .btn .btn-p .btn-g .btn-off .fields .field .input
   .tbl .num .pill .choice .stat .step .stepno .drop .filerow .kv .tip
   .month-h .month-btn .pager .scroll .tabs .tab .page-h .dash-grid
   .tool-grid .ws-grid), so a page is written in the design's own markup.
   =========================================================================== */

@import url("/admin/assets/admin.css");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@600;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --bg: #EEF1F5;            /* page ground */
  --surface: #FFFFFF;       /* cards */
  --surface-2: #F6F8FB;
  --border: #D5DCE6;        /* card border */
  --border-2: #B9C4D4;
  --text: #0B1B33;
  --text-1: #0B1B33;
  --text-2: #0B1B33;
  --text-3: #556179;
  --text-4: #7F93B2;
  --navy-800: #0B1B33;
  --navy-700: #1660D6;
  --blue-500: #1667E0;      /* main blue (buttons) */
  --vk-top: #07142A;        /* top bar */
  --vk-side: #0A1B36;       /* side menu */
  --vk-on: #163A6E;         /* active menu item */
  --vk-blue: #1667E0;
  --vk-blue-dark: #0F54C2;
  --vk-link: #1660D6;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 10px;
  --gradient-bar: #0A1B36;
}

html, body { background: var(--bg); }
body, .admin-body { font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; color: var(--text); font-size: 14px; }
a { color: var(--vk-link); }
a:hover { color: #0C3F94; }
h1, h2, h3, .page-title { color: var(--text); }

/* ─── Shell ───────────────────────────────────────────────────────────── */
.app-topbar { height: 56px; background: var(--vk-top); border-bottom: 1px solid #1B2C48; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 100; }
/* td145 (owner 2026-10-07, overrides Corrections 1 item 12): the logo exactly as the live site's header draws it (frontend/assets/vynakro.css
   .brand and .brand-mark) — the mark 30 px square with 5 px corners and no tile behind it, 10 px gap, "Vynakro" in the site's text face,
   700, 17 px, -0.015em, white */
.app-topbar .brand { width: auto; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
.app-topbar .brand .logo { width: 30px; height: 30px; border-radius: 5px; object-fit: contain; background: transparent; flex: 0 0 auto; }
.app-topbar .brand .btext { font-family: 'Segoe UI Variable Text', 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.015em; color: #FFFFFF; }
/* the sign-in card: the same mark and word (the card is white, so the word is the site's navy) — never the old letter on a tile */
.login-card .brand .logo { width: 30px; height: 30px; border-radius: 5px; background: url('/assets/logo-mark.png') center / contain no-repeat; color: transparent; font-size: 0; }
.login-card .brand .btext { font-family: 'Segoe UI Variable Text', 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.015em; color: #002650; }
.app-topbar .brand .vk-sep { width: 1px; height: 22px; background: #2A3D5E; }
.ws-switch { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid #2A3D5E; background: transparent; color: #D7DEE8; font: inherit; font-size: 14px; max-width: 260px; }
.ws-switch.badge { background: transparent; }
select.ws-switch { appearance: none; padding-right: 28px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D7DEE8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; }
select.ws-switch option { color: #0B1B33; background: #fff; }
.topbar-spacer { display: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 10px; color: #FFFFFF; font-size: 14px; }
.topbar-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: #1E7BF2; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.topbar-logout { height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid #3A4E70; background: transparent; color: #FFFFFF; font: inherit; font-size: 13px; cursor: pointer; }
.topbar-logout:hover { background: rgba(255,255,255,0.06); }

#app-shell { display: flex; flex-wrap: wrap; align-items: stretch; min-height: calc(100vh - 56px); width: 100%; }
#sidebar { display: flex; flex: 1 1 228px; max-width: 260px; min-width: 0; width: auto; flex-direction: column; gap: 18px; padding: 18px 12px; background: var(--vk-side); border-right: 0; box-sizing: border-box; overflow: visible; }
#content { display: block; flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; box-sizing: border-box; background: var(--bg); }
#content > .vk-page { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label, .sidebar-label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; color: #7F93B2; text-transform: uppercase; margin: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #C3CDDC; font: inherit; font-size: 14px; text-align: left; cursor: pointer; white-space: nowrap; text-decoration: none; border-left: 0; margin: 0; }
.nav-item:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); border-left: 0; }
.nav-item.active, .nav-item.on { background: var(--vk-on); color: #FFFFFF; font-weight: 500; border-left: 0; }
.nav-item .icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: 1; font-size: 14px; }
.nav-item .icon svg { width: 18px; height: 18px; }
.nav-item .nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; box-sizing: border-box; border-radius: 11px; background: #1E7BF2; color: #FFFFFF; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.nav-item .nav-count[hidden] { display: none; }
@media (max-width: 760px) {
  #sidebar { max-width: none; flex-basis: 100%; flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; }
  .nav-group { flex-direction: row; }
  .nav-label, .sidebar-label { display: none; }
  #content { padding: 20px 16px 40px; }
  .ws-switch, .app-topbar .brand .vk-sep { display: none; }
}

/* ─── Page header and layout grids ────────────────────────────────────── */
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-h h1 { margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 30px; font-weight: 700; }
.page-h p { margin: 4px 0 0; font-size: 14px; color: #556179; max-width: 720px; }
.page-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 30px; font-weight: 700; letter-spacing: 0; }
.dash-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.tool-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.ws-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1100px) { .tool-grid, .ws-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 980px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* ─── Cards ───────────────────────────────────────────────────────────── */
.card { background: #FFFFFF; border: 1px solid #D5DCE6; border-radius: 10px; overflow: hidden; padding: 0; box-shadow: none; margin: 0; }
div.card:not(:has(> .card-h)):not(:has(> .card-b)) { padding: 18px 20px; }   /* the older pages' cards keep their padding until rebuilt; the design's cards are <section> (td136) */
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #E3E8EF; }
.card-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card-b { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.muted { color: #556179; font-size: 13px; margin: 0; }
.kv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 12px 20px; border-bottom: 1px solid #EEF1F5; }
.kv dd { margin: 0; font-weight: 500; }
.stat { padding: 12px 14px; border-radius: 8px; background: #F6F8FB; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 26px; font-weight: 500; }
.step { flex: 0 0 auto; width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%; border: 2px solid #C0661B; color: #8A4510; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.stepno { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; color: #FFFFFF; background: #1667E0; border-radius: 4px; padding: 2px 7px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 16px; border: 1.5px dashed #A9B5C7; border-radius: 10px; background: #F8FAFC; text-align: center; }
.filerow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #B9DCC7; border-radius: 10px; background: #EEF8F2; font-size: 14px; }
.notice { padding: 10px 12px; border-radius: 8px; background: #FBEBDD; color: #7A3D0C; font-size: 13px; }   /* td143: a message on the page (the tools' errors and reading notes) */
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid #B9C4D4; border-radius: 10px; cursor: pointer; background: #FFFFFF; }
.choice:hover { border-color: #1667E0; }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: #1667E0; }
.choice.on { border: 2px solid #1667E0; padding: 15px; background: #F2F7FF; }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn { height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; border: 1px solid #B9C4D4; background: #FFFFFF; color: #0B1B33; box-shadow: none; }
.btn:hover { text-decoration: none; box-shadow: none; }
.btn:active { transform: none; }
.btn-p, .btn-primary { border: 0; background: #1667E0; color: #FFFFFF; font-weight: 600; }
.btn-p:hover, .btn-primary:hover { background: #0F54C2; box-shadow: none; }
.btn-g, .btn-ghost { border: 1px solid #B9C4D4; background: #FFFFFF; color: #0B1B33; }
.btn-g:hover, .btn-ghost:hover { background: #E6ECF5; border-color: #B9C4D4; }
.btn:disabled, .btn-off, .btn-off:hover { background: #E3E8EF; color: #6B7689; border: 0; cursor: not-allowed; }
.btn-danger { border: 0; background: #B4231A; color: #FFFFFF; font-weight: 600; }   /* td144: Close My Account, Close Organization */
.btn-danger:hover { background: #8E1F17; }
.btn-s, .btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-gold { background: #1667E0; color: #fff; }

/* ─── Fields ──────────────────────────────────────────────────────────── */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 13px; font-weight: 600; color: #0B1B33; }
.input { height: 44px; box-sizing: border-box; width: 100%; padding: 0 12px; border: 1px solid #B9C4D4; border-radius: 8px; background: #FFFFFF; color: #0B1B33; font: inherit; font-size: 14px; }
.input:focus { outline: 2px solid #1667E0; outline-offset: 1px; border-color: #1667E0; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input.ro, span.input { display: flex; align-items: center; background: #F6F8FB; border-color: #E3E8EF; }
.req { color: #B4231A; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 400; }
.check input { width: 18px; height: 18px; accent-color: #1667E0; }

/* ─── Tables, pills, folders, pager, tabs ─────────────────────────────── */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 600; color: #556179; background: #F6F8FB; border-bottom: 1px solid #E3E8EF; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #EEF1F5; white-space: nowrap; }
.num { text-align: right; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.pill-draft { background: #FBEBDD; color: #7A3D0C; }
.pill-added, .pill-green { background: #DDF0E6; color: #145C36; }
.pill-wait, .pill-blue { background: #E2EAF6; color: #1F3A66; }
.pill-declined, .pill-red { background: #FBE3E1; color: #8E1F17; }
.pill-gray { background: #EEF1F5; color: #556179; }
.pill-yellow { background: #FBEBDD; color: #7A3D0C; }
.month-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 12px 20px; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: #1F3A66; background: #F2F7FF; border-bottom: 1px solid #E3E8EF; }
.month-btn { width: 100%; border: 0; border-bottom: 1px solid #E3E8EF; font-family: inherit; text-align: left; cursor: pointer; min-height: 44px; align-items: center; }
.month-btn:hover { background: #E8F0FC; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; font-size: 13px; color: #556179; border-top: 1px solid #EEF1F5; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #D5DCE6; overflow-x: auto; }
.tab { height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #556179; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab:hover { color: #0B1B33; }
.tab.on { color: #0B1B33; border-bottom-color: #1667E0; font-weight: 600; }
a.tab { display: inline-flex; align-items: center; text-decoration: none; }   /* td144: the Settings section tabs are links */
.tab:disabled { color: #9AA4B5; cursor: not-allowed; }
.tip { position: absolute; bottom: calc(100% + 10px); right: 0; width: max-content; max-width: 280px; padding: 10px 14px; border-radius: 8px; background: #0B1B33; color: #FFFFFF; font-size: 13px; font-weight: 500; box-shadow: 0 4px 14px rgba(11,27,51,0.25); z-index: 2; }
.gate { position: relative; display: inline-flex; }
.status-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: #DDF0E6; color: #145C36; font-size: 14px; }
.status-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: #FBEBDD; color: #7A3D0C; font-size: 14px; }
.status-info { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: #E2EAF6; color: #1F3A66; font-size: 14px; }
.status-bad { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: #FBE3E1; color: #8E1F17; font-size: 14px; }

/* ─── Folders (history piece) ─────────────────────────────────────────── */
.fold-group { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 20px; border: 0; border-top: 1px solid #E3E8EF; background: #FFFFFF; color: #556179; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-align: left; cursor: pointer; }
.fold-group .hint { margin-left: auto; font-weight: 400; letter-spacing: 0; }
.fold-row { border-top: 1px solid #EEF1F5; }
.fold-btn { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border: 0; background: #FFFFFF; color: #0B1B33; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fold-btn.open { background: #F2F7FF; }
.fold-btn.sub { padding-left: 48px; }
.fold-btn b { font-weight: 600; }
.fold-btn .yr { color: #556179; }
.fold-body { padding: 0 20px 16px 20px; background: #F6F8FB; }
.fold-body.sub { padding-left: 48px; }
.fold-body .box { overflow-x: auto; background: #FFFFFF; border: 1px solid #E3E8EF; border-radius: 8px; }
.fold-body .tbl { min-width: 560px; font-size: 13px; }
.fold-body .tbl th { padding: 10px 14px; }
.fold-body .pager { padding: 10px 0 0; border-top: 0; }

/* ─── Older pages (until each is rebuilt to the design) ───────────────── */
.page-header { margin-bottom: 0; }
.page-sub { color: #556179; }
.metric-card { border: 1px solid #D5DCE6; box-shadow: none; }
.table-wrap { border: 1px solid #D5DCE6; box-shadow: none; }

/* ─── td135: the design has no capitals in pills, table headings or the workspace name (the operator stylesheet's uppercase
       rules for .pill, thead th and .app-topbar .brand .badge are switched off here) ─────────────────────────────────────── */
.pill { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
thead th, .tbl th { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: #556179; }
.app-topbar .brand .ws-switch, .app-topbar .brand .ws-switch.badge { background: transparent; color: #D7DEE8; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; padding: 0 10px; border-radius: 6px; height: 36px; border: 1px solid #2A3D5E; display: flex; align-items: center; }
.app-topbar .brand select.ws-switch { padding-right: 28px; }

/* td136: at phone width the workspace name leaves the top bar, as the design has it (td135's top-bar rule outranked the earlier one) */
@media (max-width: 760px) { .app-topbar .brand .ws-switch, .app-topbar .brand .ws-switch.badge, .app-topbar .brand .vk-sep { display: none; } .topbar-logout { white-space: nowrap; } }
