/* NK Tech v3.5 — Monochrome professional design system.
   Final stylesheet loaded after all legacy component styles.
   Keeps warning semantics through text, border and weight — not hue.
   Images, uploaded photos, PDFs and language flags are never filtered. */
:root{
  --nav:#ffffff!important;--nav2:#f4f4f4!important;--brand:#111111!important;
  --line:#dedede!important;--muted:#656565!important;--pale:#f3f3f3!important;--white:#ffffff!important;
  --nk-ink:#151515;--nk-secondary:#626262;--nk-border:#dedede;--nk-surface:#ffffff;--nk-canvas:#f5f5f5;
  color:#171717!important;background:#f5f5f5!important;color-scheme:light;
}
html{background:#f5f5f5!important}
body{background:linear-gradient(180deg,#fafafa,#f3f3f3 60%,#f0f0f0)!important;background-attachment:fixed!important;color:#1b1b1b!important}
#app{color:#171717}
a,.eyebrow,.muted a,.login-links button{color:#171717!important}
a:hover,.login-links button:hover{text-decoration:underline}
::selection{background:#222;color:#fff}
button,input,textarea,select{font-family:Inter,'Segoe UI',Arial,sans-serif}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
[tabindex]:focus-visible{outline:2px solid #1e1e1e!important;outline-offset:3px!important}
input:not([type=checkbox]):not([type=radio]),select,textarea{
  background:#fff!important;border:1px solid #cfcfcf!important;color:#171717!important;
  box-shadow:none!important;border-radius:9px!important;
}
input:focus,textarea:focus,select:focus{border-color:#242424!important;box-shadow:0 0 0 3px #00000016!important}
input[type=checkbox],input[type=radio]{accent-color:#141414!important}
input::placeholder,textarea::placeholder{color:#858585!important}
option{background:#fff;color:#111}
#auth{background:linear-gradient(155deg,#f9f9f9,#ececec)!important}
.login-card{
  background:#fff!important;border:1px solid #dedede!important;box-shadow:0 20px 65px #0000000e!important;
  border-radius:18px!important;max-width:440px
}
.login-card h1{color:#151515!important}
.login-card p,.login-card label{color:#515151!important}
.nk-login-logo{display:block;width:111px;height:auto;margin:0 auto 21px;object-fit:contain}
.login-card .eyebrow{text-align:center;letter-spacing:1.15px;color:#777!important;font-size:10px}
#auth .notice{background:#f5f5f5!important;color:#4b4b4b!important;border:1px solid #e4e4e4!important}
#app .sidebar{
  background:#ffffff!important;border-right:1px solid #dedede!important;
  color:#292929!important;box-shadow:3px 0 18px #00000008!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important
}
#app .sidebar .logo{color:#141414!important;letter-spacing:-.3px;font-size:15px}
.nk-sidebar-brand{gap:12px!important;min-width:0;align-items:center!important;margin-bottom:24px!important}
.nk-sidebar-symbol{width:53px;height:53px;object-fit:contain;flex:none;background:#f5f5f5;border:1px solid #e5e5e5;border-radius:11px;padding:6px}
.nk-sidebar-brand>div{min-width:0}
.nk-sidebar-brand strong{font-size:17px;color:#121212;display:block;white-space:nowrap;line-height:1.1;letter-spacing:-.5px}
.nk-sidebar-brand small{font-weight:600!important;color:#747474!important;font-size:9px!important;line-height:1.35;letter-spacing:.25px!important;margin-top:5px;white-space:normal}
#app .sidebar .nav{color:#555!important;border:1px solid transparent!important;background:transparent!important;border-radius:10px!important;font-weight:600}
#app .sidebar .nav:hover{background:#f2f2f2!important;color:#111!important}
#app .sidebar .nav.active{
  background:#171717!important;color:#fff!important;border:1px solid #171717!important;
  box-shadow:0 4px 14px #00000012!important
}
#app .sidebar .nav.active *{color:#fff!important}
#app .sidebar .foot{
  background:#f6f6f6!important;border:1px solid #e6e6e6!important;
  color:#626262!important;border-radius:11px!important
}
#app .sidebar .foot strong{color:#242424!important}
#app .sidebar .sidebar-close{color:#171717!important;background:#f4f4f4!important;border-color:#ddd!important}
.main{color:#202020}
.top{
  background:#fff!important;border:1px solid #e5e5e5!important;border-radius:16px!important;
  box-shadow:0 3px 14px #00000005!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important
}
.top h1{color:#161616!important;letter-spacing:-.7px}
.top p,.top .eyebrow{color:#6b6b6b!important}
.eyebrow,.schedule-eyebrow,.paper-kicker{text-transform:uppercase;color:#5c5c5c!important}
.card,.day-project,.mobile-week-project,.schedule-hero,.schedule-stat,.schedule-panel,.schedule-resource,.schedule-risk,
.pd-panel,.pd-stat,.pd-hero,.pd-progress{
  background:#fff!important;border:1px solid #e2e2e2!important;border-radius:14px!important;
  box-shadow:0 4px 18px #00000006!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:#1e1e1e!important
}
.card h3,.card .value,.section-head h2,.schedule-hero h2,.schedule-stat>b,.pd-hero h2,.pd-stat>strong{color:#171717!important}
.card .value{letter-spacing:-.6px}
.btn,.btn:not(.primary),.schedule-modes button,.mobile-menu-toggle{
  background:#fff!important;color:#252525!important;border:1px solid #d5d5d5!important;
  border-radius:9px!important;box-shadow:none!important;font-weight:700
}
.btn:hover,.btn:not(.primary):hover,.schedule-modes button:hover,.mobile-menu-toggle:hover{
  background:#f0f0f0!important;border-color:#a7a7a7!important;color:#111!important
}
.btn.primary,.btn-primary,.schedule-modes button.selected{
  background:#171717!important;color:#fff!important;border-color:#171717!important;
  box-shadow:none!important
}
.btn.primary:hover,.btn-primary:hover{background:#383838!important;border-color:#383838!important;color:#fff!important}
.btn.danger{color:#272727!important;border-style:dashed!important}
.tag,.badge,.chip,.status,.notice,.warn,.ok,.alert{
  color:#333!important;background:#f1f1f1!important;border-color:#d9d9d9!important
}
.tag,.badge,.chip{border-radius:7px!important}
.warn,.alert{border-left:3px solid #555!important;color:#232323!important}
.ok{border-left:3px solid #b9b9b9!important}
.notice{background:#f8f8f8!important;color:#505050!important;border:1px solid #e1e1e1!important;border-radius:11px!important}
.table th,.table thead th{background:#f6f6f6!important;color:#616161!important;border-bottom:1px solid #dcdcdc!important}
.table td,.table th{border-bottom-color:#e9e9e9!important}
.table td strong,.field label,.hours-total,.day-person-name,.day-project h3{color:#222!important}
.table tr:hover td{background:#fafafa}
.table-scroll{border-radius:9px}
.person-row,.paper-meta,.day-empty,.mobile-week-project-head,.schedule-head-label{
  background:#f7f7f7!important;border-color:#e5e5e5!important;color:#343434!important
}
.hours-total{background:#efefef!important}
.report-paper{border-color:#d9d9d9!important}
.paper-header{border-bottom-color:#202020!important}
.paper-section h3,.paper-meta b{color:#222!important}
#dialog{background:#fff!important;color:#161616!important;border:1px solid #ddd!important;box-shadow:0 24px 90px #0000002a!important;border-radius:16px!important}
#dialog::backdrop{background:#0009!important;backdrop-filter:blur(3px)}
#dialog h2{color:#141414!important}
.modal-foot{background:#fff!important;border-color:#e3e3e3!important}
.userchip,.mini,.loader{color:#666!important}
.plan-week>div,.calendar-week,.schedule-week-header,.schedule-gantt-header,.schedule-gantt-dates,
.schedule-date-grid,.schedule-modes,.plan-grid,.plan-cell,.plan-day,.calendar-day,.schedule-gantt-scroll,
.schedule-task-label,.schedule-gantt-row,.day-project,.schedule-row-actions{
  border-color:#e1e1e1!important;color:#393939!important
}
.plan-week>div,.schedule-week-header{background:#eeeeee!important}
.plan-cell,.calendar-day{background:#fff!important}
.plan-cell:hover,.calendar-day:hover{background:#f5f5f5!important}
.plan-cell.is-today,.calendar-day.is-today,.schedule-date-grid .today{
  background:#f0f0f0!important;border:2px solid #202020!important;color:#111!important
}
.plan-cell.weekend-sat,.calendar-day.weekend-sat{background:#f2f2f2!important;border-color:#d3d3d3!important}
.plan-cell.weekend-sun,.calendar-day.weekend-sun{background:#e9e9e9!important;border-color:#c6c6c6!important}
.plan-cell.weekend-sat:hover,.calendar-day.weekend-sat:hover,
.plan-cell.weekend-sun:hover,.calendar-day.weekend-sun:hover{background:#e4e4e4!important}
.plan-event,.plan-event.own,.day-summary .tag{background:#eeeeee!important;color:#252525!important;border-left:3px solid #777!important}
.plan-event.own{background:#e3e3e3!important;border-left-color:#171717!important}
.own-row{background:#f7f7f7!important}
.own-row td:first-child{border-left-color:#222!important}
.plan-day-open,.plan-plus,.plan-count{color:#1e1e1e!important}
.pd-shell,.pd-hero,.pd-stat,.pd-panel,.pd-row{color:#242424!important}
.pd-hero{background:linear-gradient(130deg,#fff,#f7f7f7)!important}
.pd-hero small,.pd-risk{color:#525252!important}
.pd-track{background:#ebebeb!important}
.pd-track>div{background:#1c1c1c!important}
.pd-commercial .pd-stat{background:#fafafa!important}
.pd-panel-head,.pd-row,.pd-risk{border-bottom-color:#e5e5e5!important}
.pd-row small,.pd-footnote,.pd-stat>span{color:#777!important}
.schedule-hero{background:#fff!important}
.schedule-stats,.schedule-stat,.schedule-panel,.schedule-resource,.schedule-risk{color:#222!important}
.schedule-modes{background:#f3f3f3!important;border-color:#dedede!important}
.schedule-modes button.selected{background:#202020!important;color:#fff!important}
.schedule-gantt-scroll,.schedule-gantt-header,.schedule-gantt-row,.schedule-task-label{background:#fff!important}
.schedule-head-label,.schedule-date-grid .today{background:#eeeeee!important}
.schedule-task-top strong,.schedule-pct,.schedule-date-grid b,.schedule-week-header div{color:#222!important}
.schedule-gantt-row,.schedule-date-grid div,.schedule-week-header div{border-color:#e5e5e5!important}
.schedule-task-days [style*="background"],.schedule-resource-grid [style*="background"]{filter:grayscale(1)}
/* Mobile header retains drawer accessibility and the existing touch-target sizes. */
.mobile-nav-bar{
  color:#171717!important;background:#fff!important;border-bottom:1px solid #e0e0e0!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:0 2px 12px #0000000a!important
}
.mobile-nav-brand{gap:9px!important}
.nk-mobile-emblem{width:38px!important;height:38px!important;background:#f4f4f4!important;border:1px solid #dfdfdf!important;border-radius:9px!important;display:grid!important;place-items:center!important;flex:none}
.nk-mobile-emblem img{width:32px;height:27px;object-fit:contain}
.mobile-nav-brand strong{color:#151515!important;letter-spacing:-.25px}
.mobile-nav-brand small{color:#777!important}
.mobile-menu-toggle{color:#171717!important;background:#f5f5f5!important}
.mobile-drawer-backdrop{background:#0008!important}
@media(max-width:770px){
  #app .sidebar{background:#fff!important}
  #app .sidebar .logo{margin-bottom:11px!important;min-height:42px!important}
  .nk-sidebar-symbol{width:42px;height:42px;padding:4px}
  .nk-sidebar-brand strong{font-size:14px}
  .nk-sidebar-brand small{font-size:8px!important}
  #app .main{padding:13px}
  .top{border-radius:12px!important}
  .card,.pd-panel,.pd-stat{border-radius:11px!important}
}
@media(prefers-reduced-motion:reduce){button,input,textarea,select{transition:none!important}}
@media print{
  html,body,.report-paper,.paper-meta,.paper-section{background:#fff!important;color:#111!important}
  .report-paper{box-shadow:none!important;border:0!important}
}

/* v3.5.3 Mobile PDF export controls; document itself remains black and white. */
.report-pdf-actions{margin:8px 0 16px;padding:12px 14px;border:1px solid #ccc;border-radius:10px;background:#fafafa;color:#1b1b1b;display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.report-pdf-actions[hidden]{display:none!important}
.nk-pdf-action-buttons{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.report-pdf-actions .btn{display:inline-flex;text-decoration:none;align-items:center;justify-content:center;color:#222}
.report-pdf-actions .btn.primary{color:#fff}
.nk-pdf-warning{display:block;width:100%;color:#8b3b19;font-weight:600;font-size:12px}
.nk-pdf-export-paper .report-paper-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.nk-pdf-export-paper .photos{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.nk-pdf-export-paper .report-position-paper{overflow:visible!important}
.nk-pdf-export-paper .report-paper-positions{min-width:0!important;width:100%!important;table-layout:fixed!important}
.nk-pdf-export-paper .report-paper-positions td,.nk-pdf-export-paper .report-paper-positions th{overflow-wrap:anywhere!important}
.nk-pdf-export-paper .report-paper-top{flex-direction:row!important}
.nk-pdf-export-paper .photo{break-inside:avoid!important}
@media(max-width:650px){.report-pdf-actions{padding:11px}.nk-pdf-action-buttons{width:100%}.nk-pdf-action-buttons>.btn{flex:1 1 100%;min-height:43px}}

/* NK Tech v3.6: responsive non-commercial Nachtrag intake and review */
.nr-section{margin-bottom:18px}.nr-section .section-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
.nr-section .section-head h2{margin:0 0 5px}.nr-list{display:grid;gap:12px}
.nr-card{border:1px solid #dadada;border-radius:12px;background:#fff;padding:16px}
.nr-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.nr-card-head h3{margin:3px 0 6px;font-size:17px;color:#161616}
.nr-card-head p{margin:0 0 7px;color:#444;font-size:12px}
.nr-eyebrow{color:#777;font-size:11px;font-weight:700;letter-spacing:.35px}
.nr-status{flex-shrink:0;border:1px solid #bfbfbf;border-radius:99px;padding:5px 9px;font-size:11px;font-weight:700;background:#f6f6f6}
.nr-summary{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.nr-summary span{display:inline-flex;gap:5px;background:#f5f5f5;border:1px solid #e6e6e6;border-radius:7px;padding:6px 9px;font-size:12px}
.nr-details>summary{cursor:pointer;font-size:12px;font-weight:700;padding:8px 0}
.nr-detail-body{padding:10px 0 5px}.nr-detail-body h4{font-size:13px;margin:17px 0 8px}
.nr-description{white-space:pre-wrap;overflow-wrap:anywhere}
.nr-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.nr-files{display:flex;flex-wrap:wrap;gap:8px}
#dialog:has(#form-nr-request){width:min(1100px,calc(100vw - 20px));max-height:94dvh;overflow:auto}
.nr-form{display:grid;gap:15px;padding:4px 0}
.nr-form>label,.nr-grid>label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#222;min-width:0}
.nr-form input,.nr-form textarea,.nr-form select{width:100%;max-width:100%;min-height:39px;color:#111!important}
.nr-form-section{border:1px solid #ddd;border-radius:10px;padding:14px}
.nr-form-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.nr-form-heading h3{margin:0;font-size:15px}
.nr-grid{display:grid;grid-template-columns:minmax(160px,2fr) minmax(85px,.8fr) minmax(115px,1fr) auto;gap:8px;align-items:end;margin-top:10px}
.nr-material-row{grid-template-columns:minmax(160px,2fr) minmax(85px,1fr) minmax(90px,.9fr) minmax(85px,.8fr) auto}
.nr-grid>button{min-height:39px}
@media(max-width:700px){.nr-card{padding:12px}.nr-card-head{flex-direction:column}
.nr-grid,.nr-material-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.nr-grid>label:first-child{grid-column:1/-1}.nr-grid>button{grid-column:2;justify-self:end}
.nr-form-section{padding:10px}.nr-form input,.nr-form textarea,.nr-form select{font-size:16px!important}}

/* v3.6.1 — Nachträge reload and action bar */
.nr-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
@media(max-width:650px){.nr-toolbar{width:100%}.nr-toolbar .btn{flex:1;min-height:41px}}

/* NK Tech 3.6.2 — prefilled Nachtrag editing and existing attachments */
.nr-readonly{font-size:13px;font-weight:650;min-height:39px;display:flex;align-items:center;border:1px solid #d7d7d7;border-radius:8px;background:#f5f5f5;padding:9px 12px}
.nr-existing{display:grid;gap:9px;background:#f7f7f7;border:1px solid #dfdfdf;border-radius:10px;padding:12px}
.nr-existing>strong{font-size:12px}
.nr-existing .nr-files{display:flex;flex-wrap:wrap;gap:8px}
.nr-existing button{overflow-wrap:anywhere;white-space:normal;text-align:left;max-width:100%}

/* NK Tech v3.7 — Bautagebuch follows the Nachtrag monochrome visual language */
.bg-archive-section .section-head{flex-wrap:wrap;gap:12px}
.bg-archive-section .nr-list{margin-top:14px}
.bg-archive-card .nr-card-head h3{font-size:16px;font-weight:700;line-height:1.35}
.bg-archive-card .nr-card-head p{font-size:12px}
.bg-archive-description{margin:12px 0 6px;font-size:12px;line-height:1.6;max-height:75px;overflow:hidden}
.bg-archive-card .nr-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.bg-archive-card .nr-card-actions .admin-delete{margin-left:auto}
#dialog:has(#form-report){width:min(1100px,calc(100vw - 20px));max-height:94dvh;overflow:auto}
#form-report .section-head h2{font-weight:700}
.bg-form-intro{border-radius:10px;background:#f7f7f7!important;color:#282828!important}
.bg-form{padding:5px 0 10px}
.bg-basic-fields{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr));gap:10px;align-items:end}
.bg-basic-fields>label{display:grid;gap:5px;font-weight:700;font-size:12px;min-width:0}
.bg-form>.nr-form-section{padding:14px;border:1px solid #d9d9d9;background:#fff}
.bg-form .bg-worker-row{grid-template-columns:minmax(140px,1.15fr) minmax(160px,1.7fr) minmax(95px,.8fr) auto}
.bg-form .bg-material-row{grid-template-columns:minmax(150px,1.8fr) minmax(90px,1fr) minmax(85px,.8fr) minmax(85px,.7fr) minmax(130px,1.2fr) auto}
.bg-form .nr-grid{margin-top:9px}
.bg-form .nr-grid>label{display:grid;gap:5px;min-width:0;font-size:12px}
.bg-form .nr-grid input,.bg-form .nr-grid select{min-width:0;width:100%;max-width:100%}
.bg-form .nr-form-heading h3{font-size:15px;color:#171717}
.bg-optional{border:1px solid #ddd;border-radius:10px;padding:13px;background:#fff}
.bg-optional summary{cursor:pointer;font-size:13px;font-weight:700}
.bg-optional-body{display:grid;gap:12px;margin-top:12px}
.bg-optional-body>label{display:grid;gap:5px;font-size:12px;font-weight:650}
.bg-legacy .report-positions-editor{border:0;box-shadow:none;margin:0;padding:2px}
.bg-paper{border-radius:12px;border:1px solid #d9d9d9!important}
.bg-paper .report-paper-top{border-bottom-color:#202020!important}
.bg-paper .report-paper-title h2{color:#171717!important}
.bg-paper .report-paper-reference{background:#f5f5f5!important;border-color:#ddd!important;color:#202020!important}
.bg-paper .report-paper-meta{background:#f5f5f5!important}
.bg-paper .report-paper-quick-stats{grid-template-columns:repeat(4,minmax(0,1fr));background:#f5f5f5!important}
.bg-paper .report-paper-quick-stats b{color:#171717!important}
.bg-paper .bg-paper-section h3{color:#111!important;letter-spacing:.5px}
.bg-paper .bg-paper-table{width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse}
.bg-paper .bg-paper-table td,.bg-paper .bg-paper-table th{white-space:normal;overflow-wrap:anywhere;color:#242424!important;border-color:#ddd}
.bg-paper .bg-paper-table th{background:#f2f2f2!important}
.bg-paper .bg-paper-table .table{box-shadow:none}
.bg-paper .bg-paper-section .table-scroll{overflow:visible}
.bg-paper .report-paper-footer{border-color:#ddd!important;color:#333!important}
@media(max-width:850px){
 .bg-basic-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bg-basic-fields>label:first-child{grid-column:1/-1}
 .bg-form .bg-worker-row,.bg-form .bg-material-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .bg-form .bg-worker-row>label:nth-child(2),.bg-form .bg-material-row>label:first-child{grid-column:1/-1}
 .bg-form .nr-grid>button{grid-column:2;justify-self:end}
}
@media(max-width:650px){
 #dialog:has(#form-report){padding:14px;max-height:96dvh}
 .bg-form .nr-form-section{padding:10px}
 .bg-basic-fields{grid-template-columns:1fr}
 .bg-basic-fields>label:first-child{grid-column:auto}
 .bg-form input,.bg-form textarea,.bg-form select{font-size:16px!important}
 .bg-form .bg-worker-row,.bg-form .bg-material-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bg-archive-card{padding:12px}
 .bg-archive-card .nr-card-actions .btn{flex:1 1 auto}
 .bg-archive-section .nr-toolbar{width:100%}
 .bg-paper .report-paper-quick-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media print{
 .bg-paper{border:0!important;border-radius:0!important;box-shadow:none!important}
 .bg-paper .report-paper-quick-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .bg-paper .table-scroll{overflow:visible!important}
}
