
    :root {
      --f1: "Geologica", sans-serif;
      --f2: "Commissioner", sans-serif;
      --bg: #eef4f9; --surface: #ffffff; --surface-2: #f0f5fa; --surface-3: #e4edf5;
      --border: rgba(43,143,216,.15); --border-2: rgba(43,143,216,.25);
      --text: #1a2e3f; --text-2: #4f6e88;
      --primary: #2b8fd8; --primary-soft: rgba(43,143,216,.12); --primary-glow: rgba(43,143,216,.25);
      --teal: #1a9b7a; --teal-soft: rgba(26,155,122,.1);
      --red: #c93030; --red-soft: rgba(201,48,48,.1); --operator-error-text:#b42318;
      --green: #1a8f5a; --green-soft: rgba(26,143,90,.1);
      --shadow: 0 2px 24px rgba(43,143,216,.1);
      color-scheme: light;
    }
    html[data-theme="dark"] {
      --bg:#0b0f18; --surface:#131820; --surface-2:#1a2030; --surface-3:#222a3a;
      --border:rgba(139,154,176,.13); --border-2:rgba(139,154,176,.22);
      --text:#e8edf4; --text-2:#8a9bb8; --operator-error-text:#ffb4ab;
      --shadow:0 4px 32px rgba(0,0,0,.45);
      --shadow-sm:0 2px 12px rgba(0,0,0,.3);
      color-scheme:dark;
    }
    /* ── Премиум-светлая тема ── */
    html[data-theme="paper"] {
      --f1:"Geologica",sans-serif; --f2:"Commissioner",sans-serif;
      --bg:#eef2fb; --surface:#ffffff; --surface-2:#f4f7fe; --surface-3:#eaf0fb;
      --border:rgba(99,120,170,.16); --border-2:rgba(99,120,170,.28);
      --text:#1b2440; --text-2:#5e6c8f;
      --primary:#4f6ef7; --primary-soft:rgba(79,110,247,.10); --primary-glow:rgba(79,110,247,.30);
      --teal:#0fae8e; --teal-soft:rgba(15,174,142,.10);
      --red:#e5484d; --red-soft:rgba(229,72,77,.10);
      --green:#16a36a; --green-soft:rgba(22,163,106,.10);
      --shadow:0 10px 40px -12px rgba(46,64,128,.22), 0 2px 8px -2px rgba(46,64,128,.10);
      --shadow-sm:0 4px 14px -6px rgba(46,64,128,.18);
      color-scheme:light;
    }

*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 var(--f2)}
button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button:disabled{opacity:.55;cursor:default}
button,a,input,select,textarea{outline-offset:3px}a{color:var(--primary)}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid var(--border-2);border-radius:8px;background:var(--surface);color:var(--text);text-decoration:none;cursor:pointer}
.btn.primary{background:var(--action-primary,#176ca4);color:#fff;border-color:transparent}
input,select,textarea{background:var(--surface);color:var(--text);border:1px solid var(--border-2);border-radius:8px;padding:10px 12px;min-height:44px;max-width:100%}
textarea{resize:vertical}h1,h2,h3,h4{font-family:var(--f1);line-height:1.3}h1{font-size:26px;margin:0}h2{font-size:22px}h3{font-size:18px}
.operator-top{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:20px 32px;border-bottom:1px solid var(--border);background:var(--surface)}
.operator-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;max-width:1360px;margin:auto;padding:28px 32px}
.operator-nav{display:flex;flex-direction:column;gap:12px;align-items:stretch}.operator-nav [aria-current=page]{background:var(--primary-soft);border-color:var(--primary);font-weight:600}
.operator-content{min-width:0}.operator-scope{color:var(--text-2);max-width:76ch}.operator-list{display:grid;gap:12px;margin:20px 0}.operator-row{padding:16px 0;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:16px}
.operator-row p{margin:4px 0}.operator-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.operator-section{margin:24px 0;padding:20px 0;border-top:1px solid var(--border)}
.operator-section label{display:grid;gap:8px;margin:16px 0}.operator-message{padding:12px 0;border-bottom:1px solid var(--border);white-space:pre-wrap;overflow-wrap:anywhere}.operator-notice{color:var(--text-2);max-width:76ch}
.operator-state{padding:14px 0;min-height:44px}.operator-error{color:var(--red)}.operator-caption{margin:0;color:var(--text-2)}[hidden]{display:none!important}
@media(max-width:800px){.operator-layout{grid-template-columns:1fr;padding:20px}.operator-nav{flex-direction:row;flex-wrap:wrap}.operator-top{padding:16px;align-items:flex-start;flex-wrap:wrap}}

.operator-section .application-workflow label:has(>input[type=checkbox]){display:flex;align-items:center;gap:10px}.operator-section .application-workflow input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0;flex:0 0 18px;accent-color:var(--primary)}
/* Explicit case creation follows the existing workbench controls and themes. */
.staff-create-form { display:grid; gap:1rem; max-width:70rem; }
.staff-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.5rem; }
.staff-create-group { display:grid; align-content:start; gap:.75rem; min-width:0; }
.operator-section .staff-create-form label { display:grid; gap:.4rem; min-width:0; margin:0; }
.staff-create-form select,.staff-create-form textarea,.staff-create-form input { width:100%; min-width:0; box-sizing:border-box; }
.staff-create-status { min-height:2.5rem; max-width:75ch; }
.staff-create-form .primary { color:#fff; background:#1763b8; border-color:#1763b8; }
.staff-create-form .primary:hover:enabled { background:#12539e; }
.staff-create-form .primary:disabled { opacity:.55; }
.staff-create-form [aria-busy=true],.staff-create-loading .staff-create-group { opacity:.7; }
.staff-create-form :focus-visible { outline:2px solid var(--accent,#1763b8); outline-offset:3px; }
.staff-create-form details > .staff-create-grid { margin-top:1rem; }
@media(max-width:760px){.staff-create-grid{grid-template-columns:minmax(0,1fr);}}

#operatorView > label { display:grid; gap:8px; margin:16px 0 8px; }
#operatorCreateActions { margin-block-end:12px; }
html body.operator-ui :is(.operator-error,.internal-case-message[role=alert]) { color:var(--operator-error-text,var(--red)); }
