/* Nikea Next · platform rollout 1.1 · 20 October 2026
   Uses real existing templates and server actions. Loaded after app.css and
   nikea-next.css. No schema or form logic changes. */
.nd-shell {
  --blue:#008dff; --bg:var(--nd-bg); --surface:var(--nd-surface);
  --surface-2:#eff5fc; --border:var(--nd-line); --text:var(--nd-ink);
  --text-dim:var(--nd-muted); --text-faint:var(--nd-quiet);
  --radius:14px; --radius-sm:9px;
  --shadow-card:var(--nd-shadow);
  font-size:var(--fs); line-height:1.5;
}
body:has(.nd-shell){background:var(--nd-bg);font-family:var(--nd-font);color:var(--nd-ink)}
.nd-shell .main {max-width:none;}
.nd-shell .main :is(h1,h2,h3,.display){font-family:var(--nd-font);letter-spacing:-.028em;}
.nd-shell .main h1{font-weight:750;color:var(--nd-ink)}
.nd-shell .main .display{font-size:clamp(25px,2.7vw,34px);font-weight:750;line-height:1.16}
.nd-shell .main h2{font-weight:725;color:var(--nd-ink)}
.nd-shell .main .hint{color:var(--nd-muted)}
/* Shared navigation from the accepted editorial work screen. */
.nd-shell .nav-primary::before {content:'МОЯ РАБОТА';}
.nd-shell .sidebar .nav-item{transition:background .14s ease,color .14s ease;}
.nd-shell .nav-foot{min-height:90px}
/* Top bar is real: the search submits to the existing /books?search= route. */
.nd-global-topbar{height:82px;display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1700px;margin:0 auto 7px;padding:0 4px;}
.nd-global-context{font-size:12px;font-weight:650;letter-spacing:.01em;color:#91a0b8;display:flex;align-items:center;gap:9px;white-space:nowrap;}
.nd-global-context-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--nd-accent);box-shadow:0 0 0 4px #e6f5ff;}
.nd-global-context-separator{color:#c4cfe0;font-weight:400;}
.nd-global-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;}
.nd-global-search{width:clamp(185px,29vw,365px);height:44px;display:flex;align-items:center;gap:9px;background:var(--nd-surface);border:1px solid var(--nd-line);border-radius:11px;padding:0 12px;box-shadow:var(--nd-shadow);}
.nd-global-search svg{width:18px;height:18px;flex-shrink:0;color:#9baac5;}
.nd-shell .nd-global-search input[type="search"]{width:100%;height:100%;border:0!important;outline:0;background:transparent!important;box-shadow:none!important;color:var(--nd-ink);border-radius:0;font-size:13px;padding:0;}
.nd-global-search input::placeholder{color:#a1aec3;}
.nd-global-assistant,.nd-global-user{height:44px;width:44px;flex:0 0 44px;border:1px solid var(--nd-line);background:var(--nd-surface);border-radius:11px;display:grid;place-items:center;box-shadow:var(--nd-shadow);font-size:18px;color:var(--nd-accent)!important;cursor:pointer;font-family:inherit;}
.nd-global-user{background:#eaf6ff;border-color:#e3f1fd;font-size:14px;font-weight:750;}
.nd-global-assistant:hover,.nd-global-user:hover{background:#eaf6ff;}
/* Shared surfaces: retain all legacy semantic classes and JS selectors. */
.nd-shell :is(.card,.panel,.planning-panel,.program-section,.editorial-section){border-color:var(--nd-line);border-radius:var(--nd-radius);box-shadow:var(--nd-shadow);background:var(--nd-surface);}
.nd-shell :is(.card,.panel) h2{line-height:1.3;}
.nd-shell .page-head{align-items:center;gap:16px;margin:4px 0 23px;}
.nd-shell .page-head h1{font-size:clamp(24px,2.5vw,32px);letter-spacing:-.04em;line-height:1.2;}
.nd-shell :is(.btn,button[type="submit"],.button){border-radius:10px;font-family:var(--nd-font);font-weight:650;letter-spacing:0;min-height:38px;}
.nd-shell .btn:not(.ghost):not(.secondary):not(.danger):not(.warn):not(.red):not(.negative):not(.destructive){background:var(--nd-accent);border-color:var(--nd-accent);color:white;}
.nd-shell .btn:not(.ghost):not(.secondary):not(.danger):not(.warn):not(.red):not(.negative):not(.destructive):hover{background:var(--nd-accent-hover);border-color:var(--nd-accent-hover);}
.nd-shell :is(.btn.ghost,.btn.secondary,button.ghost){background:var(--nd-surface);border-color:var(--nd-line);color:#587095;}
.nd-shell :is(.btn.ghost,.btn.secondary,button.ghost):hover{background:#f2f9ff;border-color:#bcdcff;color:#0077df;}
.nd-shell :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){border-radius:9px;border-color:var(--nd-line);font-family:var(--nd-font);}
.nd-shell :is(input,select,textarea,button,a,summary):focus-visible{outline:3px solid #69bbff;outline-offset:2px;}
.nd-shell :is(.tabs,.pay-tabs,.edc-tabs){border-color:var(--nd-line);}
.nd-shell :is(.tab,.edc-tab){transition:color .12s ease,border-color .12s ease;}
.nd-shell :is(.tab.active,.edc-tab.is-active){color:var(--nd-accent);border-bottom-color:var(--nd-accent);}
.nd-shell table.data{border-collapse:separate;border-spacing:0;background:var(--nd-surface);border-radius:12px;}
.nd-shell table.data th{color:#8a9bb5;font-weight:650;background:#f8fafd;border-bottom:1px solid var(--nd-line);}
.nd-shell table.data td{border-bottom-color:var(--nd-line);}
.nd-shell table.data tr:hover td{background:#f6faff;}
.nd-shell :is(.empty,.edc-empty){border-radius:14px;color:var(--nd-muted);}
/* Coordinator: status-first, real actionable counts, no fake dashboard stats. */
.nd-shell .edc-head{align-items:center;margin:2px 0 18px;}
.nd-shell .edc-head h1{font-size:clamp(27px,2.8vw,36px);margin:4px 0 7px;}
.nd-shell .edc-eyebrow{color:#7e97b6;font-weight:600;letter-spacing:.02em;}
.nd-shell .edc-shortcuts{border:1px solid var(--nd-line);background:#fff;border-radius:10px;padding:10px 14px;box-shadow:var(--nd-shadow);}
.nd-shell .edc-shortcuts summary{font-size:12px;color:#617a9c;cursor:pointer;}
.nd-shell .edc-overview{background:transparent;border:0;margin:0 0 13px;}
.nd-shell .edc-overview>summary{font-size:11px;letter-spacing:.03em;color:#879ab6;border:0!important;padding:7px 2px 11px;}
.nd-shell .edc-overview>summary span{font-size:11px;letter-spacing:0;}
.nd-shell .edc-overview .edc-kpis{margin:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.nd-shell .edc-kpi{position:relative;background:#fff;border:1px solid var(--nd-line);border-radius:14px;padding:20px 18px!important;box-shadow:var(--nd-shadow);gap:8px;min-height:140px;justify-content:center;transition:transform .15s ease,border-color .15s ease;}
.nd-shell .edc-kpi:hover{transform:translateY(-2px);border-color:#b9dfff;}
.nd-shell .edc-kpi strong{order:0;font-size:34px!important;font-weight:750;letter-spacing:-.04em;color:var(--nd-ink);line-height:1.1;}
.nd-shell .edc-kpi>span{order:1;font-size:13px;font-weight:650;color:#657896;}
.nd-shell .edc-kpi small{order:2;font-size:11px;color:#a2aec2;}
.nd-coordinator-actions{margin:14px 0 24px;background:var(--nd-surface);border:1px solid var(--nd-line);border-radius:16px;box-shadow:var(--nd-shadow);padding:22px 19px 17px;}
.nd-coordinator-actions>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 15px;}
.nd-coordinator-actions>header h2{font-size:23px;font-weight:750;margin:0;letter-spacing:-.035em;}
.nd-coordinator-actions>header p{font-size:12px;color:var(--nd-muted);margin:0;}
.nd-coordinator-actions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.nd-coordinator-action{min-width:0;border:1px solid var(--nd-line);border-radius:13px;padding:16px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;color:var(--nd-ink)!important;background:#fff;transition:border-color .14s ease,transform .14s ease;}
.nd-coordinator-action:hover{transform:translateY(-2px);border-color:#bedfff;box-shadow:var(--nd-shadow);}
.nd-action-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:19px;font-weight:650;}
.nd-action-blue{background:#e9f5ff;color:#008dff;}.nd-action-rose{background:#fff0f2;color:#e94c67;}
.nd-action-purple{background:#f4ecff;color:#9555e9;}.nd-action-amber{background:#fff5e8;color:#d88717;}
.nd-coordinator-action .nd-action-number{font-size:12px;font-weight:750;color:var(--nd-accent);background:#edf7ff;border-radius:24px;padding:3px 9px;}
.nd-coordinator-action>strong{font-size:14px;line-height:1.25;font-weight:730;}
.nd-coordinator-action>span:not(.nd-action-number):not(.nd-action-icon){font-size:12px;line-height:1.5;color:var(--nd-muted);min-height:37px;}
.nd-coordinator-action>b{font-size:12px;font-weight:700;color:var(--nd-accent);margin-top:auto;}
.nd-shell .edc-tabs{gap:4px;border-bottom:1px solid var(--nd-line);margin:0 0 20px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;}
.nd-shell .edc-tab{white-space:nowrap;padding:12px 15px 13px;color:#8292ae;border-bottom-width:2px;}
.nd-shell .edc-tab.is-active{color:var(--nd-accent);background:#f2faff;border-color:var(--nd-accent);border-radius:9px 9px 0 0;}
.nd-shell .edc-workbar{background:#fff;border:1px solid var(--nd-line);border-radius:15px;padding:20px;align-items:center;margin-bottom:12px;box-shadow:var(--nd-shadow);}
.nd-shell .edc-workbar h2{font-size:22px;}
.nd-shell .edc-filter label{color:#8497b2;}
.nd-shell .edc-filter :is(input,select){background:#fbfdff;min-height:39px;}
.nd-shell .edc-priority{gap:8px;margin:14px 0;}
.nd-shell .edc-priority-link{border-radius:8px;background:#fff;padding:9px 13px;}
.nd-shell .edc-priority-link.is-active{border-color:#a9d7ff;background:#e9f6ff;color:#007ce9;}
.nd-shell .edc-list{border-color:var(--nd-line);border-radius:15px;box-shadow:var(--nd-shadow);}
.nd-shell .edc-list-head{background:#fafcff;padding:16px 22px;}
.nd-shell .edc-issue{padding:20px;gap:15px;}
.nd-shell .edc-issue-marker{height:52px;width:4px;border-radius:5px;}
.nd-shell .edc-issue-body h3{font-size:16px;margin:3px 0 5px;font-weight:725;}
.nd-shell .edc-issue-body .edc-kind{background:#f1f5fa;color:#7186a3;padding:3px 8px;border-radius:8px;}
.nd-shell .edc-level{font-size:12px;}
.nd-shell .edc-open{color:var(--nd-accent);border:1px solid var(--nd-line);border-radius:9px;padding:9px 13px;background:#fff;font-size:12px;font-weight:700;}
.nd-shell .edc-open:hover{background:#eff8ff;}
.nd-shell .edc-people .edc-person,.nd-shell .edc-money>div{border-color:var(--nd-line);box-shadow:var(--nd-shadow);border-radius:14px;}
/* Payments: consistent visual grammar, all server-side transitions untouched. */
.nd-shell .pay-desk{max-width:1500px;margin:0 auto;}
.nd-shell .pay-head{margin:0 0 20px;}
.nd-shell .pay-head h1{font-size:clamp(27px,2.8vw,35px);}
.nd-shell .pay-tabs{background:#fff;border:1px solid var(--nd-line);border-radius:13px;padding:6px 9px;gap:4px;margin-bottom:13px;box-shadow:var(--nd-shadow);}
.nd-shell .pay-tabs .tab{border-radius:8px;white-space:nowrap;padding:10px 13px;}
.nd-shell .pay-tabs .tab.active{background:#eaf6ff;}
.nd-shell .pay-overview{gap:12px;margin:17px 0 22px;}
.nd-shell .pay-overview>div{border-color:var(--nd-line);box-shadow:var(--nd-shadow);border-radius:14px;padding:19px;}
.nd-shell .pay-overview strong{font-size:29px;font-weight:750;letter-spacing:-.04em;}
.nd-shell .pay-row{border-color:var(--nd-line);border-radius:14px;box-shadow:var(--nd-shadow);padding:19px;}
.nd-shell .pay-row-title strong{font-size:16px;font-weight:700;}
.nd-shell .pay-row-title a{color:var(--nd-ink);}
.nd-shell .pay-row-title a:hover{color:var(--nd-accent);}
.nd-shell .pay-row-meta{color:#798ca6;}
.nd-shell .pay-focused{border-color:var(--nd-line);border-radius:14px;box-shadow:var(--nd-shadow);}
.nd-shell .pay-helper,.nd-shell .pay-method{background:#f3f8fe;border:1px solid var(--nd-line);border-radius:11px;padding:15px;}
/* Dark support follows the user's existing preference, not a forced light theme. */
:root[data-theme="dark"] .nd-shell{--bg:var(--nd-bg);--surface:var(--nd-surface);--surface-2:#263448;--border:var(--nd-line);--text:var(--nd-ink);--text-dim:var(--nd-muted);}
:root[data-theme="dark"] .nd-global-context-dot{box-shadow:0 0 0 4px #24425e;}
:root[data-theme="dark"] .nd-global-search,:root[data-theme="dark"] .nd-global-assistant,:root[data-theme="dark"] .nd-global-user,
:root[data-theme="dark"] .nd-shell :is(.edc-workbar,.edc-list,.edc-kpi,.nd-coordinator-actions,.nd-coordinator-action,.pay-tabs,.pay-overview>div,.pay-row,.edc-priority-link,.edc-open){background:var(--nd-surface);color:var(--nd-ink)!important;border-color:var(--nd-line);}
:root[data-theme="dark"] .nd-shell .edc-list-head{background:#223147;}
:root[data-theme="dark"] .nd-shell .pay-helper,:root[data-theme="dark"] .nd-shell .pay-method{background:#24374b;}
@media (max-width:1250px){
 .nd-coordinator-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .nd-shell .edc-overview .edc-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:860px){
 .nd-global-topbar{height:65px;padding-top:6px;margin-bottom:4px;}
 .nd-shell .edc-workbar{flex-direction:column;align-items:stretch;}
 .nd-shell .edc-filter{justify-content:stretch;}
}
@media (max-width:620px){
 .nd-global-context{font-size:11px;white-space:normal;}
 .nd-global-context-separator{display:none;}
 .nd-global-topbar{height:59px;}
 .nd-global-search{display:none;}
 .nd-global-assistant,.nd-global-user{height:37px;width:37px;flex-basis:37px;}
 .nd-shell .main>.page-head h1,.nd-shell .main h1.display{font-size:27px;}
 .nd-shell .edc-overview .edc-kpis{gap:8px;}
 .nd-shell .edc-kpi{min-height:135px;padding:14px 12px!important;}
 .nd-shell .edc-kpi strong{font-size:29px!important;}
 .nd-coordinator-actions{padding:15px 12px;margin:12px 0 17px;}
 .nd-coordinator-actions>header h2{font-size:21px;}
 .nd-coordinator-actions-grid{grid-template-columns:1fr 1fr;gap:8px;}
 .nd-coordinator-action{padding:12px;}
 .nd-coordinator-action>strong{font-size:13px;}
 .nd-coordinator-action>span:not(.nd-action-number):not(.nd-action-icon){font-size:11px;}
 .nd-shell .edc-workbar{padding:16px 13px;}
 .nd-shell .edc-filter{display:grid;grid-template-columns:1fr 1fr;}
 .nd-shell .edc-filter label{min-width:0;}
 .nd-shell .edc-list-head{padding:13px;}
 .nd-shell .edc-issue{padding:15px 12px;}
 .nd-shell .edc-open{width:100%;text-align:center;}
 .nd-shell .pay-overview{grid-template-columns:repeat(2,minmax(0,1fr));}
 .nd-shell .pay-row{padding:15px 13px;}
 .nd-shell .pay-tabs{gap:4px;}
}
@media (max-width:380px){.nd-coordinator-actions-grid{grid-template-columns:1fr;}}
@media (prefers-reduced-motion:reduce){.nd-shell *{transition:none!important;}}


/* Editorial queue pagination: the template uses edc-pages on multi-page lists. */
.nd-shell .edc-pages{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;margin:18px 0 8px;}
.nd-shell .edc-pages span{color:var(--nd-muted);font-size:13px;white-space:nowrap;}

/* Release 59: editorial tasks/subtasks live on book, milestone and task pages. */
.nd-shell .nd-task-links{margin:16px 0;border-radius:14px}
.nd-task-link-head{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:13px}
.nd-task-link-head h2{margin:0 0 4px;font-size:19px}
.nd-task-link-head .hint{font-size:12px;margin:0}
.nd-task-parent-label{margin:5px 0 13px;color:var(--nd-ink);font-size:13px}
.nd-task-parent-label a{font-weight:700;color:var(--nd-accent)}
.nd-task-child-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.nd-task-child-list li{display:flex;gap:8px 10px;flex-wrap:wrap;align-items:center;background:var(--nd-surface);border:1px solid var(--nd-line);border-radius:9px;padding:10px 12px;font-size:13px}
.nd-task-child-list li a{font-weight:700;min-width:130px;flex:1 1 160px;color:var(--nd-ink)}
.nd-task-child-list li a:hover{color:var(--nd-accent)}
.nd-task-child-list li small{font-size:11px;color:var(--nd-muted)}
.nd-task-child-list li .hint{font-size:11px;margin:0}
@media(max-width:620px){.nd-task-link-head{align-items:stretch}.nd-task-child-list li{padding:10px}.nd-task-link-head .btn{width:max-content}}

/* Release 61 · milestone tasks by responsibility and completion. */
.nd-milestone-task-kpis{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 0 13px}
.nd-milestone-task-kpis span{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--nd-muted);background:var(--nd-surface);border:1px solid var(--nd-line);border-radius:8px;padding:6px 10px}
.nd-milestone-task-kpis strong{font-size:16px;color:var(--nd-ink)}
.nd-milestone-task-heading{margin:13px 0 9px!important;display:flex;gap:9px;align-items:center;font-size:14px!important;font-weight:800}
.nd-milestone-task-heading span{background:color-mix(in srgb,var(--nd-accent) 12%,var(--nd-surface));padding:2px 8px;border-radius:7px;font-size:11px;color:var(--nd-accent)}
.nd-milestone-task-list{gap:8px}
.nd-milestone-task-list li{align-items:flex-start;justify-content:space-between;padding:12px 13px}
.nd-milestone-task-list li.nd-milestone-task-blocked{border-left:3px solid #df7c58}
.nd-milestone-task-main{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.nd-milestone-task-meta{display:flex;gap:5px 13px;align-items:center;flex-wrap:wrap}
.nd-milestone-task-meta small{font-size:11px;color:var(--nd-muted)}
.nd-team-summary-note{font-size:11px;color:var(--nd-muted);margin:0 2px 15px}
