:root{font-family:Inter,Arial,sans-serif;color:#102334;background:#edf3f6;font-synthesis:none;--blue:#075985;--cyan:#0ea5e9;--ink:#102334;--line:#cbd5dc}
*{box-sizing:border-box}body{margin:0;min-width:320px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button,input,select,textarea{font:inherit}.app-header{height:82px;padding:0 clamp(18px,4vw,56px);display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #dce5e9;position:sticky;top:0;z-index:5}.brand{display:flex;gap:12px;align-items:center}.brand img{object-fit:contain}.brand div{display:flex;flex-direction:column}.brand strong{font-size:1.05rem}.brand span{font-size:.82rem;color:#607281;margin-top:3px}.year-controls{display:flex;align-items:center;gap:7px}.year-controls select{height:42px;border:1px solid #bfd0d8;border-radius:10px;background:#fff;font-size:1rem;font-weight:700;padding:0 34px 0 16px;color:var(--ink)}.icon-button{width:42px;height:42px;border:1px solid #bfd0d8;background:#fff;border-radius:10px;font-size:1.7rem;color:var(--blue);cursor:pointer}.icon-button:hover{background:#e9f5fa}
.calendar-shell{max-width:1500px;margin:auto;padding:36px clamp(18px,4vw,56px) 64px}.calendar-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:28px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:var(--blue);font-size:.75rem;font-weight:800;margin:0 0 6px}.calendar-heading h1{font-size:clamp(1.7rem,3vw,2.7rem);margin:0;letter-spacing:-.035em}.legend{display:flex;align-items:center;gap:8px;color:#536877;font-size:.88rem}.legend span{width:13px;height:13px;border-radius:4px;background:var(--cyan)}
.year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.month{background:#fff;border:1px solid #d6e1e6;border-radius:15px;padding:17px;box-shadow:0 2px 7px rgba(12,49,68,.035)}.month h2{font-size:1rem;margin:0 0 13px;color:#17384b}.month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.weekday{text-align:center;color:#748590;font-size:.68rem;font-weight:800;padding-bottom:5px}.day,.day-spacer{aspect-ratio:1;min-width:0}.day{border:0;border-radius:8px;background:transparent;color:#263b47;font-size:.82rem;cursor:pointer;position:relative}.day:hover,.day:focus-visible{background:#e8f4f8;outline:2px solid transparent}.day.weekend{color:#84929b}.day.today{box-shadow:inset 0 0 0 1.5px var(--blue);font-weight:800}.day.saved{background:var(--cyan);color:#fff;font-weight:800;box-shadow:0 2px 6px rgba(14,165,233,.28)}.day.saved:hover{background:#0284c7}
.report-dialog{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;padding:0;border:0;background:#dfe8ec}.report-dialog::backdrop{background:#dfe8ec}.report-dialog form{min-height:100%}.dialog-bar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px max(18px,calc((100vw - 980px)/2));background:rgba(255,255,255,.96);border-bottom:1px solid #ccd9df;box-shadow:0 2px 12px rgba(20,48,62,.08)}.dialog-actions{display:flex;align-items:center;gap:10px}.dialog-actions #saveStatus{color:#167046;font-size:.88rem;margin-right:5px}.back-button,.secondary-button,.primary-button{border-radius:9px;padding:10px 15px;border:1px solid #b8cad3;cursor:pointer;font-weight:700}.back-button,.secondary-button{background:#fff;color:#244555}.primary-button{background:var(--blue);border-color:var(--blue);color:#fff}.primary-button:hover{background:#064b71}
.report-page{width:210mm;min-height:297mm;margin:26px auto;background:#fff;padding:14mm 13mm;color:#111;box-shadow:0 8px 30px rgba(28,50,60,.15);font-family:Arial,sans-serif;font-size:10pt}.company-head{border:1px solid #111;display:grid;grid-template-columns:24mm 1fr 1fr;min-height:29mm;padding:3mm}.company-head img{grid-row:1/3;width:18mm;height:21mm;object-fit:contain;align-self:center;justify-self:center}.company-name{grid-column:2/4;font-size:17pt;font-weight:700;align-self:center}.address{font-size:8.3pt;line-height:1.42}.address b{font-weight:400}.report-page h2{font-size:19pt;margin:0;padding:1.5mm 1mm;border:1px solid #111;border-top:0}.form-grid{border-left:1px solid #111}.form-grid label{display:flex;align-items:center;border-right:1px solid #111;border-bottom:1px solid #111;min-height:8mm}.form-grid span{padding:0 1.2mm;white-space:nowrap}.form-grid input{min-width:0;width:100%;height:100%;border:0;padding:1mm;background:transparent}.project-grid{display:grid;grid-template-columns:1.15fr 1.35fr .6fr}.project-grid label:nth-child(4){grid-column:1}.project-grid .wide{grid-column:2/4}.date-row{display:grid;grid-template-columns:27mm 23mm 1fr;align-items:center;border:1px solid #111;border-top:0;min-height:9mm;padding:0 1.2mm}.date-row strong{font-size:10.5pt}.report-section{border-left:1px solid #111}.table-head,.editable-row{display:grid}.table-head span,.editable-row input{border-right:1px solid #111;border-bottom:1px solid #111;min-width:0}.table-head span{padding:1mm;display:flex;align-items:center}.table-head span:nth-last-child(2),.table-head span:last-child{font-size:8.5pt}.editable-row input{border-top:0;border-left:0;border-radius:0;padding:1mm;height:7mm}.cols-work{grid-template-columns:27mm 23mm 1fr 20mm}.cols-machines{grid-template-columns:27mm 23mm 1fr 28mm 20mm}.table-head{min-height:10mm}.table-head span:nth-child(3){justify-content:center}.time-row{display:grid;grid-template-columns:29mm 18mm 18mm 22mm 34mm 20mm 12mm 20mm;border-left:1px solid #111}.time-row>*{border-right:1px solid #111;border-bottom:1px solid #111;min-width:0;height:12mm;display:flex;align-items:center;justify-content:center}.time-row input{border-left:0;border-top:0;padding:0;text-align:center}.split-section{display:grid;grid-template-columns:59% 41%;border-left:1px solid #111}.split-section section{border-right:1px solid #111;border-bottom:1px solid #111}.report-page h3{font-size:10pt;text-align:center;margin:0;padding:1.2mm;border-bottom:1px solid #111}.split-section textarea,.visits textarea{width:100%;resize:none;border:0;padding:1mm;display:block}.materials-head,.material-row{display:grid;grid-template-columns:1fr 19mm}.materials-head span{padding:1mm;text-align:center;border-bottom:1px solid #111}.materials-head span:first-child,.material-row input:first-child{border-right:1px solid #111}.material-row input{width:100%;min-width:0;height:7mm;border:0;border-bottom:1px solid #111;padding:1mm}.visits{border:1px solid #111;border-top:0}.signature-grid{display:grid;grid-template-columns:52mm 1fr 1fr;border-left:1px solid #111}.signature-grid>div{min-height:25mm;border-right:1px solid #111;border-bottom:1px solid #111;padding:1mm}.signed-date{display:grid;grid-template-columns:27mm 1fr;align-items:center}.signed-date input{border:0;min-width:0}.signature-line{display:flex;height:16mm;align-items:end;color:#8b989f;font-size:8pt}.report-page input:focus,.report-page textarea:focus{outline:2px solid #38bdf8;outline-offset:-2px;background:#eefaff}
@media(max-width:1000px){.year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-page{transform-origin:top center}.dialog-bar{padding:10px 14px}}
@media(max-width:640px){.app-header{height:72px}.brand img{width:38px;height:44px}.brand strong{font-size:.92rem}.calendar-shell{padding-top:24px}.calendar-heading{align-items:flex-start;gap:14px}.legend{font-size:.76rem}.year-grid{grid-template-columns:1fr}.month{padding:18px}.day{font-size:.95rem}.dialog-bar{align-items:stretch;flex-direction:column}.dialog-actions{display:grid;grid-template-columns:1fr 1fr}.dialog-actions #saveStatus{grid-column:1/3}.back-button{text-align:left}.report-page{width:100%;min-height:0;margin:0;padding:8px;box-shadow:none;overflow-x:auto}.company-name{font-size:13pt}.report-page{font-size:8pt}.cols-work{grid-template-columns:18mm 18mm 1fr 17mm}.cols-machines{grid-template-columns:18mm 18mm 1fr 22mm 18mm}.time-row{grid-template-columns:24mm 15mm 10mm 15mm 24mm 15mm 10mm 15mm}.project-grid{grid-template-columns:1fr 1fr}.project-grid label:nth-child(3){grid-column:1/3}.project-grid label:nth-child(4){grid-column:1}.project-grid .wide{grid-column:2}.date-row{grid-template-columns:21mm 18mm 1fr}.signature-grid{grid-template-columns:42mm 1fr 1fr}}
@media print{body{background:#fff}.no-print{display:none!important}.report-dialog{position:static;width:auto;height:auto;overflow:visible;background:#fff}.report-page{margin:0;box-shadow:none;width:210mm;height:297mm;min-height:297mm;padding:10mm 12mm;font-size:9pt}.editable-row input{height:6.2mm}.company-head{min-height:27mm}.signature-grid>div{min-height:22mm}@page{size:A4 portrait;margin:0}}
.header-controls{display:flex;align-items:center;gap:12px}.theme-button{height:42px;display:flex;align-items:center;gap:7px;padding:0 13px;border:1px solid #bfd0d8;background:#fff;border-radius:10px;color:var(--blue);cursor:pointer;font-weight:700}.theme-button:hover{background:#e9f5fa}.theme-icon{font-size:1.2rem}
[data-theme="dark"]{color-scheme:dark;background:#08141d;--ink:#eaf4f8;--blue:#38bdf8}
[data-theme="dark"] body{background:#08141d;color:#eaf4f8}
[data-theme="dark"] .app-header,[data-theme="dark"] .month{background:#10232f;border-color:#294655}
[data-theme="dark"] .brand span,[data-theme="dark"] .legend,[data-theme="dark"] .weekday,[data-theme="dark"] .day.weekend{color:#9fb5c0}
[data-theme="dark"] .month h2,[data-theme="dark"] .day{color:#eaf4f8}
[data-theme="dark"] .day:hover,[data-theme="dark"] .day:focus-visible,[data-theme="dark"] .icon-button:hover,[data-theme="dark"] .theme-button:hover{background:#173746}
[data-theme="dark"] .year-controls select,[data-theme="dark"] .icon-button,[data-theme="dark"] .theme-button{background:#10232f;border-color:#36596a;color:#eaf4f8}
[data-theme="dark"] .report-dialog,[data-theme="dark"] .report-dialog::backdrop{background:#08141d}
[data-theme="dark"] .dialog-bar{background:#10232f;border-color:#294655}
[data-theme="dark"] .back-button,[data-theme="dark"] .secondary-button{background:#173746;color:#eaf4f8;border-color:#36596a}
[data-theme="dark"] .report-page{color:#111;background:#fff}
@media(max-width:640px){.theme-label{display:none}.header-controls{gap:6px}.theme-button{width:42px;justify-content:center;padding:0}}
@media print{[data-theme="dark"] body,[data-theme="dark"] .report-dialog{background:#fff}[data-theme="dark"] .report-page{color:#111;background:#fff}}
.month-grid{grid-template-columns:24px repeat(7,1fr)}.week-heading{color:#0e7490}.week-number{aspect-ratio:auto;border:0;border-right:1px solid #dbe6ea;background:transparent;color:#0e7490;font-size:.67rem;font-weight:800;cursor:pointer;padding:0}.week-number:hover,.week-number:focus-visible{background:#e0f2fe;border-radius:6px;outline:none}.week-dialog{width:min(560px,calc(100vw - 28px));border:0;border-radius:18px;padding:0;background:#fff;color:#102334;box-shadow:0 24px 70px rgba(5,30,45,.3)}.week-dialog::backdrop{background:rgba(4,18,27,.68)}.week-panel{padding:24px}.week-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-bottom:1px solid #dce6eb;padding-bottom:16px}.week-panel-head h2{margin:0;font-size:1.45rem}.week-report-list{display:grid;gap:8px;margin:18px 0}.week-report-link{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:12px 14px;border:1px solid #d6e1e6;border-radius:10px;color:#17384b;text-decoration:none;background:#f8fbfc}.week-report-link:hover{border-color:#38bdf8;background:#eefaff}.week-report-link span{display:flex;flex-direction:column;gap:3px}.week-report-link small{color:#607281}.week-report-link b{font-size:.78rem;color:#075985}.week-download{display:block;text-align:center;text-decoration:none}.week-empty{color:#607281;text-align:center;padding:20px 10px}
[data-theme="dark"] .week-number,[data-theme="dark"] .week-heading{color:#7dd3fc}[data-theme="dark"] .week-number{border-color:#294655}[data-theme="dark"] .week-number:hover{background:#173746}[data-theme="dark"] .week-dialog{background:#10232f;color:#eaf4f8}[data-theme="dark"] .week-panel-head{border-color:#294655}[data-theme="dark"] .week-report-link{background:#173746;border-color:#294655;color:#eaf4f8}[data-theme="dark"] .week-report-link small,[data-theme="dark"] .week-empty{color:#9fb5c0}[data-theme="dark"] .week-report-link b{color:#7dd3fc}
@media(max-width:640px){.month-grid{grid-template-columns:28px repeat(7,1fr)}.week-report-link{align-items:flex-start;flex-direction:column;gap:7px}}
.login-button{height:42px;padding:0 14px;border:1px solid #0e7490;border-radius:10px;background:#ecfeff;color:#0e5f78;font-weight:800;cursor:pointer}.login-button:hover{background:#cffafe}.login-button.logged-in{background:#dcfce7;border-color:#22c55e;color:#166534}.full-button{width:100%;margin-top:10px}.password-label{display:grid;gap:7px;font-weight:700;margin:18px 0 8px}.password-label input{width:100%;height:46px;border:1px solid #b8cad3;border-radius:9px;padding:0 12px;background:#fff;color:#102334}.form-error{min-height:20px;color:#b91c1c;font-weight:700;font-size:.88rem}.report-list-button{width:100%;text-align:left;cursor:pointer;font:inherit}.report-count{position:absolute;right:2px;top:2px;min-width:16px;height:16px;padding:0 3px;display:grid;place-items:center;border-radius:8px;background:#fff;color:#0369a1;font-size:.58rem;line-height:1;box-shadow:0 1px 3px rgba(0,0,0,.25)}.error-status{color:#b91c1c!important}.report-page input[readonly],.report-page textarea[readonly]{cursor:default}.report-page input[readonly]:focus,.report-page textarea[readonly]:focus{outline:0;background:transparent}
[data-theme="dark"] .login-button{background:#173746;border-color:#36596a;color:#eaf4f8}[data-theme="dark"] .login-button.logged-in{background:#123d2b;border-color:#22c55e;color:#bbf7d0}[data-theme="dark"] .password-label input{background:#08141d;border-color:#36596a;color:#eaf4f8}[data-theme="dark"] .report-count{background:#10232f;color:#7dd3fc}
@media(max-width:760px){.login-button{font-size:.78rem;padding:0 9px}.app-header{padding-left:12px;padding-right:12px}}
@media(max-width:560px){.login-button{position:fixed;right:12px;bottom:12px;z-index:20;box-shadow:0 4px 16px rgba(0,0,0,.22)}.brand span{display:none}}
.password-label select{width:100%;height:46px;border:1px solid #b8cad3;border-radius:9px;padding:0 12px;background:#fff;color:#102334;font:inherit}
[data-theme="dark"] .password-label select{background:#08141d;border-color:#36596a;color:#eaf4f8}
.saved-report-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}.delete-report-button{border:1px solid #dc2626;border-radius:10px;padding:0 14px;background:#fff;color:#b91c1c;font-weight:800;cursor:pointer}.delete-report-button:hover{background:#fef2f2}.delete-report-button:disabled{opacity:.5}.saved-report-item .week-report-link{min-width:0}.saved-report-item .delete-report-button{min-width:88px}
[data-theme="dark"] .delete-report-button{background:#3f1717;color:#fecaca;border-color:#ef4444}
@media(max-width:640px){
  .report-dialog{height:100dvh;max-height:100dvh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .report-dialog form{width:100%;min-height:100dvh;overflow:visible}
  .dialog-bar{position:sticky;top:0;padding:10px;gap:8px}
  .dialog-actions{grid-template-columns:1fr 1fr;gap:8px}.dialog-actions button{min-height:48px;padding:8px}
  .report-page{width:100%;max-width:100%;min-height:0;margin:0;padding:8px 6px 120px;overflow:visible;font-size:9pt}
  .company-head{grid-template-columns:19mm minmax(0,1fr);min-height:0}.company-head img{width:15mm;height:18mm}.company-name{grid-column:2;font-size:12pt}.company-head .address{grid-column:1/3;padding:3px}
  .project-grid{grid-template-columns:1fr}.project-grid label,.project-grid label:nth-child(3),.project-grid label:nth-child(4),.project-grid .wide{grid-column:1}
  .date-row{grid-template-columns:20% 19% minmax(0,1fr)}
  .cols-work{grid-template-columns:18% 18% minmax(0,1fr) 18%}.cols-machines{grid-template-columns:15% 16% minmax(0,1fr) 19% 19%}
  .table-head span{font-size:7pt;overflow-wrap:anywhere;padding:2px}.editable-row input{height:34px;padding:3px;font-size:16px}
  .time-row{grid-template-columns:1fr 1fr 1fr 1fr}.time-row>*{height:42px;font-size:8pt}.time-row input{font-size:16px}
  .split-section{grid-template-columns:1fr}.split-section textarea,.visits textarea{min-height:110px;font-size:16px}.material-row input{height:38px;font-size:16px}
  .signature-grid{grid-template-columns:1fr}.signature-grid>div{min-height:70px}.signed-date{grid-template-columns:24% 26% 20% 30%}.signed-date input{font-size:16px}
  .report-page input,.report-page textarea{touch-action:manipulation}
  .saved-report-item{grid-template-columns:1fr}.saved-report-item .delete-report-button{min-height:46px}.week-report-link{align-items:flex-start}
}
