:root{--bg:#f5f6f8;--card:#fff;--text:#17202a;--muted:#7b8794;--line:#dfe3e8;--primary:#214e34;--primary2:#2e7d32;--danger:#b3261e;--warn:#8a5a00}
*{box-sizing:border-box} body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);overflow-x:hidden}
a{color:var(--primary);text-decoration:none} h1{margin:.1rem 0;font-size:24px} h2{margin-top:1.3rem}.container{padding:16px;max-width:1360px;margin:auto}.topbar{height:52px;display:flex;gap:18px;align-items:center;background:#173b27;color:white;padding:10px 22px;box-shadow:0 2px 12px #0002}.topbar a{color:white}.brand{font-weight:800;font-size:18px}.spacer{flex:1}.page-head,.calendar-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:10px}.actions{display:flex;gap:10px;align-items:center}.btn,button{border:0;background:var(--primary2);color:#fff;padding:9px 13px;border-radius:10px;cursor:pointer;font-weight:700;display:inline-block}.btn.secondary{background:#e7efe9;color:var(--primary)}button.danger{background:var(--danger);padding:7px 10px}.filters,.inline-form{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:10px 0}.calendar-filters{flex-wrap:nowrap}.month-nav{display:flex;gap:8px;margin-left:auto}input,select,textarea{width:100%;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff}select{min-width:185px}.weekdays,.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.weekdays div{text-align:center;color:var(--muted);font-weight:700;font-size:13px}.calendar-shell{position:relative;height:calc(100vh - 84px);min-height:610px;overflow:hidden}.compact-calendar{height:calc(100vh - 210px);min-height:430px}.day{background:var(--card);min-height:0;border-radius:13px;border:1px solid var(--line);padding:7px;box-shadow:0 2px 8px #00000008;overflow:hidden}.day.muted{opacity:.40}.day.today{outline:3px solid #99c6a2}.date-number{font-weight:800;font-size:16px}.dots{display:flex;gap:4px;flex-wrap:wrap;margin:6px 0}.dot{width:11px;height:11px;border-radius:50%;display:inline-block;border:1px solid #0002;flex:0 0 auto}.more{font-size:11px;background:#eee;border-radius:10px;padding:0 5px}.legend{position:absolute;right:0;bottom:0;background:#ffffffee;border:1px solid var(--line);border-radius:14px;padding:8px 10px;box-shadow:0 6px 20px #0001;display:flex;gap:12px;flex-wrap:wrap;max-width:65%;font-size:12px}.legend span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.legend i{width:11px;height:11px;border-radius:50%;display:inline-block;border:1px solid #0002}.login-card{max-width:420px;margin:9vh auto;background:var(--card);padding:30px;border-radius:24px;box-shadow:0 10px 30px #0001}.login-card button{width:100%;margin-top:12px}.grid-form{display:grid;grid-template-columns:repeat(2,minmax(250px,1fr));gap:14px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px}.grid-form label{font-weight:700}.grid-form label input,.grid-form label select,.grid-form label textarea{margin-top:6px}.full{grid-column:1/-1}textarea{min-height:90px}table{width:100%;border-collapse:collapse;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 2px 8px #00000008}th,td{padding:11px;border-bottom:1px solid var(--line);text-align:left}th{background:#edf4ef;color:#173b27}.alert{padding:12px;border-radius:10px;margin-bottom:12px}.alert.erro{background:#ffe8e6;color:#8b1a15}.alert.aviso{background:#fff4d6;color:#5b3a00}.linha-alerta td{background:#fff8e8}.cards{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;min-width:150px}.card span{display:block;font-size:24px;font-weight:800;margin-top:8px}.colorbox{display:inline-block;width:22px;height:22px;border-radius:50%;vertical-align:middle;border:1px solid #0002}.color-input{width:58px;height:40px;padding:3px}.modal{border:0;border-radius:20px;box-shadow:0 20px 80px #0004;width:min(760px,92vw);padding:22px}.modal::backdrop{background:#0007}.modal-close{float:right}
@media(max-width:900px){body{overflow:auto}.calendar-shell{height:auto;overflow:visible}.compact-calendar{height:auto}.calendar,.weekdays{grid-template-columns:1fr}.grid-form{grid-template-columns:1fr}.topbar{height:auto;flex-wrap:wrap}.page-head,.calendar-header{display:block}.calendar-filters{flex-wrap:wrap}.month-nav{margin-left:0;flex-wrap:wrap}.day{min-height:auto}.legend{position:static;max-width:100%;margin-top:10px}}
.alert.ok{background:#e7f5ea;color:#174a28}
.popup-form{box-shadow:none;border:0;padding:0;margin-top:12px}
.checkline{display:flex;align-items:center;gap:8px;font-weight:700;background:#f8faf9;border:1px solid var(--line);border-radius:10px;padding:9px;margin-top:22px}
.checkline input{width:auto;margin:0}.settings-form{max-width:620px}.modal .grid-form{background:transparent}.calendar-header h1{text-transform:none}
.small-modal{width:min(520px,92vw)}
.warn-btn{background:#b7791f}.danger{background:var(--danger)}
.config-section{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin:14px 0;box-shadow:0 2px 8px #00000008}.config-section h2{margin-top:0}
.grid-form small,label small{display:block;color:var(--muted);font-weight:500;margin:2px 0 4px}.quick-info{background:#f3f7f4;border:1px solid var(--line);border-radius:12px;padding:10px;color:#173b27;font-weight:700}.today-summary{margin-top:4px;color:#334;font-size:13px;display:flex;gap:10px;flex-wrap:wrap}.today-summary span{display:inline-flex;align-items:center;gap:5px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 8px}.today-summary i{width:10px;height:10px;border-radius:50%;display:inline-block}.timeline{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:18px}.timeline-row{display:grid;grid-template-columns:70px 1fr 40px;gap:10px;align-items:center;margin:7px 0}.bar{height:14px;background:#eef2ef;border-radius:999px;overflow:hidden}.bar i{display:block;height:100%;background:#2e7d32;border-radius:999px}.linha-cancelada td{background:#f2f2f2;color:#777;text-decoration:line-through}.modal small{color:var(--muted);line-height:1.55}.modal p{margin:8px 0}


/* v1.4 refinements */
.popup-btn, .btn, button{font-size:14px;line-height:1.15}
.frozen-field, input[readonly].frozen-field{background:#f1f3f4;color:#6f7782;font-style:italic;border-color:#d6dadd}
.modal-close button{background:#eef2ef;color:#173b27;border-radius:50%;width:34px;height:34px;padding:0;font-weight:900;font-size:16px}
.wide-modal{width:min(880px,94vw)}
.day.holiday{background:#fff6cf;border-color:#e1bd42}
.dot{width:14px;height:14px}
.no-scroll{overflow:hidden}
.config-section form{margin:0}.config-section td form{display:inline}
.mini-wrap{background:#f8faf9;border:1px solid var(--line);border-radius:14px;padding:10px}
.mini-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.mini-head button{background:#e7efe9;color:var(--primary);padding:5px 10px;border-radius:8px}
.mini-week,.mini-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}.mini-week span{font-size:12px;color:var(--muted);font-weight:800}.mini-calendar button{background:#fff;color:#17202a;border:1px solid var(--line);padding:7px 0;border-radius:8px;font-weight:800}.mini-calendar button:hover:not(:disabled){background:#e7efe9}.mini-calendar .mini-disabled{background:#ffe8e6;color:#b3261e;text-decoration:line-through;cursor:not-allowed}.mini-calendar .mini-selected{outline:3px solid #2e7d32;background:#e7f5ea}

/* v1.5 acabamento */
.popup-open,.popup-btn,.btn,button{font-size:14px;line-height:1.15}
.icon-edit{background:#f2c94c;color:#2b2100;border-radius:9px;padding:8px 10px;font-weight:900;display:inline-block;border:0;cursor:pointer;min-width:38px;text-align:center}
.icon-delete{background:#b3261e;color:#fff;border-radius:9px;padding:8px 10px;font-weight:900;display:inline-block;border:0;cursor:pointer;min-width:38px;text-align:center}
.cancel-btn{background:#b3261e;color:#fff;border-radius:9px;padding:8px 10px;font-weight:900;display:inline-block;border:0;cursor:pointer;white-space:nowrap}
.history-btn{white-space:nowrap;font-weight:800}.actions-cell{text-align:right!important;white-space:nowrap}.justified-table th,.justified-table td{text-align:left}.justified-table th:last-child,.justified-table td:last-child{text-align:right!important}
table th:last-child, table td:last-child{text-align:right}.modal-delete-form{margin-top:10px;text-align:right}.modal-close button{font-size:18px}.frozen-field,input[readonly].frozen-field{background:#e8eaed!important;color:#6b7280!important;font-style:italic!important}
.compact-check{padding:5px 8px;margin-top:4px;font-size:12px;min-height:32px}.compact-check input{transform:scale(.9)}
.wide-modal{max-height:94vh;overflow:auto}.wide-modal .grid-form{gap:8px}.wide-modal textarea{min-height:54px}.wide-modal h2{margin:.2rem 0 .4rem}.mini-wrap{padding:8px}.mini-calendar button{padding:5px 0}.mini-calendar .mini-range{background:#dff3e4;border-color:#75b985}.mini-calendar .mini-selected{outline:2px solid #20883d;background:#bfe8c9}
.dot{width:16px;height:16px}.calendar-filters button[type=submit]{display:none}
/* v1.6 refinamentos */
.centered-table th,.centered-table td{text-align:center!important}.centered-table th:first-child,.centered-table td:first-child{text-align:center!important}
.sticky-title{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--line);padding:8px 0 10px;margin:-4px 0 12px;display:flex;align-items:end;gap:18px}.sticky-title h1{margin:0}.sticky-title span{color:#4b5563;margin-bottom:3px}.chart-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.chart-filters{margin:0}.chart-card{padding:14px}.chart-card canvas{width:100%;display:block}.chart-legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px;font-size:13px;color:#344}.chart-legend span{display:inline-flex;align-items:center;gap:6px}.chart-legend i{width:12px;height:12px;border-radius:50%;display:inline-block;border:1px solid #0002}.mini-resumo-inline{display:block;margin-top:4px;white-space:normal;color:#173b27!important;font-weight:700!important}.topbar a{font-weight:700}
@media(max-width:900px){.sticky-title{top:0;display:block}.chart-head{display:block}.chart-filters{margin:8px 0}}

/* v1.7 ajustes finos */
.calendar-topline{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:center;gap:12px;margin-bottom:4px}
.calendar-topline h1{margin:0;font-size:26px}.calendar-title-block{min-width:0}.calendar-filters{margin:0;gap:7px}.calendar-filters select{min-width:128px;width:145px;padding:7px 8px;font-size:13px}.centered-nav{justify-content:center;margin:4px 0 6px 0}.centered-nav .btn{padding:7px 12px}.calendar-shell{height:calc(100vh - 76px);min-height:560px;display:flex;flex-direction:column;overflow:hidden}.compact-calendar{height:auto;min-height:0;flex:1}.weekdays{margin-bottom:4px}.day{padding:5px;border-radius:10px}.date-number{font-size:14px}.dots{margin:4px 0;gap:3px}.dot{width:14px;height:14px}.legend{position:static;align-self:flex-end;margin-top:6px;max-width:100%;padding:5px 8px;box-shadow:none;font-size:11px}.today-summary{font-size:12px;gap:6px}.today-summary span{padding:2px 7px}.mini-resumo-inline{display:block;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:-2px;color:#173b27!important;font-weight:700!important}.muted-note{color:var(--muted);margin-top:-4px}.chart-card canvas{height:260px}.calendar .day{min-height:0}
@media(max-width:1000px){.calendar-topline{grid-template-columns:1fr;align-items:start}.calendar-filters select{width:100%;min-width:160px}.centered-nav{justify-content:flex-start}.mini-resumo-inline{white-space:normal}.legend{align-self:stretch}.calendar-shell{height:auto;overflow:visible}.compact-calendar{height:auto}}
.large-modal{width:min(1120px,96vw);max-height:92vh;overflow:auto}.history-report-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin-top:18px;box-shadow:0 2px 8px #00000008}.compact-history-head{align-items:flex-start;margin-bottom:8px}.compact-chart-filters{gap:6px;justify-content:flex-end}.compact-chart-filters select{min-width:120px;width:150px;padding:7px 8px;font-size:13px}.compact-chart-filters select:first-of-type{width:210px}.report-chart-card{padding:10px;margin-bottom:0}.report-chart-card canvas{height:340px}.history-report-card h2{margin:0}.history-report-card small{color:var(--muted)}
@media(max-width:900px){.compact-history-head{display:block}.compact-chart-filters{justify-content:flex-start;margin-top:8px}.compact-chart-filters select,.compact-chart-filters select:first-of-type{width:100%}}

/* v2.0 organização: Relatórios compacto e Funcionários em Configuração */
.reports-page{height:calc(100vh - 84px);display:flex;flex-direction:column;overflow:hidden;gap:8px}
.compact-report-head{margin-bottom:0}.report-main-filters{margin:0;gap:7px;flex-wrap:nowrap}.report-main-filters select{min-width:128px;width:150px;padding:7px 8px;font-size:13px}.report-main-filters select[name="funcionario_id"]{width:240px}
.report-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-height:155px;max-height:230px;flex:0 0 210px}.summary-panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;overflow:hidden;box-shadow:0 2px 8px #00000008}.summary-panel h2{font-size:16px;margin:0 0 8px}.summary-scroll{height:calc(100% - 30px);overflow:auto;border-radius:12px}.summary-scroll table{box-shadow:none;border-radius:12px}.summary-scroll th,.summary-scroll td{padding:8px;font-size:13px;text-align:center!important}.compact-history-card{flex:1;min-height:0;margin-top:0;display:flex;flex-direction:column;overflow:hidden}.compact-history-card .report-chart-card{flex:1;min-height:0}.compact-history-card canvas{height:100%!important;min-height:280px}.compact-chart-filters select{width:135px;min-width:115px}.compact-chart-filters select:first-of-type{width:135px}.config-section:first-of-type{margin-top:8px}
@media(max-width:1000px){.reports-page{height:auto;overflow:visible}.report-main-filters{flex-wrap:wrap}.report-main-filters select,.report-main-filters select[name="funcionario_id"]{width:100%}.report-summary-grid{grid-template-columns:1fr;max-height:none;flex:auto}.summary-panel{max-height:260px}.compact-history-card{min-height:360px}}

/* Ajustes v2.1 */
.report-chart-card{display:flex;flex-direction:column;gap:8px;min-height:360px;}
.report-chart-card canvas{width:100%;height:310px!important;min-height:310px!important;display:block;}
.chart-legend{justify-content:flex-start;align-items:center;gap:14px 18px;margin:0 0 4px 0;font-size:13px;line-height:1.2;}
.chart-legend span{font-weight:700;color:#2f3a45;}
.compact-history-card .report-chart-card{flex:0 0 auto;}
.compact-history-card canvas{height:310px!important;min-height:310px!important;}
.summary-scroll .centered-table th,.summary-scroll .centered-table td,.centered-table th,.centered-table td{text-align:center!important;}
.summary-scroll .centered-table th:last-child,.summary-scroll .centered-table td:last-child{text-align:center!important;}
.chart-filters .history-btn{min-width:190px;}

/* v2.2 Configuração em painel de duas colunas */
.config-dashboard{height:calc(100vh - 104px);display:grid;grid-template-columns:minmax(560px,1.35fr) minmax(420px,.9fr);gap:14px;overflow:hidden;align-items:stretch}
.config-left,.config-right{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:10px}.config-right{overflow:hidden}
.funcionarios-config{height:100%;display:flex;flex-direction:column;overflow:hidden;margin:0}.funcionarios-config .page-head{margin-bottom:6px}.funcionarios-config .justified-table{display:block;overflow:auto;max-height:calc(100vh - 190px);border-radius:14px}.funcionarios-config table,.funcionarios-config thead,.funcionarios-config tbody,.funcionarios-config tr{width:100%}.funcionarios-config th,.funcionarios-config td{padding:7px 8px;font-size:13px;line-height:1.15}.funcionarios-config h2{margin:.2rem 0}.funcionarios-config .page-head .actions{margin-left:auto}
.compact-config-card{margin:0;padding:9px 10px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 2px 8px #00000008;overflow:hidden;min-height:0}.compact-config-card h2{font-size:16px;margin:0}.compact-config-card .page-head{margin:0 0 6px;align-items:center}.compact-config-card .page-head .popup-btn{padding:7px 9px;font-size:13px}.compact-config-card .muted-note{font-size:12px;line-height:1.25;margin:2px 0 6px}.compact-config-card table{box-shadow:none;border-radius:12px;margin:0;display:block;max-height:118px;overflow:auto}.compact-config-card thead,.compact-config-card tbody,.compact-config-card tr{width:100%}.compact-config-card th,.compact-config-card td{padding:6px 7px;font-size:12.5px;line-height:1.15}.compact-config-card .icon-edit,.compact-config-card .icon-delete{padding:5px 7px;min-width:30px}.compact-config-card form{display:inline}.compact-config-card .colorbox{width:15px;height:15px}.compact-config-card:nth-of-type(4) table,.compact-config-card:nth-of-type(5) table{max-height:105px}.compact-config-card:nth-of-type(6) table{max-height:95px}
@media(max-width:1100px){.config-dashboard{height:auto;overflow:visible;grid-template-columns:1fr}.config-left,.config-right{overflow:visible}.funcionarios-config .justified-table,.compact-config-card table{max-height:260px}.funcionarios-config{height:auto}.compact-config-card{overflow:visible}}

/* v2.3 Configuração: melhor aproveitamento dos cards e divisão 50/50 */
.config-dashboard{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
}
.config-left,.config-right{
  min-width:0;
}
.config-section,
.compact-config-card{
  width:100%;
}
.funcionarios-config,
.compact-config-card{
  padding:10px;
}
.funcionarios-config .justified-table,
.compact-config-card table{
  display:table;
  width:100%;
  table-layout:fixed;
  max-height:none;
  overflow:visible;
  border-collapse:separate;
  border-spacing:0;
}
.funcionarios-config thead,
.funcionarios-config tbody,
.funcionarios-config tr,
.compact-config-card thead,
.compact-config-card tbody,
.compact-config-card tr{
  width:auto;
}
.funcionarios-config{
  overflow:auto;
}
.funcionarios-config th,
.funcionarios-config td{
  padding:6px 7px;
  font-size:12.5px;
  line-height:1.12;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.compact-config-card th,
.compact-config-card td{
  padding:5px 6px;
  font-size:12px;
  line-height:1.12;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.funcionarios-config th:last-child,
.funcionarios-config td:last-child,
.compact-config-card th:last-child,
.compact-config-card td:last-child{
  width:58px;
}
.compact-config-card{
  display:flex;
  flex-direction:column;
}
.compact-config-card .page-head{
  flex:0 0 auto;
}
.compact-config-card table{
  flex:1 1 auto;
}
.config-right{
  display:grid;
  grid-template-rows:1fr 1fr 1fr 1fr 1fr;
  gap:8px;
}
.config-right .compact-config-card{
  min-height:0;
  overflow:auto;
}
.compact-config-card:nth-of-type(4),
.compact-config-card:nth-of-type(5){
  min-height:0;
}
.compact-config-card .popup-btn,
.funcionarios-config .popup-open{
  padding:7px 9px;
  font-size:13px;
}
@media(max-width:1100px){
  .config-dashboard{grid-template-columns:1fr;}
  .config-right{display:flex;}
  .funcionarios-config,.config-right .compact-config-card{max-height:none;overflow:visible;}
}

/* Kronos v1.1 */
:root{--bg:#f4f7fb;--card:#fff;--text:#17202a;--muted:#687789;--line:#d9e2ec;--primary:#0d47a1;--primary2:#1565c0;--danger:#b3261e;--warn:#b7791f;--side:#0a357a;--side2:#0d47a1;}
body{background:var(--bg);font-size:14px;}
.container{margin-left:230px;max-width:none;width:calc(100vw - 230px);padding:10px 12px;transition:.2s ease;}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:230px;background:linear-gradient(180deg,var(--side),var(--side2));color:white;display:flex;flex-direction:column;padding:10px 8px;z-index:50;box-shadow:3px 0 18px #0002;transition:.2s ease;}
.sidebar a,.side-user{color:white;display:flex;align-items:center;gap:10px;border-radius:12px;padding:10px 12px;font-weight:800;margin:2px 0;}
.sidebar a:hover{background:#ffffff18}.side-brand{display:flex;align-items:center;gap:6px;padding:8px 10px 14px}.brand-text{font-size:21px;font-weight:900}.brand-version{font-size:10px;opacity:.75;margin-top:8px}.side-toggle{margin-left:auto;background:#ffffff22;color:white;border:1px solid #ffffff30;width:34px;height:30px;padding:0;border-radius:9px}.side-spacer{flex:1}.nav-ico{font-size:20px;min-width:24px;text-align:center}.side-user{font-size:12px;opacity:.9}.nav-collapsed .sidebar{width:64px}.nav-collapsed .container{margin-left:64px;width:calc(100vw - 64px)}.nav-collapsed .nav-label,.nav-collapsed .brand-text,.nav-collapsed .brand-version{display:none}.nav-collapsed .side-brand{justify-content:center;padding:8px 0 14px}.nav-collapsed .side-toggle{margin-left:0}.nav-collapsed .sidebar a,.nav-collapsed .side-user{justify-content:center;padding:10px 6px}.nav-collapsed .nav-ico{min-width:0}
.topbar{display:none}.btn,button{background:var(--primary2);font-size:13px;padding:7px 10px;border-radius:9px}.btn.secondary{background:#e8f1ff;color:var(--primary)}th{background:#e8f1ff;color:#0d47a1}.calendar-shell{height:calc(100vh - 20px);min-height:0}.calendar-topline{grid-template-columns:minmax(210px,1fr) auto auto}.calendar-topline h1{font-size:22px}.calendar-filters select{width:132px;min-width:112px}.centered-nav .btn{padding:6px 10px}.day{border-radius:9px;padding:4px}.date-number{font-size:13px}.letter-dot{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:white;font-size:10px;font-weight:900;text-shadow:0 1px 2px #0008;border:1px solid #0002}.planned-dot{background:white!important;color:var(--primary)!important;border:2px dashed var(--primary)!important;text-shadow:none}.planned-sample{background:white!important;border:2px dashed var(--primary)!important}.legend{font-size:11px;padding:4px 7px}.weekdays div{font-size:12px}.dot{width:18px;height:18px}.mini-calendar .mini-range{background:#dff5e5!important;outline:2px solid #46a35c}.modal{max-height:92vh;overflow:auto}.wide-modal{width:min(820px,96vw)}.grid-form{gap:10px;padding:12px}.checkline{padding:7px;margin-top:6px}.mini-wrap{padding:8px}.mini-calendar button{padding:5px 0}.frozen-field{background:#f0f3f7!important;color:#667085!important;font-style:italic!important}.config-dashboard.no-people-config{grid-template-columns:1fr 1fr;height:calc(100vh - 56px)}.config-left,.config-right{gap:8px}.compact-config-card{min-height:0}.config-section{margin:0}.config-section h2{font-size:16px}.inline-form input{padding:5px}.pessoas-page{display:grid;grid-template-columns:minmax(480px,.9fr) minmax(560px,1.1fr);gap:10px;height:calc(100vh - 20px);overflow:hidden}.people-list,.people-detail{overflow:auto}.people-list table th,.people-list table td{padding:7px;font-size:12.5px}.empty-panel{height:60%;display:flex;align-items:center;justify-content:center;color:var(--muted);background:#fff;border:1px dashed var(--line);border-radius:18px}.reports-page{height:calc(100vh - 20px)}.report-main-filters{gap:6px}.report-main-filters select{width:130px;min-width:110px}.report-main-filters select[name="funcionario_id"]{width:230px}.report-summary-grid{flex:0 0 190px;max-height:210px;min-height:155px}.summary-scroll th,.summary-scroll td{padding:6px!important;font-size:12px!important}.report-chart-card{min-height:390px}.report-chart-card canvas{height:360px!important;min-height:360px!important}.chart-legend{font-size:12px}.large-modal{width:min(1120px,96vw)}
@media(max-width:1400px),(max-height:800px){body{font-size:13px}.container{padding:8px}.sidebar{width:206px}.container{margin-left:206px;width:calc(100vw - 206px)}.nav-collapsed .container{margin-left:58px;width:calc(100vw - 58px)}.nav-collapsed .sidebar{width:58px}.sidebar a,.side-user{padding:8px 9px}.brand-text{font-size:19px}.calendar-topline h1{font-size:20px}.today-summary{font-size:11px}.calendar-filters select{padding:6px;width:120px;min-width:104px}.popup-btn,.btn,button{font-size:12px;padding:6px 8px}.month-nav{margin:2px 0 4px}.day{padding:3px}.letter-dot{width:18px;height:18px;font-size:9px}.calendar-shell{height:calc(100vh - 16px)}.report-summary-grid{flex:0 0 165px}.report-chart-card canvas{height:330px!important;min-height:330px!important}.report-chart-card{min-height:350px}.pessoas-page{grid-template-columns:1fr 1fr}.grid-form{gap:8px}.modal h2{margin:.2rem 0}.modal{padding:16px}.mini-calendar button{padding:4px 0}}
@media(max-width:1000px){.sidebar{position:static;width:100%;height:auto;flex-direction:row}.container,.nav-collapsed .container{margin:0;width:100%;}.nav-label,.brand-text,.brand-version{display:inline!important}.side-spacer,.side-user{display:none}.calendar-shell,.reports-page,.pessoas-page,.config-dashboard.no-people-config{height:auto;overflow:visible;display:block}.people-list,.people-detail{overflow:visible;margin-bottom:10px}.report-summary-grid{display:block;max-height:none}.summary-panel{margin-bottom:10px}.calendar-topline{display:block}.legend{position:static}}
/* Kronos v1.1.1 refinamentos */
:root{--sidebar-mini:58px;--sidebar-wide:218px;--blue:#0d47a1;--blue2:#1565c0;--soft-blue:#eaf2ff}
body.nav-collapsed .sidebar{width:var(--sidebar-mini);position:fixed;z-index:50;transition:width .18s ease;box-shadow:2px 0 12px rgba(13,71,161,.08)}
body.nav-collapsed .container{margin-left:var(--sidebar-mini)!important;width:calc(100vw - var(--sidebar-mini))!important;transition:none!important}
body.nav-collapsed .sidebar .nav-label,body.nav-collapsed .sidebar .brand-text,body.nav-collapsed .sidebar .brand-version{opacity:0;display:none}
body.nav-collapsed .sidebar:hover{width:var(--sidebar-wide)}
body.nav-collapsed .sidebar:hover .nav-label,body.nav-collapsed .sidebar:hover .brand-text,body.nav-collapsed .sidebar:hover .brand-version{display:inline;opacity:1}
body.nav-collapsed .sidebar:hover + .container{margin-left:var(--sidebar-mini)!important;width:calc(100vw - var(--sidebar-mini))!important}
.side-brand{min-height:40px;align-items:center;gap:4px}.brand-version{font-size:10px;opacity:.65}.nav-ico{min-width:32px;text-align:center}.sidebar a{white-space:nowrap}.calendar-actions{display:flex;gap:6px;align-items:center}.secondary-action{background:#eaf2ff;color:#0d47a1;border:1px solid #bbd3ff}.planned-dot{border:2px dashed #fff!important;box-shadow:0 0 0 2px #1565c0;background:transparent!important;color:#0d47a1!important}.letter-dot{border:none;cursor:pointer}.modal-close{position:absolute;right:10px;top:8px}.modal-close button{padding:3px 7px;background:#eef3fb;color:#0d47a1;border:1px solid #d3deef}.modal-actions-vertical{display:grid;gap:8px}.full-action{width:100%}.danger,.icon-delete{background:#b3261e!important;color:#fff!important}.holiday{background:#fff4c2!important;border-color:#ffd45a!important}.config-grid-6{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3, minmax(0,1fr));gap:10px;height:calc(100vh - 72px);overflow:hidden}.config-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;min-height:0;display:flex;flex-direction:column;overflow:hidden}.config-card .page-head{margin-bottom:6px}.config-card h2{font-size:16px;margin:0}.table-scroll{overflow:auto;min-height:0;flex:1}.small-table-scroll{max-height:none}.config-card table{width:100%;table-layout:auto}.config-card th,.config-card td{padding:5px 6px!important;font-size:12px!important;line-height:1.15}.compact-inline{margin:0 0 4px 0}.compact-inline input{max-width:54px}.pdf-template-box{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;color:#667085}.rules-panel{height:55%;text-align:center;padding:20px}.pdf-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.compact-people-table th,.compact-people-table td{padding:6px 7px!important}.wide-modal{max-height:92vh;overflow:auto}.calendar-shell{overflow:hidden}.compact-calendar{min-height:0}.report-chart-card canvas{width:100%!important;height:clamp(300px,48vh,560px)!important;min-height:300px!important}.report-chart-card{min-height:clamp(340px,56vh,620px)}
@media(max-width:1400px),(max-height:800px){.config-grid-6{height:calc(100vh - 52px);gap:7px}.config-card{padding:7px;border-radius:12px}.config-card th,.config-card td{padding:4px 5px!important;font-size:11.5px!important}.config-card h2{font-size:14px}.calendar-actions{gap:4px}.calendar-actions .popup-btn{padding:5px 6px;font-size:11.5px}.report-chart-card canvas{height:clamp(260px,44vh,420px)!important}.report-chart-card{min-height:300px}.modal{max-height:94vh}}
@media(max-width:1000px){body.nav-collapsed .sidebar{position:static;width:100%}body.nav-collapsed .container{margin-left:0!important;width:100%!important}.config-grid-6{display:block;height:auto;overflow:visible}.config-card{margin-bottom:10px;height:auto}.table-scroll{max-height:220px}.calendar-actions{margin-top:6px}}
/* Kronos v1.1.2 refinamentos */
:root{--primary:#2e7d32;--primary2:#43a047;--soft-blue:#eef8f0;--sidebar-mini:58px;--sidebar-wide:236px;}
body{background:#f5f8f5}.login-subtitle{font-size:15px;color:#4d6251;margin-top:-4px}.login-card h1{color:#1b5e20}
body.nav-collapsed .sidebar{width:var(--sidebar-mini);position:fixed;left:0;top:0;height:100vh;z-index:100;transition:width .36s cubic-bezier(.2,.8,.2,1);box-shadow:2px 0 16px rgba(27,94,32,.12);overflow:hidden;background:#173b27;color:#fff}
body.nav-collapsed .container{margin-left:var(--sidebar-mini)!important;width:calc(100vw - var(--sidebar-mini))!important;transition:none!important;max-width:none}
body.nav-collapsed .sidebar:hover{width:var(--sidebar-wide);}
body.nav-collapsed .sidebar:hover + .container{margin-left:var(--sidebar-mini)!important;width:calc(100vw - var(--sidebar-mini))!important}
.sidebar a,.side-user,.side-brand{justify-content:flex-start;text-align:left;align-items:center;gap:8px;white-space:nowrap}.sidebar .nav-ico{min-width:34px;text-align:center}.sidebar .nav-label{overflow:visible}.sidebar:hover .nav-label,.sidebar:hover .brand-text,.sidebar:hover .brand-version{display:inline!important;opacity:1!important;transition:opacity .24s ease .08s}
body.nav-collapsed .sidebar .nav-label,body.nav-collapsed .sidebar .brand-text,body.nav-collapsed .sidebar .brand-version{opacity:0;display:none}.side-brand{padding-left:11px}
.btn,button,.popup-btn{background:var(--primary2)}.btn.secondary,.secondary-action{background:#edf7ed;color:#1b5e20;border:1px solid #cde6cf}.warn-btn{background:#ffb300!important;color:#402a00!important}.icon-edit{background:#fbc02d!important;color:#3a2b00!important}.danger,.icon-delete{background:#b3261e!important;color:#fff!important}
.letter-dot,.dot{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;aspect-ratio:1/1;border-radius:50%!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;font-size:10px;font-weight:800;color:#fff;text-decoration:none;padding:0!important;box-sizing:border-box;overflow:hidden}
.planned-dot{background:#fff!important;color:#1b5e20!important;border:2px dashed #1b5e20!important;box-shadow:0 0 0 1px #1b5e20!important}
.hidden{display:none!important}.mini-wrap.hidden{display:none!important}.holiday-alert-name{font-size:20px;font-weight:800;color:#5f4300}.modal-close{position:absolute!important;right:12px!important;top:10px!important;float:none!important}.modal{position:relative}.modal-actions-inline,.form-actions-line{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.modal-actions-inline form{display:inline}.planned-info-big{font-size:16px!important;font-weight:800;color:#223;line-height:1.45}.inline-actions{display:flex!important;gap:6px;align-items:center;justify-content:flex-end}.inline-actions form{display:inline;margin:0}.inline-actions button{padding:5px 8px;min-width:34px}
.config-grid-6{display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:10px!important;height:calc(100vh - 78px)!important;overflow:hidden!important}.config-card{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:9px}.config-card .table-scroll{flex:1;min-height:0;max-height:none;overflow:auto}.config-card table{height:auto;width:100%;table-layout:auto}.config-card th,.config-card td{padding:5px 6px!important;font-size:12px!important;line-height:1.15!important}.config-card .page-head{margin:0 0 5px}.config-card h2{font-size:15px;margin:0}.config-card .popup-btn{padding:5px 8px;font-size:12px}.small-modal{width:min(560px,94vw);max-height:88vh;overflow:visible}.small-modal .grid-form{grid-template-columns:1fr 1fr;gap:9px;padding:10px}.small-modal textarea{min-height:58px}.small-modal h2{margin:.1rem 0 .5rem}.small-modal input,.small-modal select,.small-modal textarea{padding:7px}.pdf-template-box{gap:8px}.pdf-template-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.pdf-template-list button{font-size:12px;padding:7px}
.people-full-page{height:calc(100vh - 28px);overflow:hidden}.full-width-card{height:100%;background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px;display:flex;flex-direction:column;overflow:hidden}.people-table-wrap{flex:1;overflow:auto}.compact-people-table th,.compact-people-table td{padding:7px 8px!important}.compact-people-table .btn{font-size:12px;padding:5px 8px}.people-list.full-width-card{width:100%}
.report-chart-card canvas{height:clamp(280px,58vh,620px)!important;min-height:280px!important}.report-chart-card{min-height:clamp(320px,62vh,680px)!important}.chart-card canvas{max-width:100%}
.calendar-filters select option[value=""]{color:#667}.calendar-actions{gap:6px}.calendar-actions .warn-btn{padding:6px 9px}.legend{z-index:5}
@media(max-width:1400px),(max-height:800px){.config-grid-6{height:calc(100vh - 54px)!important;gap:7px!important}.config-card{padding:6px}.config-card th,.config-card td{padding:4px 5px!important;font-size:11px!important}.small-modal{max-height:94vh}.small-modal .grid-form{gap:6px}.people-full-page{height:calc(100vh - 18px)}.report-chart-card canvas{height:clamp(250px,50vh,430px)!important}.report-chart-card{min-height:290px!important}.letter-dot,.dot{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;font-size:9px}.sidebar:hover{width:var(--sidebar-wide)}}


/* Kronos v1.1.3 - refinamentos solicitados */
:root{--sidebar-wide:268px;--primary:#2e7d32;--primary2:#43a047;--soft-green:#edf7ed;}
body.nav-collapsed .sidebar{transition:width .55s cubic-bezier(.19,1,.22,1)!important;}
.sidebar a,.side-user,.side-brand{justify-content:flex-start!important;text-align:left!important;padding-left:11px!important;}
.sidebar .nav-label{white-space:nowrap;}
.side-brand{justify-content:flex-start!important;}
.letter-dot,.dot,.planned-dot{border-radius:999px!important;aspect-ratio:1/1!important;box-sizing:border-box!important;flex:0 0 auto!important;}
.planned-dot{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;background:#ffffff!important;color:#1b5e20!important;border:2px dashed #1b5e20!important;box-shadow:none!important;}
.dots{align-items:center;}
.calendar-filters select{min-width:145px;max-width:170px;font-size:12px;padding:7px 8px;}
.mini-wrap{margin-top:2px;}
.modal.small-modal,.modal{overflow:visible!important;}
.config-card .actions-cell{text-align:right!important;}
.config-modal-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px;}
.config-modal-form .full{grid-column:1/-1;}
.config-modal-actions{grid-column:1/-1;display:flex!important;align-items:center;justify-content:flex-end;gap:8px;margin-top:4px;}
.config-modal-actions form{display:inline;margin:0;}
.config-modal-actions button{min-width:42px;}
.config-modal-form input,.config-modal-form select,.config-modal-form textarea{padding:7px;}
.config-modal-form .checkline{margin-top:0;padding:7px;}
.small-modal h2{font-size:20px;line-height:1.1;padding-right:42px;}
.pdf-template-list button{text-align:center;}
#feriadoAviso .holiday-alert-name{font-size:24px!important;line-height:1.25;margin:10px 0;color:#6a4a00;}
#feriadoAviso h2{font-size:22px;}
.planned-info-big{font-size:18px!important;}
.modal-actions-inline{justify-content:center!important;}
.modal-actions-inline button{white-space:nowrap;}
.people-full-page .page-head{margin-bottom:8px;}
.report-chart-card canvas{height:min(62vh,640px)!important;}
@media(max-width:1400px),(max-height:800px){
  :root{--sidebar-wide:258px;}
  .calendar-filters select{min-width:128px;max-width:145px;font-size:11.5px;padding:6px;}
  .modal.small-modal{width:min(600px,94vw)!important;}
  .small-modal h2{font-size:18px;}
  .config-modal-form{gap:6px;}
  .config-modal-form input,.config-modal-form select,.config-modal-form textarea{padding:6px;}
  #feriadoAviso .holiday-alert-name{font-size:21px!important;}
}

/* Kronos v1.1.5 hotfix: estabilidade visual da v1.1.3 + submenu funcional */
.sidebar .side-link{
  width:100%; border:0; background:transparent!important; color:#fff!important;
  display:flex; align-items:center; gap:10px; border-radius:12px;
  padding:10px 12px; font-weight:800; margin:2px 0; text-align:left;
}
.sidebar .side-link:hover,.sidebar .side-link.open{background:#ffffff18!important;}
.config-submenu{display:none; margin:0 0 4px 0; padding:0 0 0 0; overflow:hidden;}
.config-submenu.open{display:block;}
.config-submenu a{font-size:12px; padding:7px 12px 7px 18px!important; opacity:.96;}
.config-submenu .nav-ico{font-size:16px; min-width:32px;}
body.nav-collapsed .config-submenu{display:none!important;}
body.nav-collapsed .sidebar:hover .config-submenu.open{display:block!important;}
body.nav-collapsed .sidebar:hover .config-submenu a{justify-content:flex-start!important;}
body.nav-collapsed .sidebar:hover .config-submenu .nav-label{display:inline!important; opacity:1!important;}
.sidebar a,.sidebar .side-link,.side-user,.side-brand{justify-content:flex-start!important;text-align:left!important;}
.nav-ico{flex:0 0 32px; min-width:32px!important; text-align:center!important;}
body.nav-collapsed .sidebar a,body.nav-collapsed .sidebar .side-link,body.nav-collapsed .side-user{justify-content:flex-start!important;padding-left:11px!important;}
body.nav-collapsed .sidebar:hover a,body.nav-collapsed .sidebar:hover .side-link,body.nav-collapsed .sidebar:hover .side-user{justify-content:flex-start!important;}
.edit-funcionario-modal{width:min(760px,94vw)!important;}
.compact-person-form textarea{min-height:60px;}
.compact-person-form{gap:9px!important;padding:12px!important;}
.compact-person-form input,.compact-person-form select,.compact-person-form textarea{padding:7px!important;}
@media(max-width:1400px),(max-height:800px){
  .sidebar .side-link{padding:8px 9px;font-size:13px;}
  .config-submenu a{padding:6px 9px 6px 16px!important;font-size:11.5px;}
  .compact-person-form{grid-template-columns:1fr 1fr;gap:7px!important;padding:10px!important;}
  .compact-person-form textarea{min-height:48px;}
}

/* Kronos v1.1.6 — polish/layout overrides */
:root{--primary:#2e7d32;--primary2:#43a047;--primary-dark:#173b27;--sidebar-mini:58px;--sidebar-wide:268px;--transition-soft:.42s cubic-bezier(.2,.8,.2,1)}
body{overflow:hidden}.container{max-width:none!important;transition:none!important}
body.nav-collapsed .sidebar{width:var(--sidebar-mini)!important;transition:width .62s cubic-bezier(.19,1,.22,1)!important;will-change:width;overflow:hidden!important}
body.nav-collapsed .sidebar:hover{width:var(--sidebar-wide)!important}
.sidebar a,.sidebar .side-link,.side-user,.side-brand{display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;gap:0!important;padding-left:10px!important;padding-right:8px!important;box-sizing:border-box!important;width:var(--sidebar-wide)!important;min-height:40px;transition:background .22s ease!important}
.sidebar .nav-ico{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:38px!important;min-width:38px!important;max-width:38px!important;text-align:center!important;flex:0 0 38px!important;margin:0!important;line-height:1!important}
.sidebar .nav-label,.sidebar .brand-text,.sidebar .brand-version{margin-left:8px!important;white-space:nowrap!important;transition:opacity .28s ease .08s!important}
body.nav-collapsed .sidebar:not(:hover) .nav-label,body.nav-collapsed .sidebar:not(:hover) .brand-text,body.nav-collapsed .sidebar:not(:hover) .brand-version{opacity:0!important;visibility:hidden!important;display:inline!important}
body.nav-collapsed .sidebar:hover .nav-label,body.nav-collapsed .sidebar:hover .brand-text,body.nav-collapsed .sidebar:hover .brand-version{opacity:1!important;visibility:visible!important;display:inline!important}
.side-brand{height:50px!important}.side-brand .nav-ico{font-size:22px}.brand-version{font-size:10px!important;opacity:.72!important}.config-submenu{max-height:0!important;display:block!important;overflow:hidden!important;transition:max-height .36s ease, opacity .28s ease!important;opacity:0!important}.config-submenu.open{max-height:340px!important;opacity:1!important}.config-submenu a{padding-left:15px!important;font-size:12px!important;min-height:34px!important}.config-submenu .nav-ico{font-size:16px!important;width:38px!important;min-width:38px!important}
.modal-close{position:absolute!important;right:12px!important;top:10px!important}.modal{position:relative}.modal.small-modal,.modal.config-action-modal{overflow:visible!important;max-height:92vh!important}.config-action-modal{width:min(680px,94vw)!important}.config-modal-form{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:8px!important}.config-modal-form .full{grid-column:1/-1}.config-modal-actions{grid-column:1/-1!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;margin-top:4px!important}.config-modal-actions button{min-width:44px}.config-modal-form input,.config-modal-form select,.config-modal-form textarea{padding:8px!important}.config-page{height:calc(100vh - 32px);overflow:hidden;display:flex;flex-direction:column;gap:10px}.config-page-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 2px 8px #00000008;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.full-table-scroll{flex:1;min-height:0;overflow:auto;border-radius:14px}.full-table-scroll table{box-shadow:none}.full-table-scroll th,.full-table-scroll td{padding:9px!important;text-align:center!important}.full-table-scroll td:first-child,.full-table-scroll th:first-child{text-align:center!important}.pdf-editor-grid{display:grid;grid-template-columns:minmax(340px,420px) 1fr;gap:18px;min-height:0;flex:1}.pdf-preview{border:1px solid var(--line);border-radius:16px;background:#f8fbf8;padding:16px;overflow:auto}.pdf-preview h3{font-size:22px;margin:0 0 14px}.pdf-template-form{background:#fff!important;border:1px solid var(--line);border-radius:16px;padding:14px!important}
.letter-dot,.dot,.planned-dot{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;aspect-ratio:1/1!important;border-radius:999px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;padding:0!important;box-sizing:border-box!important;overflow:hidden!important;font-size:10px!important;font-weight:800!important;text-decoration:none!important;color:#fff;vertical-align:middle}.planned-dot{background:#fff!important;color:#1b5e20!important;border:2px dashed #1b5e20!important;box-shadow:none!important}.dots{align-items:center!important}.today-summary{display:none!important}
.reports-page{height:calc(100vh - 32px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;gap:10px!important}.report-summary-grid{transition:all .46s cubic-bezier(.2,.8,.2,1)!important}.reports-page.all-people-summary .report-summary-grid{flex:1 1 auto!important;max-height:none!important;min-height:0!important;grid-template-columns:1fr 1fr!important}.reports-page.has-person-chart .report-summary-grid{flex:0 0 210px!important;max-height:230px!important}.history-report-card{animation:slideUpSoft .42s cubic-bezier(.2,.8,.2,1);transition:all .42s cubic-bezier(.2,.8,.2,1)}@keyframes slideUpSoft{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}.report-chart-card{flex:1!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important}.report-chart-card canvas{width:100%!important;height:auto!important;max-width:100%!important;display:block!important;margin:auto}.chart-legend{flex:0 0 auto}.summary-scroll{height:calc(100% - 30px)!important}.summary-scroll th,.summary-scroll td{text-align:center!important}.actions-cell{text-align:right!important}.compact-report-head{margin-bottom:0!important}.report-main-filters{flex:0 0 auto!important;margin:0!important}.history-report-card h2{font-size:18px!important}
.people-full-page{height:calc(100vh - 32px)!important;overflow:hidden!important}.people-list{height:100%;display:flex;flex-direction:column;overflow:hidden}.people-table-wrap{flex:1;min-height:0;overflow:auto}.compact-people-table th,.compact-people-table td{padding:8px!important}.edit-funcionario-modal{width:min(760px,94vw)!important}
.hidden{display:none!important}.mini-wrap.hidden{display:none!important}.mini-resumo-inline{display:block;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#173b27!important;font-weight:700!important}.planned-info-big{font-size:17px!important;font-weight:800!important;color:#223!important;line-height:1.45!important}.modal-actions-inline{display:flex!important;gap:8px!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important}.modal-actions-inline form{display:inline!important;margin:0!important}
@media(max-width:1400px),(max-height:800px){.container{padding:10px!important}.calendar-shell{height:calc(100vh - 48px)!important}.reports-page,.config-page,.people-full-page{height:calc(100vh - 20px)!important}.report-main-filters select{min-width:112px!important;width:130px!important;padding:6px!important}.report-main-filters .btn{padding:6px 8px!important;font-size:12px!important}.reports-page.has-person-chart .report-summary-grid{flex-basis:170px!important;max-height:185px!important}.summary-panel{padding:7px!important}.summary-panel h2{font-size:14px!important}.summary-scroll th,.summary-scroll td{padding:5px!important;font-size:11.5px!important}.chart-head{gap:8px!important}.compact-chart-filters select{width:110px!important;min-width:100px!important}.config-action-modal{width:min(640px,96vw)!important}.config-modal-form{gap:7px!important}.config-modal-form input,.config-modal-form select,.config-modal-form textarea{padding:6px!important}.full-table-scroll th,.full-table-scroll td{padding:6px!important;font-size:12px!important}.pdf-editor-grid{grid-template-columns:360px 1fr;gap:10px}.compact-people-table th,.compact-people-table td{padding:6px!important;font-size:12px!important}.letter-dot,.dot,.planned-dot{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important}}
@media(max-width:1050px){body{overflow:auto}.reports-page,.config-page,.people-full-page{height:auto!important;overflow:visible!important}.pdf-editor-grid{grid-template-columns:1fr}.reports-page.all-people-summary .report-summary-grid,.report-summary-grid{grid-template-columns:1fr!important;max-height:none!important;flex:auto!important}.summary-scroll{max-height:260px;overflow:auto}.sidebar{position:fixed!important}}

/* Kronos v1.1.7 — regras individuais, folgas especiais e aniversários */
.company-anniv-day{background:#dff4df!important;border-color:#7ac77a!important;box-shadow:inset 0 0 0 1px #a7dca7!important}.company-anniv-modal h2{color:#1b5e20}.company-anniv-text{font-size:18px;line-height:1.35;color:#173b27}.two-block-config{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;overflow:hidden!important}.config-block{display:flex;flex-direction:column;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;padding:12px;background:#fff}.config-block .full-table-scroll{flex:1;min-height:0;overflow:auto}.regras-modal{width:min(900px,94vw)!important}.regras-form{grid-template-columns:1fr 1fr!important}.special-rules-box{border:1px solid var(--line);border-radius:14px;background:#f8fbf8;padding:10px}.special-rules-box h4{margin:0 0 8px 0}.special-rules-box .inline-form{display:flex;gap:8px;margin-bottom:8px}.small-table th,.small-table td{padding:6px!important;font-size:12px!important}.frozen-field{background:#f1f3f2!important;color:#65706a!important;font-style:italic!important}.config-page .page-head h1{margin-bottom:4px}.config-page-card>.page-head h2{display:none}.pdf-editor-page{overflow:hidden}.pdf-template-form textarea{min-height:90px}.pdf-preview table{margin-top:12px}.modal .modal-close button{background:transparent!important;color:#333!important;border:0!important;font-weight:900;font-size:16px;padding:4px 7px!important}.modal .modal-close button:hover{background:#f0f0f0!important}.tipo-especial-info{font-size:12px;color:#1b5e20;font-weight:700;margin-top:2px;display:block}.config-action-modal{max-height:90vh!important;overflow:visible!important}.config-modal-actions{position:relative}.config-modal-actions .danger{margin-left:auto}
@media(max-width:1400px),(max-height:800px){.two-block-config{gap:8px!important}.config-block{padding:8px}.regras-modal{width:min(820px,96vw)!important}.special-rules-box .inline-form select{max-width:360px}.company-anniv-text{font-size:16px}.pdf-editor-grid{grid-template-columns:330px 1fr!important}}
@media(max-width:1050px){.two-block-config{grid-template-columns:1fr!important;overflow:auto!important}.regras-form{grid-template-columns:1fr!important}}

/* Kronos v1.1.8 — UX, regras individuais e editor PDF */
.sidebar{transition:width .85s cubic-bezier(.16,1,.3,1)!important;}
body.nav-collapsed .sidebar{transition:width .85s cubic-bezier(.16,1,.3,1)!important;}
body.nav-collapsed .sidebar:hover{transition:width .85s cubic-bezier(.16,1,.3,1)!important;}
.sidebar a,.sidebar .side-link,.side-user,.side-brand{transition:background .25s ease, opacity .25s ease!important;}
.modal-close{height:0!important;margin:0!important;padding:0!important;}
.edit-funcionario-modal h2{margin-top:.2rem!important;}
.regras-subtitle{margin:2px 0 0!important;color:#173b27;font-size:15px;}
.regras-modal .special-rules-box{margin-top:8px;}
.regras-modal .inline-form select{flex:1;}
.holiday-alert-name{font-size:20px!important;line-height:1.35;}
.advanced-pdf-editor{padding:10px!important;}
.pdf-editor-toolbar{background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px;margin-bottom:10px;}
.pdf-template-form.advanced{display:block!important;background:transparent!important;border:0!important;padding:0!important;}
.toolbar-row{display:flex;gap:8px;align-items:end;flex-wrap:wrap;}
.toolbar-row label{font-weight:700;min-width:170px;}
.toolbar-row input,.toolbar-row select{padding:7px!important;}
.small-toolbar{align-items:center;color:var(--muted);font-size:12px;margin-top:6px;}
.upload-logo{background:var(--primary2);color:#fff;padding:7px 10px;border-radius:9px;cursor:pointer;min-width:auto!important;}
.upload-logo input{display:none;}
.a4-editor-wrap{flex:1;min-height:0;overflow:auto;background:#e9efe9;border-radius:16px;padding:18px;display:flex;justify-content:center;}
.a4-canvas{width:794px;height:1123px;background:white;position:relative;box-shadow:0 8px 34px #0002;background-image:linear-gradient(#0000000e 1px,transparent 1px),linear-gradient(90deg,#0000000e 1px,transparent 1px),linear-gradient(#2e7d3222 1px,transparent 1px),linear-gradient(90deg,#2e7d3222 1px,transparent 1px);background-size:20px 20px,20px 20px,100px 100px,100px 100px;transform-origin:top center;}
.pdf-element{position:absolute;border:1px dashed #2e7d3277;padding:4px;background:#ffffffd8;cursor:move;min-width:60px;min-height:20px;box-sizing:border-box;overflow:hidden;}
.pdf-element.moving{outline:2px solid #2e7d32;background:#f3fff3;}
.pdf-title{font-size:24px;font-weight:900;text-align:center;}
.pdf-text{font-size:13px;}
.pdf-table{font-size:11px;overflow:auto;}
.pdf-table table{box-shadow:none;border-radius:0;width:100%;}
.pdf-table th,.pdf-table td{padding:5px!important;text-align:center!important;border:1px solid #d7ded7!important;}
.pdf-image{object-fit:contain;border:1px dashed #2e7d3277;}
@media(max-width:1400px),(max-height:800px){.a4-canvas{transform:scale(.72);margin-bottom:-300px}.a4-editor-wrap{padding:10px}.toolbar-row label{min-width:145px}.holiday-alert-name{font-size:18px!important}}


/* v1.1.9 refinamentos: Pessoas apenas tabela + regras no popup */
.people-full-page{height:calc(100vh - 18px)!important;overflow:hidden!important;display:block!important;}
.people-list.full-width-card{height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
.people-table-wrap{flex:1!important;min-height:0!important;overflow:auto!important;}
.regras-modal{width:min(780px,92vw)!important;max-height:min(680px,92vh)!important;overflow:visible!important;}
.regras-form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
.special-rules-box{max-height:390px;overflow:hidden;display:flex;flex-direction:column;}
.special-rules-box .inline-form{display:grid!important;grid-template-columns:1fr 42px!important;align-items:center;}
.special-rules-table-wrap{max-height:205px;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff;}
.special-rules-table-wrap table{margin:0!important;}
.special-rules-table-wrap th,.special-rules-table-wrap td{height:34px!important;}

/* v1.1.9 editor de PDF com guias e elementos redimensionáveis */
.pdf-editor-toolbar .toolbar-row button,.pdf-editor-toolbar .upload-logo{min-width:98px;height:34px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px!important;padding:6px 8px!important;}
.a4-canvas{background-color:#fff!important;background-image:linear-gradient(#2e7d3218 1px,transparent 1px),linear-gradient(90deg,#2e7d3218 1px,transparent 1px)!important;background-size:20px 20px!important;position:relative!important;}
.a4-canvas.magnet-off{background-image:linear-gradient(#9992 1px,transparent 1px),linear-gradient(90deg,#9992 1px,transparent 1px)!important;}
.pdf-element{resize:none!important;overflow:hidden!important;}
.pdf-element.selected{outline:2px solid #2e7d32!important;box-shadow:0 0 0 3px #2e7d3222!important;}
.pdf-element .resize-handle{position:absolute;right:0;bottom:0;width:13px;height:13px;background:#2e7d32;border-radius:8px 0 0 0;cursor:nwse-resize;z-index:5;}
.pdf-table table{width:100%;height:auto;border-collapse:collapse;table-layout:fixed;}
.pdf-table th,.pdf-table td{border:1px solid #9dbb9d;padding:4px;font-size:11px;min-width:40px;overflow:hidden;}
.pdf-image{object-fit:contain;background:#fff;}
.advanced-pdf-editor .toolbar-row.small-toolbar span{font-size:12px;color:#335c39;font-weight:700;}

/* Configuração: título dedicado sem repetição visual */
.config-page.dedicated-config .page-head h1{font-size:22px;margin:0 0 10px 0;}
.config-page-card{height:calc(100vh - 92px);overflow:hidden;display:flex;flex-direction:column;}
.config-page-card .full-table-scroll{flex:1;min-height:0;overflow:auto;}

/* v1.1.11 fixes */
.config-block .page-head h2, .config-page-card .page-head h2{white-space:nowrap; font-size:18px;}
#tipoLabel.hidden{display:none!important;}
/* v1.1.12 refinamentos operacionais */
.dot.letter-dot, button.dot.letter-dot { width: 24px; height: 24px; min-width: 24px; min-height: 24px; aspect-ratio: 1 / 1; border-radius: 999px; display:inline-flex; align-items:center; justify-content:center; line-height:1; padding:0; box-sizing:border-box; border:0; overflow:hidden; text-decoration:none; color:#fff; font-weight:700; }
.planned-dot { outline: 2px dashed rgba(255,255,255,.9); outline-offset: -4px; opacity:.92; }
.pendencias-scroll { max-height: 560px; overflow-y:auto; }
@media (max-height: 820px){ .pendencias-scroll { max-height: 460px; } }
.mini-calendar button.mini-planned { color:#c62828; font-weight:800; border-color:#ef9a9a; background:#fff7f7; text-decoration:none; cursor:pointer; }
.mini-calendar button.mini-planned:hover { background:#ffebee; }
.single-line-actions { display:flex; gap:.45rem; justify-content:center; align-items:center; flex-wrap:nowrap; }
.liberacao-lista { max-height: 360px; overflow-y:auto; display:grid; grid-template-columns: 1fr 1fr; gap:.25rem .75rem; }
.tiny-btn { padding:.35rem .55rem; font-size:.78rem; white-space:nowrap; }
.day-detail-list{display:flex;flex-direction:column;gap:10px;max-height:58vh;overflow:auto;padding-right:4px}.day-detail-card{border:1px solid #d8e5da;border-radius:12px;padding:10px;background:#f8fbf8}.day-detail-card b{font-size:1.02rem;color:#183c24}.day-detail-card span{display:block;margin-top:4px;color:#334155}.dot.letter-dot{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;border-radius:50%!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;aspect-ratio:1/1!important}.planned-dot{background:transparent!important;border:2px dashed currentColor!important;color:#1b5e20!important}.pendencias-scroll{max-height:60vh;overflow:auto}.confirm-action[style*="display: none"]{display:none!important}

/* v1.1.16 - calendário com células uniformes por mês */
.calendar.compact-calendar{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  grid-template-rows:repeat(var(--weeks, 6), minmax(0,1fr));
  align-items:stretch;
}
.calendar.compact-calendar .day{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
}
.calendar.compact-calendar .dots{
  overflow:hidden;
  align-content:flex-start;
}
.report-period-selector{min-width:120px!important;}

/* Kronos v1.1.18 — relatórios personalizados e PDFs padronizados */
.people-list .inline-actions .icon-edit,
.people-list .inline-actions .btn.secondary{
  min-width:160px!important;
  height:32px!important;
  padding:7px 10px!important;
  font-size:12.5px!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.report-main-filters .multi-month-select{
  min-width:150px!important;
  height:70px!important;
  padding:4px 8px!important;
}
.report-main-filters .pdf-action-btn{
  min-width:112px!important;
  height:32px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* Kronos v1.1.19 — hotfix PDF ReportLab alignment */

/* Kronos v1.1.22 — Logs sem legendas, UTC-3 e formato próximo ao CMD */
.logs-two-column-page{
  height:calc(100vh - 86px)!important;
  overflow:hidden!important;
  padding:12px!important;
}
.logs-two-col{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
  height:100%;
  min-height:0;
}
.log-panel{
  min-height:0;
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border:1px solid #d8ead7;
  border-radius:16px;
  background:#fff;
  padding:12px;
  box-shadow:0 6px 18px rgba(22,53,31,.06);
}
.log-panel .compact-head{
  flex:0 0 auto;
  margin-bottom:8px!important;
}
.log-panel .compact-head h2{
  margin:0 0 3px 0!important;
  font-size:18px!important;
}
.logs-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto!important;
  border:1px solid #e4efe3;
  border-radius:12px;
  background:#fbfefb;
}
.compact-log-table{
  width:100%;
  table-layout:fixed;
  font-size:11px!important;
}
.compact-log-table th,
.compact-log-table td{
  padding:5px 6px!important;
  line-height:1.2!important;
  vertical-align:middle!important;
  word-break:break-word;
}
.compact-log-table thead th{
  position:sticky;
  top:0;
  background:#D1FFBA!important;
  color:#16351f!important;
  z-index:2;
}
.technical-log{
  flex:1 1 auto;
  min-height:0;
  overflow:auto!important;
  white-space:pre-wrap;
  word-break:break-word;
  user-select:text;
  resize:none;
  margin:0;
  border:1px solid #e4efe3;
  border-radius:12px;
  padding:10px 12px;
  background:#101814;
  color:#d9fbe0;
  font-family:Consolas, 'Courier New', monospace;
  font-size:11px;
  line-height:1.32;
}
@media (max-width: 1100px){
  .logs-two-col{grid-template-columns:1fr;}
  .logs-two-column-page{height:auto!important;overflow:auto!important;}
  .log-panel{height:42vh;}
}

/* v1.1.23 */
@keyframes kronosPulsePendencia{0%,100%{box-shadow:0 0 0 0 rgba(255,179,0,.55);filter:brightness(1)}50%{box-shadow:0 0 0 6px rgba(255,179,0,.18);filter:brightness(1.08)}}
.warn-btn{animation:kronosPulsePendencia 1.15s ease-in-out infinite;}
.calendar-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.calendar-filters select{max-width:170px;min-width:138px}
.multi-month-select{min-width:190px;max-width:220px;height:auto}

/* v1.1.24 - filtro por funcionário mais legível */
.calendar-filters select[name="funcionario_id"]{min-width:220px!important;max-width:260px!important;width:240px!important;padding-right:28px!important;}
@media(max-width:1400px),(max-height:800px){.calendar-filters select[name="funcionario_id"]{min-width:190px!important;max-width:230px!important;width:210px!important;}}

/* v1.2.0 - Gestão de dados */
.data-management-page{height:calc(100vh - 34px);display:flex;flex-direction:column;gap:12px;overflow:hidden!important;}
.data-actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:0 0 auto;}
.data-card,.data-panel{border:1px solid #d8ead7;border-radius:16px;background:#fff;padding:14px;box-shadow:0 6px 18px rgba(22,53,31,.05);}
.data-card h2,.data-panel h2{margin:0 0 8px 0;font-size:18px;color:#16351f;}
.data-card p{margin:4px 0;}
.data-button-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;}
.button-link{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:10px;background:#2e7d32;color:#fff;text-decoration:none;font-weight:800;padding:9px 13px;font-size:14px;}
.compact-upload-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px;}
.compact-upload-form input[type=file]{max-width:330px;border:1px solid #cfe5cf;border-radius:10px;padding:8px;background:#fbfffb;}
.data-two-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:0 0 190px;min-height:0;}
.data-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden;}
.data-scroll-small{overflow:auto;border:1px solid #e4efe3;border-radius:12px;background:#fbfefb;min-height:0;flex:1 1 auto;}
.import-preview-block{flex:1 1 auto;min-height:0;overflow:auto;border:1px solid #d8ead7;border-radius:16px;background:#fff;padding:12px;}
.import-selection-form{display:flex;flex-direction:column;gap:10px;}
.import-mode-row{position:sticky;top:0;background:#fff;z-index:4;padding:8px;border-bottom:1px solid #edf5ed;}
.preview-table-card{border:1px solid #dfeee0;border-radius:12px;background:#fbfefb;padding:8px 10px;}
.preview-table-card summary{cursor:pointer;font-weight:800;color:#16351f;display:flex;gap:12px;align-items:center;justify-content:space-between;}
.preview-table-card summary small{font-weight:500;color:#6a7b6b;}
.preview-scroll{max-height:220px;overflow:auto;margin-top:8px;border:1px solid #e4efe3;border-radius:10px;background:#fff;}
.discard-note{margin:4px 0 0 0;font-size:12px;color:#5e6d60;}
@media(max-width:1100px){.data-actions-grid,.data-two-columns{grid-template-columns:1fr}.data-management-page{height:auto;overflow:auto!important}.import-preview-block{max-height:60vh}}


/* Kronos v1.2.0 — Mobile responsivo / navegador celular
   Objetivo: manter desktop intacto e criar experiência própria para telas estreitas. */
:root{--mobile-nav-h:64px;--mobile-safe-bottom:env(safe-area-inset-bottom,0px)}
@media (max-width: 860px){
  html,body{width:100%;min-height:100%;overflow-x:hidden!important;background:#f5f8f5;font-size:14px;-webkit-text-size-adjust:100%;}
  body.nav-collapsed .container,
  body.nav-collapsed .sidebar:hover + .container{
    margin-left:0!important;width:100%!important;max-width:none!important;
    padding:8px 8px calc(var(--mobile-nav-h) + 14px + var(--mobile-safe-bottom)) 8px!important;
  }
  h1{font-size:20px;line-height:1.15} h2{font-size:17px;line-height:1.18;margin:.55rem 0}.page-head{gap:8px;margin-bottom:8px}.page-head,.calendar-header{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.actions{display:flex;gap:6px;flex-wrap:wrap}.btn,button,.button-link{min-height:38px;padding:8px 10px;border-radius:10px;font-size:13px;line-height:1.1;touch-action:manipulation}.btn.secondary{border:1px solid #cfe5cf}

  /* Navegação mobile: barra inferior. Em celular não há hover, então o menu vira toque. */
  body.nav-collapsed .sidebar{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;
    width:100%!important;height:calc(var(--mobile-nav-h) + var(--mobile-safe-bottom))!important;
    padding:4px 4px calc(4px + var(--mobile-safe-bottom)) 4px!important;
    z-index:999!important;background:#173b27!important;display:flex!important;align-items:center!important;
    justify-content:space-around!important;gap:2px!important;overflow:visible!important;
    box-shadow:0 -4px 22px rgba(0,0,0,.18)!important;transition:none!important;
  }
  body.nav-collapsed .sidebar:hover{width:100%!important}
  .side-brand,.side-user,.side-spacer{display:none!important}
  .sidebar a,.sidebar .side-link{height:52px!important;min-width:52px!important;max-width:76px!important;width:auto!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:1px!important;margin:0!important;padding:4px 5px!important;border-radius:12px!important;text-align:center!important;white-space:nowrap!important;background:transparent!important;color:#fff!important;overflow:hidden!important;}
  .sidebar .nav-ico{min-width:0!important;width:auto!important;text-align:center!important;font-size:21px!important;line-height:1!important;display:block!important;margin:0!important;}
  body.nav-collapsed .sidebar .nav-label,body.nav-collapsed .sidebar .brand-text,body.nav-collapsed .sidebar .brand-version{display:block!important;opacity:1!important;font-size:10px!important;line-height:1.05!important;max-width:72px!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .sidebar a:hover,.sidebar .side-link:hover,.sidebar .side-link.open{background:#ffffff18!important;}
  .config-submenu{position:fixed!important;left:8px!important;right:8px!important;bottom:calc(var(--mobile-nav-h) + 8px + var(--mobile-safe-bottom))!important;background:#173b27!important;border:1px solid #ffffff24!important;border-radius:18px!important;box-shadow:0 10px 34px rgba(0,0,0,.28)!important;padding:8px!important;display:none!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;z-index:1001!important;max-height:58vh!important;overflow:auto!important;}
  .config-submenu.open{display:grid!important;}
  .config-submenu a{max-width:none!important;width:100%!important;height:44px!important;flex-direction:row!important;justify-content:flex-start!important;text-align:left!important;padding:8px 10px!important;border-radius:12px!important;}
  .config-submenu a .nav-label{font-size:12px!important;max-width:none!important;}

  /* Calendário mobile */
  .calendar-shell{height:auto!important;min-height:0!important;overflow:visible!important;padding:0!important;}
  .calendar-topline{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin-bottom:6px!important;}
  .calendar-title-block h1{text-align:center;font-size:20px;margin:0 0 2px 0!important;}
  .calendar-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:2px 0!important;}
  .calendar-filters select,.calendar-filters select[name="funcionario_id"]{width:100%!important;min-width:0!important;max-width:none!important;height:38px!important;font-size:12.5px!important;padding:7px 26px 7px 8px!important;}
  .calendar-filters select[name="funcionario_id"]{grid-column:1/-1!important;}
  .calendar-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0!important;}
  .calendar-actions .popup-btn,.calendar-actions .warn-btn{width:100%!important;min-height:38px!important;font-size:12.5px!important;padding:7px 5px!important;white-space:normal!important;}
  .calendar-actions .warn-btn{grid-column:1/-1!important;}
  .month-nav.centered-nav,.month-nav{display:grid!important;grid-template-columns:1fr .65fr 1fr!important;gap:6px!important;margin:6px 0!important;width:100%!important;}
  .month-nav .btn{padding:7px 4px!important;min-height:36px!important;font-size:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;}
  .weekdays{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;margin-top:4px!important}.weekdays div{font-size:10.5px!important;}
  .calendar.compact-calendar,.calendar{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;height:auto!important;min-height:0!important;}
  .day{min-height:58px!important;height:calc((100vh - 265px - var(--mobile-nav-h)) / var(--weeks,6))!important;max-height:82px!important;border-radius:9px!important;padding:3px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
  .date-number{font-size:12px!important;line-height:1!important;margin-bottom:2px!important}.dots{gap:2px!important;margin:1px 0!important;align-content:flex-start!important;overflow:hidden!important}.letter-dot,.dot,.planned-dot{width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;font-size:8.5px!important;border-width:1.5px!important}.more{font-size:9px!important;padding:0 3px!important;line-height:14px!important}.legend{position:static!important;max-width:100%!important;margin-top:6px!important;padding:5px 7px!important;border-radius:10px!important;font-size:10px!important;gap:6px!important;box-shadow:none!important;max-height:58px!important;overflow:auto!important}.legend i{width:9px!important;height:9px!important;}

  /* Popups mobile viram tela cheia, evitando cortes em formulários grandes. */
  dialog.modal,dialog.small-modal,dialog.wide-modal{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;padding:14px 12px calc(16px + var(--mobile-safe-bottom)) 12px!important;overflow:auto!important;}
  .modal-close{position:fixed!important;right:10px!important;top:8px!important;z-index:3!important}.modal-close button{width:38px!important;height:38px!important;border-radius:999px!important;padding:0!important;background:#b3261e!important;color:#fff!important}.modal h2{padding-right:46px!important;font-size:19px!important}.grid-form,.small-modal .grid-form,.config-modal-form{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:8px!important;border-radius:12px!important}.grid-form .full,.config-modal-form .full{grid-column:1!important}input,select,textarea{font-size:16px!important;padding:9px!important;border-radius:10px!important}.checkline{margin-top:0!important;padding:9px!important}.mini-calendar{grid-template-columns:repeat(7,1fr)!important}.mini-day{min-height:38px!important}.mini-wrap{max-height:none!important}.modal-actions-inline,.form-actions-line,.config-modal-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}.modal-actions-inline button,.modal-actions-inline .btn,.config-modal-actions button{width:100%!important}

  /* Relatórios: controles empilhados, tabelas com rolagem e gráfico sem distorção. */
  .reports-page{height:auto!important;overflow:visible!important}.compact-report-head{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important}.report-main-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:6px 0!important}.report-main-filters select,.report-main-filters button{width:100%!important;min-width:0!important;max-width:none!important}.report-main-filters select[name="funcionario_id"],.multi-month-select,.apply-custom-months{grid-column:1/-1!important}.multi-month-select{height:130px!important}.pdf-action-btn{font-size:12.5px!important}.report-summary-grid{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.summary-panel{min-height:0!important;border-radius:14px!important;padding:8px!important}.summary-panel h2{font-size:15px!important;margin:0 0 6px!important}.summary-scroll{max-height:34vh!important;overflow:auto!important}.history-report-card,.compact-history-card{border-radius:14px!important;padding:8px!important}.compact-history-head{display:block!important}.compact-chart-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.history-btn{grid-column:1/-1!important}.report-chart-card,.timeline.chart-card{min-height:260px!important;height:auto!important;padding:8px!important}.report-chart-card canvas{height:260px!important;min-height:240px!important;max-height:300px!important;width:100%!important;}

  /* Tabelas gerais: scroll horizontal controlado em vez de estourar viewport. */
  table{font-size:12px!important;min-width:560px!important}th,td{padding:7px 8px!important}.summary-scroll,.table-scroll,.people-table-wrap,.data-scroll-small,.preview-scroll,.logs-scroll{overflow:auto!important;-webkit-overflow-scrolling:touch!important}.centered-table th,.centered-table td{text-align:center!important}.actions-cell{text-align:right!important;white-space:nowrap!important}.compact-log-table{min-width:720px!important}.technical-log{font-size:10.5px!important;line-height:1.3!important}

  /* Pessoas */
  .people-full-page{height:auto!important;overflow:visible!important}.full-width-card{height:auto!important;min-height:0!important;padding:9px!important;border-radius:14px!important}.people-table-wrap{max-height:calc(100vh - 210px - var(--mobile-nav-h))!important;overflow:auto!important}.compact-people-table .btn{font-size:11.5px!important;padding:6px 7px!important;white-space:nowrap!important}

  /* Configurações e gestão de dados */
  .config-section,.config-card,.data-card,.data-panel{border-radius:14px!important;padding:9px!important}.config-grid-6{display:block!important;height:auto!important;overflow:visible!important}.config-card{height:auto!important;margin-bottom:8px!important}.data-management-page{height:auto!important;overflow:visible!important}.data-actions-grid,.data-two-columns,.logs-two-col{grid-template-columns:1fr!important}.data-button-row,.compact-upload-form{display:grid!important;grid-template-columns:1fr!important}.compact-upload-form input[type=file]{max-width:none!important;width:100%!important}.import-preview-block{max-height:none!important}.log-panel{height:42vh!important;min-height:260px!important}.logs-two-column-page{height:auto!important;overflow:visible!important;padding:8px!important}
}

/* Celulares muito estreitos */
@media (max-width: 390px){
  .calendar-filters{grid-template-columns:1fr!important}.calendar-actions{grid-template-columns:1fr!important}.month-nav.centered-nav,.month-nav{grid-template-columns:1fr!important}.day{height:64px!important}.letter-dot,.dot,.planned-dot{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;font-size:8px!important}.sidebar a,.sidebar .side-link{min-width:48px!important}.sidebar .nav-label{font-size:9px!important}.report-main-filters{grid-template-columns:1fr!important}
}

/* Tablet: mantém navegação lateral, mas reduz densidade sem quebrar telas. */
@media (min-width:861px) and (max-width:1180px){
  body.nav-collapsed .container{max-width:none!important;padding:12px!important}.calendar-filters{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}.calendar-filters select,.calendar-filters select[name="funcionario_id"]{width:100%!important;max-width:none!important;min-width:0!important}.calendar-actions{flex-wrap:wrap!important}.report-summary-grid{grid-template-columns:1fr!important}.config-grid-6{height:auto!important;display:grid!important;grid-template-columns:1fr 1fr!important}.summary-scroll{max-height:38vh!important;overflow:auto!important}.modal{max-height:92vh!important;overflow:auto!important}
}


/* Kronos v1.2.1 — polimento mobile e modo consulta */
@media (max-width: 860px){
  /* Mobile será prioritariamente consulta: deixa apenas Calendário, Relatórios e Sair visíveis. */
  .sidebar a[href*="/pessoas"],
  .sidebar .config-toggle,
  .sidebar .config-submenu,
  .sidebar .side-user{
    display:none!important;
  }
  body.nav-collapsed .sidebar{
    justify-content:center!important;
    gap:8px!important;
  }
  .sidebar a[href$="/logout"], .sidebar a[href*="logout"]{
    margin-left:auto!important;
  }

  /* Calendário mobile: bolinhas compactas e sem letras para preservar área visual. */
  .calendar .letter-dot,
  .calendar .dot,
  .calendar .planned-dot{
    width:9px!important;
    height:9px!important;
    min-width:9px!important;
    min-height:9px!important;
    max-width:9px!important;
    max-height:9px!important;
    padding:0!important;
    border-radius:999px!important;
    font-size:0!important;
    line-height:0!important;
    color:transparent!important;
    text-indent:-9999px!important;
    overflow:hidden!important;
    border:1px solid rgba(0,0,0,.20)!important;
    box-shadow:none!important;
  }
  .calendar .planned-dot{
    background:transparent!important;
    border:1.5px dashed var(--primary2)!important;
    box-shadow:0 0 0 1px rgba(46,125,50,.18)!important;
  }
  .calendar .dots{
    gap:2px!important;
    margin-top:2px!important;
    max-height:28px!important;
    overflow:hidden!important;
  }
  .calendar .more{
    font-size:8px!important;
    line-height:10px!important;
    padding:0 2px!important;
  }

  /* Densidade visual: campos de data e filtros mais compactos sem perder toque. */
  .day{
    min-height:50px!important;
    height:calc((100dvh - 246px - var(--mobile-nav-h) - var(--mobile-safe-bottom)) / var(--weeks,6))!important;
    max-height:76px!important;
    padding:3px!important;
    border-radius:8px!important;
  }
  .date-number{font-size:11px!important;}
  .weekdays div{font-size:10px!important;}
  .calendar-title-block h1{font-size:18px!important;}
  .calendar-filters{grid-template-columns:1fr 1fr!important;gap:5px!important;}
  .calendar-filters select[name="funcionario_id"]{grid-column:1/-1!important;}
  .calendar-actions{grid-template-columns:1fr 1fr!important;gap:5px!important;}
  .month-nav.centered-nav,.month-nav{gap:5px!important;}
  .legend{font-size:9.5px!important;max-height:46px!important;}

  /* Em mobile, páginas administrativas não são destino principal: se acessadas por link direto, ficam legíveis em cards. */
  .people-full-page,.config-page,.data-management-page,.logs-two-column-page{
    padding-bottom:calc(var(--mobile-nav-h) + 18px + var(--mobile-safe-bottom))!important;
  }

  /* Relatórios no mobile em modo consulta: evita estouro horizontal na área de filtros. */
  .report-main-filters select,
  .report-main-filters button,
  .report-main-filters .btn{
    min-height:38px!important;
    font-size:12.5px!important;
  }
  .summary-scroll{max-height:36vh!important;}
  .report-chart-card canvas{height:240px!important;min-height:220px!important;}

  /* Popups e botões: mais previsíveis em telas pequenas. */
  dialog.modal h2, dialog.small-modal h2, dialog.wide-modal h2{font-size:18px!important;}
  .modal-close button{font-size:13px!important;}
  .day-detail-card{font-size:12px!important;}
}

@media (max-width: 390px){
  .calendar .letter-dot,.calendar .dot,.calendar .planned-dot{
    width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;
  }
  .day{min-height:48px!important;height:58px!important;}
  .calendar .dots{max-height:24px!important;}
}

/* Kronos v1.2.2 — ajustes finais mobile/UX */
@media (max-width: 860px){
  :root{--mobile-legend-h:44px;}

  /* Barra mobile: sem lacunas após ocultar Pessoas/Configurações. */
  body.nav-collapsed .sidebar{
    display:grid!important;
    grid-template-columns:repeat(3, minmax(0, 1fr))!important;
    justify-content:stretch!important;
    align-items:center!important;
    gap:4px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .sidebar a[href$="/logout"], .sidebar a[href*="logout"]{
    margin-left:0!important;
  }
  .sidebar a,.sidebar .side-link{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  /* A legenda do calendário fica fixa acima da navegação inferior. */
  .calendar-shell{
    padding-bottom:calc(var(--mobile-legend-h) + 8px)!important;
  }
  .legend{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(var(--mobile-nav-h) + var(--mobile-safe-bottom) + 6px)!important;
    z-index:998!important;
    margin:0!important;
    max-width:none!important;
    width:auto!important;
    display:flex!important;
    justify-content:flex-start!important;
    align-items:center!important;
    max-height:var(--mobile-legend-h)!important;
    overflow:auto!important;
    background:rgba(255,255,255,.96)!important;
    backdrop-filter:blur(8px)!important;
    box-shadow:0 4px 18px rgba(0,0,0,.16)!important;
  }
  .legend span{flex:0 0 auto!important;}

  /* Relatórios mobile: gráfico oculto para manter leitura e evitar distorção. */
  .history-report-card,
  .compact-history-card,
  .report-chart-card,
  .timeline.chart-card,
  .chart-card,
  canvas[id*="chart"],
  canvas[id*="Chart"]{
    display:none!important;
  }

  /* Espaço extra para conteúdo não ficar escondido atrás da legenda fixa e da barra. */
  body.nav-collapsed .container{
    padding-bottom:calc(var(--mobile-nav-h) + var(--mobile-legend-h) + 24px + var(--mobile-safe-bottom))!important;
  }
}

@media (max-width: 390px){
  :root{--mobile-legend-h:40px;}
  .legend{font-size:8.8px!important;gap:5px!important;padding:4px 6px!important;}
}

/* Kronos v1.2.3 — Relatórios mobile: altura confortável ao selecionar funcionário */
@media (max-width: 860px){
  .reports-page.has-person-chart .report-summary-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    min-height:auto!important;
    max-height:none!important;
    flex:auto!important;
  }
  .reports-page.has-person-chart .summary-panel{
    min-height:168px!important;
    max-height:none!important;
    overflow:visible!important;
    padding:10px!important;
  }
  .reports-page.has-person-chart .summary-scroll{
    min-height:106px!important;
    max-height:190px!important;
    height:auto!important;
    overflow:auto!important;
  }
  .reports-page.has-person-chart .summary-scroll table{
    min-height:96px!important;
  }
  .reports-page.has-person-chart .summary-scroll th,
  .reports-page.has-person-chart .summary-scroll td{
    padding:10px 8px!important;
    line-height:1.25!important;
    font-size:12.5px!important;
  }
  .reports-page.has-person-chart .summary-panel h2{
    min-height:34px!important;
    display:flex!important;
    align-items:center!important;
  }
}

@media (max-width: 390px){
  .reports-page.has-person-chart .summary-panel{min-height:158px!important;}
  .reports-page.has-person-chart .summary-scroll{min-height:100px!important;max-height:178px!important;}
  .reports-page.has-person-chart .summary-scroll th,
  .reports-page.has-person-chart .summary-scroll td{font-size:12px!important;padding:9px 6px!important;}
}

/* Kronos v1.2.4 — Relatórios mobile em formato card para funcionário selecionado */
@media (max-width: 860px){
  .reports-page.has-person-chart .summary-panel{
    min-height:auto!important;
    padding:10px!important;
  }
  .reports-page.has-person-chart .summary-scroll{
    min-height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .reports-page.has-person-chart .summary-scroll table{
    width:100%!important;
    min-width:0!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    display:block!important;
  }
  .reports-page.has-person-chart .summary-scroll thead{
    display:none!important;
  }
  .reports-page.has-person-chart .summary-scroll tbody{
    display:block!important;
    width:100%!important;
  }
  .reports-page.has-person-chart .summary-scroll tr{
    display:block!important;
    width:100%!important;
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    padding:8px 10px!important;
    margin:0 0 8px 0!important;
    background:#fff!important;
    box-shadow:0 2px 6px rgba(20,70,35,.06)!important;
  }
  .reports-page.has-person-chart .summary-scroll td{
    display:grid!important;
    grid-template-columns:minmax(112px,42%) 1fr!important;
    gap:10px!important;
    align-items:center!important;
    width:100%!important;
    border:0!important;
    border-bottom:1px dashed #d7e4da!important;
    padding:8px 0!important;
    text-align:left!important;
    font-size:13px!important;
    line-height:1.25!important;
    white-space:normal!important;
  }
  .reports-page.has-person-chart .summary-scroll td:last-child{
    border-bottom:0!important;
  }
  .reports-page.has-person-chart .summary-scroll td::before{
    font-weight:800!important;
    color:#285236!important;
    font-size:12px!important;
    line-height:1.15!important;
    text-align:left!important;
  }
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(1) td:nth-child(1)::before{content:"Funcionário";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(1) td:nth-child(2)::before{content:"Folgas esperadas";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(1) td:nth-child(3)::before{content:"Folgas usufruídas";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(1) td:nth-child(4)::before{content:"Outras ausências";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(2) td:nth-child(1)::before{content:"Funcionário";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(2) td:nth-child(2)::before{content:"Ano";}
  .reports-page.has-person-chart .report-summary-grid .summary-panel:nth-child(2) td:nth-child(3)::before{content:"Férias usufruídas";}
  .reports-page.has-person-chart .summary-panel h2{
    font-size:15px!important;
    line-height:1.2!important;
    margin:0 0 8px!important;
  }
}


/* Kronos v1.2.5 — Calendário mobile com células maiores e grade dimensionada para 6 semanas */
@media (max-width: 860px){
  :root{
    --mobile-calendar-reserved: 205px;
  }

  .calendar-shell{
    min-height:calc(100dvh - var(--mobile-nav-h) - var(--mobile-safe-bottom))!important;
    height:auto!important;
    overflow:visible!important;
  }

  .calendar.compact-calendar,
  .calendar{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    gap:3px!important;
    align-content:start!important;
  }

  .calendar .day{
    height:clamp(56px, calc((100dvh - var(--mobile-calendar-reserved) - var(--mobile-nav-h) - var(--mobile-legend-h) - var(--mobile-safe-bottom)) / 6), 96px)!important;
    min-height:56px!important;
    max-height:96px!important;
    padding:3px!important;
    display:flex!important;
    flex-direction:column!important;
  }

  .calendar .date-number{
    flex:0 0 auto!important;
    margin-bottom:2px!important;
  }

  .calendar .dots{
    flex:1 1 auto!important;
    max-height:none!important;
    overflow:hidden!important;
    align-content:flex-start!important;
  }
}

@media (max-width: 390px){
  .calendar .day{
    height:clamp(54px, calc((100dvh - 198px - var(--mobile-nav-h) - var(--mobile-legend-h) - var(--mobile-safe-bottom)) / 6), 88px)!important;
    min-height:54px!important;
  }
}


/* Kronos v1.2.6 — Backup automático + calendário mobile sem rolagem
   Grade mensal sempre em 6 semanas, com células distribuídas no espaço disponível. */
@media (max-width: 860px){
  body:has(.calendar-shell){
    overflow:hidden!important;
    height:100dvh!important;
  }
  body:has(.calendar-shell) .container{
    height:calc(100dvh - var(--mobile-nav-h) - var(--mobile-safe-bottom))!important;
    min-height:0!important;
    overflow:hidden!important;
    padding:5px 6px 0 6px!important;
  }
  body:has(.calendar-shell) .calendar-shell{
    height:calc(100dvh - var(--mobile-nav-h) - var(--mobile-safe-bottom))!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    gap:3px!important;
    padding:0 calc(0px) calc(var(--mobile-legend-h) + 7px)!important;
  }
  body:has(.calendar-shell) .calendar-topline{
    flex:0 0 auto!important;
    gap:3px!important;
    margin-bottom:2px!important;
  }
  body:has(.calendar-shell) .calendar-title-block h1{
    font-size:17px!important;
    line-height:1.05!important;
    margin:0!important;
  }
  body:has(.calendar-shell) .calendar-filters{
    gap:4px!important;
    margin:0!important;
  }
  body:has(.calendar-shell) .calendar-filters select,
  body:has(.calendar-shell) .calendar-filters select[name="funcionario_id"]{
    height:30px!important;
    min-height:30px!important;
    font-size:11px!important;
    padding:4px 22px 4px 6px!important;
    border-radius:8px!important;
  }
  body:has(.calendar-shell) .calendar-actions{
    gap:4px!important;
  }
  body:has(.calendar-shell) .calendar-actions .popup-btn,
  body:has(.calendar-shell) .calendar-actions .warn-btn{
    min-height:30px!important;
    height:30px!important;
    font-size:11px!important;
    padding:4px 5px!important;
    border-radius:8px!important;
  }
  body:has(.calendar-shell) .month-nav.centered-nav,
  body:has(.calendar-shell) .month-nav{
    flex:0 0 auto!important;
    gap:4px!important;
    margin:2px 0!important;
  }
  body:has(.calendar-shell) .month-nav .btn{
    min-height:29px!important;
    height:29px!important;
    padding:3px 4px!important;
    font-size:10.5px!important;
    border-radius:8px!important;
  }
  body:has(.calendar-shell) .weekdays{
    flex:0 0 auto!important;
    gap:2px!important;
    margin:1px 0!important;
  }
  body:has(.calendar-shell) .weekdays div{
    font-size:9px!important;
    line-height:1!important;
    padding:1px 0!important;
  }
  body:has(.calendar-shell) .calendar.compact-calendar,
  body:has(.calendar-shell) .calendar{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    grid-template-rows:repeat(6,minmax(0,1fr))!important;
    grid-auto-rows:minmax(0,1fr)!important;
    gap:2.5px!important;
    align-content:stretch!important;
    overflow:hidden!important;
  }
  body:has(.calendar-shell) .calendar .day{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    padding:2px!important;
    border-radius:7px!important;
    overflow:hidden!important;
  }
  body:has(.calendar-shell) .calendar .date-number{
    font-size:10.5px!important;
    line-height:1!important;
    margin:0 0 1px!important;
  }
  body:has(.calendar-shell) .calendar .dots{
    gap:2px!important;
    margin:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  body:has(.calendar-shell) .calendar .letter-dot,
  body:has(.calendar-shell) .calendar .dot,
  body:has(.calendar-shell) .calendar .planned-dot{
    width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;max-width:8px!important;max-height:8px!important;
  }
  body:has(.calendar-shell) .legend{
    height:var(--mobile-legend-h)!important;
    max-height:var(--mobile-legend-h)!important;
  }
}
@media (max-width: 390px){
  body:has(.calendar-shell) .calendar-title-block h1{font-size:16px!important;}
  body:has(.calendar-shell) .calendar-filters select,
  body:has(.calendar-shell) .calendar-filters select[name="funcionario_id"]{height:28px!important;min-height:28px!important;font-size:10.5px!important;}
  body:has(.calendar-shell) .calendar-actions .popup-btn,
  body:has(.calendar-shell) .calendar-actions .warn-btn{height:28px!important;min-height:28px!important;font-size:10.3px!important;}
  body:has(.calendar-shell) .month-nav .btn{height:27px!important;min-height:27px!important;font-size:10px!important;}
  body:has(.calendar-shell) .calendar .letter-dot,
  body:has(.calendar-shell) .calendar .dot,
  body:has(.calendar-shell) .calendar .planned-dot{width:7px!important;height:7px!important;min-width:7px!important;min-height:7px!important;}
}

/* Portal Salvetti v1.3.0 */
.portal-shell{
  min-height:100vh;
  padding:clamp(18px,3vw,42px);
  background:linear-gradient(135deg,#eef8ef 0%,#f7fbf6 45%,#ffffff 100%);
}
.portal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:28px;
}
.portal-header h1{font-size:clamp(28px,4vw,44px);margin:0;color:#1b5e20;letter-spacing:-.04em;}
.portal-header p{margin:6px 0 0;color:#4b6350;font-size:16px;}
.portal-user{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #d9ead9;border-radius:999px;padding:8px 12px;box-shadow:0 8px 24px rgba(25,80,35,.08);}
.portal-user a{color:#1b5e20;font-weight:700;text-decoration:none;}
.portal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;max-width:1180px;}
.portal-card{min-height:170px;background:#fff;border:1px solid #dceedd;border-radius:22px;padding:22px;text-decoration:none;color:inherit;box-shadow:0 14px 38px rgba(33,85,45,.08);transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease,opacity .28s ease;}
.portal-card h2{margin:12px 0 8px;font-size:22px;color:#1f3523;}
.portal-card p{margin:0;color:#5d6f60;line-height:1.35;}
.portal-emoji{width:48px;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#e7f7e8;font-size:26px;}
.app-enabled:hover{transform:translateY(-4px);box-shadow:0 20px 45px rgba(33,85,45,.14);border-color:#9ddd9c;}
.app-disabled{opacity:.55;filter:grayscale(.15);}
.portal-open,.portal-soon{display:inline-block;margin-top:18px;font-weight:800;color:#2e7d32;}
.portal-soon{color:#7a887b;}
@media(max-width:700px){
  .portal-header{align-items:flex-start;flex-direction:column;}
  .portal-shell{padding:18px;padding-bottom:78px;}
  .portal-grid{grid-template-columns:1fr;gap:12px;}
  .portal-card{min-height:130px;border-radius:18px;padding:18px;}
  .portal-user{width:100%;justify-content:space-between;box-sizing:border-box;}
}

/* Kronos v1.3.1 — Portal, responsividade e acabamento */
:root{
  --primary:#1f7a3a;
  --primary2:#2f9e55;
  --primary-dark:#12351f;
  --surface:#f7faf7;
  --card:#ffffff;
  --line:#dfe8df;
  --soft-green:#eef9ee;
  --accent:#d1ffba;
}
body{background:linear-gradient(180deg,#f8fbf8,#eef6ef);font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;color:#18251c}
.btn,button,.button-link{box-shadow:0 1px 2px #00000012;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.btn:hover,button:hover,.button-link:hover{transform:translateY(-1px);box-shadow:0 6px 14px #00000015}.btn.secondary{background:#edf6ef;color:#155724;border:1px solid #cce5d1}th{background:var(--accent)!important;color:#14381f!important}
.side-brand{border-bottom:1px solid #ffffff1f;margin-bottom:6px}.config-submenu{margin-left:0;padding-left:0}.config-submenu a{font-size:13px;min-height:34px!important}.side-link{background:transparent;color:#fff;border:0;display:flex;align-items:center;border-radius:12px;margin:2px 0;cursor:pointer}.side-link.open{background:#ffffff18}.app-pill{display:inline-block;background:#e7f5ea;color:#1b5e20;border:1px solid #b8dfbf;padding:2px 7px;border-radius:999px;font-size:11px;margin:1px}.app-permissions{background:#f7fbf7;border:1px solid var(--line);border-radius:12px;padding:10px;display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:5px}.app-permissions b{grid-column:1/-1}.release-list{padding-left:1.2rem;line-height:1.45}.release-modal{max-width:620px}.portal-card{transition:transform .18s ease, box-shadow .18s ease}.portal-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px #0002}

/* Popups compactos para 1366×768 */
.wide-modal,.config-action-modal{max-height:92dvh!important;overflow:auto!important}.wide-modal .grid-form,.config-modal-form{gap:7px!important}.wide-modal input,.wide-modal select,.wide-modal textarea,.config-action-modal input,.config-action-modal select,.config-action-modal textarea{padding:6px 8px!important}.wide-modal textarea{min-height:44px!important}.wide-modal h2,.config-action-modal h2{margin:.1rem 0 .35rem!important}.mini-wrap{padding:6px!important}.mini-calendar button{padding:4px 0!important;min-height:28px!important}.frozen-field{background:#f1f4f1!important;color:#55615a!important;font-style:italic}.compact-check{font-size:12px!important}
@media(max-height:790px){.wide-modal{width:min(820px,96vw)!important}.wide-modal .grid-form{grid-template-columns:repeat(2,minmax(210px,1fr))!important}.wide-modal label{font-size:12px!important}.mini-calendar button{font-size:12px!important}.mini-week span{font-size:11px!important}.mini-resumo-inline{font-size:12px!important}.form-actions-line button,#btnSalvarSaida{padding:7px 11px!important}}

/* Pendências */
.blink-pending{animation:kronosBlink 1.05s ease-in-out infinite;box-shadow:0 0 0 0 rgba(255,166,0,.65)!important}@keyframes kronosBlink{0%,100%{filter:brightness(1);transform:translateY(0)}50%{filter:brightness(1.25);transform:translateY(-1px)}}.pendencias-modal-wide{width:min(1040px,96vw)!important}.pendencias-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pending-panel{border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff}.pending-panel h3{margin:.1rem 0 .6rem}.modal-footer-actions{display:flex;justify-content:flex-end;margin-top:10px}.pendencias-scroll{max-height:52vh;overflow:auto!important}

/* Feriados/folga coletiva */
.collective-list{max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:10px;background:#fbfdfb}.liberacao-lista{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:4px;max-height:270px;overflow:auto}

/* Relatórios sem alerta e melhor tooltip */
.compact-report-head{align-items:flex-start}.linha-alerta[title]:hover{outline:2px solid #ffcc80}

@media(max-width:860px){
  .app-permissions{grid-template-columns:1fr}.pendencias-two-cols{grid-template-columns:1fr}.pendencias-modal-wide{height:92dvh}.pending-panel{min-height:0}.calendar-actions{display:none!important}.liberacao-lista{grid-template-columns:1fr}.collective-list{max-height:40vh}.release-modal{width:94vw!important}.calendar-shell{padding-bottom:64px!important}.legend{position:fixed!important;left:8px!important;right:8px!important;bottom:64px!important;z-index:35;max-width:none!important;display:flex!important;justify-content:center!important;gap:7px!important;font-size:10px!important;overflow:auto;white-space:nowrap}.legend span{flex:0 0 auto}.calendar.compact-calendar{height:calc(100dvh - 260px)!important;min-height:330px!important;grid-template-rows:repeat(6,1fr)!important}.calendar.compact-calendar .day{min-height:0!important;padding:3px!important}.dots{gap:2px!important;margin:2px 0!important}.dot,.letter-dot,.planned-dot{width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;font-size:0!important;color:transparent!important}.calendar-filters{grid-template-columns:1fr 1fr!important}.calendar-filters select[name="funcionario_id"]{grid-column:1/-1!important}.wide-modal,.config-action-modal{width:96vw!important;height:auto!important;max-height:94dvh!important}.wide-modal .grid-form{grid-template-columns:1fr!important}.modal{padding:14px!important}.portal-grid{grid-template-columns:1fr!important}.portal-header{display:block!important}.portal-user{margin-top:10px}}


/* Kronos v1.3.2 - refinamento Portal/UX */
.portal-card.admin-app-card{border:1px solid #9bd18d;background:linear-gradient(180deg,#f7fff3,#eefbe7)}
.action-row-wrap{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.warn-btn.blink-pending{animation:kronosStrongBlink 1.05s steps(1,end) infinite!important;border:2px solid #b71c1c!important;font-weight:800!important}
@keyframes kronosStrongBlink{0%{background:#fff;color:#b71c1c;box-shadow:0 0 0 0 rgba(183,28,28,.2)}33%{background:#ffd54f;color:#3b2b00;box-shadow:0 0 0 4px rgba(255,213,79,.25)}66%{background:#d32f2f;color:#fff;box-shadow:0 0 0 6px rgba(211,47,47,.22)}100%{background:#fff;color:#b71c1c}}
.warn-btn:not(.blink-pending){background:#fff!important;color:#155724!important;border:1px solid var(--line)!important;box-shadow:none!important}
.config-submenu a .nav-label{white-space:nowrap}
@media(max-height:790px){
  .wide-modal{width:min(760px,96vw)!important;padding:12px!important}
  .wide-modal .grid-form{grid-template-columns:repeat(2,minmax(190px,1fr))!important;gap:5px!important}
  .wide-modal .mini-wrap{max-height:265px;overflow:auto}
  .wide-modal textarea{min-height:38px!important}
  .wide-modal label small{font-size:10.5px!important}
  .wide-modal input,.wide-modal select,.wide-modal textarea{font-size:12px!important;padding:5px 7px!important}
}
@media(max-width:860px){
  .portal-card.admin-app-card{display:none}
  .config-submenu a[href*="usuarios"]{display:none!important}
}


/* Kronos v1.3.1 - Portal independente, permissões por app e folga coletiva */
.portal-admin-fab{position:fixed;right:24px;bottom:24px;z-index:70;background:#17351f;color:#fff;text-decoration:none;border-radius:999px;padding:12px 18px;font-weight:800;box-shadow:0 12px 30px #0003;border:1px solid #ffffff22}.portal-admin-fab:hover{transform:translateY(-2px);box-shadow:0 16px 36px #0004}.portal-users-shell{max-width:1180px;margin:0 auto}.portal-users-card{margin-top:16px}.portal-user-form{grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px}.portal-user-modal{width:min(940px,96vw)!important;max-height:92dvh!important;overflow:auto!important}.app-manager-block{border:1px solid var(--line);border-radius:16px;background:#fbfdfb;padding:12px;display:grid;gap:8px}.app-manager-block small{display:block;color:#607064;margin:2px 0 6px}.app-permission-tile{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #dce9dc;border-radius:12px;background:#fff;padding:9px 10px;cursor:pointer}.app-permission-tile:hover{background:#f1faef}.app-permission-panel{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:8px;border:1px dashed #b8d8b8;border-radius:12px;padding:10px;background:#f7fff5}.app-permission-panel.hidden{display:none!important}.app-permission-panel button{align-self:end}.portal-grid .admin-app-card{display:none!important}.action-row-wrap{display:flex!important;gap:10px!important;align-items:center!important;flex-wrap:wrap!important}.collective-modal{width:min(820px,96vw)!important}.collective-form{grid-template-columns:repeat(2,minmax(210px,1fr))!important}.pending-muted{background:#fff!important;color:#155724!important;border:1px solid var(--line)!important;box-shadow:none!important;animation:none!important}.warn-btn.blink-pending{animation:kronosUrgentPending 1.05s steps(1,end) infinite!important;border:2px solid #b71c1c!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.2px}@keyframes kronosUrgentPending{0%{background:#fff;color:#b71c1c;box-shadow:0 0 0 0 rgba(255,255,255,.5)}25%{background:#ffe066;color:#2d2200;box-shadow:0 0 0 5px rgba(255,224,102,.35)}55%{background:#d32f2f;color:#fff;box-shadow:0 0 0 8px rgba(211,47,47,.28)}80%{background:#fff;color:#b71c1c;box-shadow:0 0 0 4px rgba(255,255,255,.5)}100%{background:#ffe066;color:#2d2200}}@media(max-width:860px){.portal-admin-fab{right:12px;bottom:12px;padding:10px 13px}.portal-user-form,.app-permission-panel,.collective-form{grid-template-columns:1fr!important}.portal-users-shell{padding-bottom:86px}.action-row-wrap .popup-btn{width:auto!important}.collective-modal{height:auto!important;max-height:94dvh!important}}


/* Hotfix mobile v1.3.1: botão flutuante de registro no calendário */
.mobile-register-fab-wrap{
  display:none;
}

@media (max-width: 860px){
  .mobile-register-fab-wrap{
    display:block;
    position:fixed;
    right:16px;
    bottom:78px;
    z-index:120;
  }

  .mobile-register-fab{
    width:56px;
    height:56px;
    border-radius:999px;
    border:0;
    background:#1f6f35;
    color:#fff;
    font-size:34px;
    font-weight:800;
    line-height:1;
    box-shadow:0 12px 30px rgba(0,0,0,.28);
  }

  .mobile-register-menu{
    display:none;
    position:absolute;
    right:0;
    bottom:66px;
    width:235px;
    background:#fff;
    border:1px solid #d9e8d9;
    border-radius:16px;
    padding:10px;
    box-shadow:0 16px 36px rgba(0,0,0,.22);
    gap:8px;
  }

  .mobile-register-menu.open{
    display:grid;
  }

  .mobile-register-menu button{
    width:100%;
    border:0;
    border-radius:12px;
    padding:11px 12px;
    background:#eaf7e8;
    color:#143d20;
    font-weight:800;
    text-align:left;
  }

  .mobile-register-menu button:last-child{
    background:#f4f7ee;
  }
}



/* Hotfix mobile v1.3.1: remove Sair da barra inferior mobile */
@media (max-width: 860px){
  .sidebar .logout-link{
    display:none!important;
  }
}



/* Hotfix mobile v1.3.1: FAB mobile forçado */
.mobile-register-fab-wrap{
  display:none;
}

@media (max-width: 860px){
  .calendar-actions{
    display:none!important;
  }

  .mobile-register-fab-wrap{
    display:block!important;
    position:fixed!important;
    right:16px!important;
    bottom:82px!important;
    z-index:9999!important;
    pointer-events:auto!important;
  }

  .mobile-register-fab{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:58px!important;
    height:58px!important;
    border-radius:999px!important;
    border:0!important;
    background:#1f6f35!important;
    color:#fff!important;
    font-size:36px!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:0 12px 30px rgba(0,0,0,.34)!important;
  }

  .mobile-register-menu{
    display:none!important;
    position:absolute!important;
    right:0!important;
    bottom:68px!important;
    width:245px!important;
    background:#fff!important;
    border:1px solid #d9e8d9!important;
    border-radius:16px!important;
    padding:10px!important;
    box-shadow:0 16px 36px rgba(0,0,0,.25)!important;
    gap:8px!important;
  }

  .mobile-register-menu.open{
    display:grid!important;
  }

  .mobile-register-menu button{
    width:100%!important;
    border:0!important;
    border-radius:12px!important;
    padding:12px!important;
    background:#eaf7e8!important;
    color:#143d20!important;
    font-weight:900!important;
    text-align:left!important;
  }

  .mobile-register-menu button:last-child{
    background:#f4f7ee!important;
  }
}



/* Hotfix definitivo mobile FAB v1.3.1 */
@media (max-width: 860px){
  body .mobile-register-fab-wrap{
    display:block!important;
    position:fixed!important;
    right:18px!important;
    bottom:92px!important;
    left:auto!important;
    top:auto!important;
    width:auto!important;
    height:auto!important;
    z-index:2147483647!important;
    transform:none!important;
    margin:0!important;
    padding:0!important;
    pointer-events:auto!important;
  }

  body .mobile-register-fab{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:62px!important;
    height:62px!important;
    min-width:62px!important;
    min-height:62px!important;
    max-width:62px!important;
    max-height:62px!important;
    border-radius:999px!important;
    border:0!important;
    background:#1f6f35!important;
    color:#fff!important;
    font-size:38px!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:0 14px 34px rgba(0,0,0,.38)!important;
    cursor:pointer!important;
  }

  body .mobile-register-menu{
    display:none!important;
    position:absolute!important;
    right:0!important;
    bottom:74px!important;
    width:250px!important;
    background:#fff!important;
    border:1px solid #d9e8d9!important;
    border-radius:16px!important;
    padding:10px!important;
    box-shadow:0 18px 40px rgba(0,0,0,.28)!important;
    gap:8px!important;
  }

  body .mobile-register-menu.open{
    display:grid!important;
  }

  body .mobile-register-menu button{
    width:100%!important;
    border:0!important;
    border-radius:12px!important;
    padding:12px!important;
    background:#eaf7e8!important;
    color:#143d20!important;
    font-weight:900!important;
    text-align:left!important;
    cursor:pointer!important;
  }

  body .mobile-register-menu button:last-child{
    background:#f4f7ee!important;
  }
}

