*{box-sizing:border-box}
:root{--navy:#0c2945;--orange:#f28c28;--blue:#1677b8;--red:#d71920;--red2:#ff3b30;--line:#d9e2ea;--bg:#eef5fa}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:#243746}
.topbar{background:var(--navy);color:#fff;padding:10px 18px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.brand{display:flex;align-items:center;gap:14px}.brand img{height:70px;max-width:210px;object-fit:contain}.brand strong{display:block;font-size:20px}.brand span{display:block;font-size:11px;opacity:.8;margin-top:3px}
.top-actions{display:flex;align-items:center;gap:10px;font-size:13px}
.container{max-width:1500px;margin:18px auto;padding:0 12px}.panel{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px rgba(20,45,70,.05)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px}h1,h2{margin:0 0 8px}h1{font-size:24px;color:var(--navy)}h2{font-size:18px;color:var(--navy)}.muted{color:#6c7b86;margin:0}
.month-form{display:flex;align-items:end;gap:8px}.month-form label,.toolbar label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:bold}
input,select,textarea{border:1px solid #cbd6df;border-radius:6px;padding:9px 10px;font:inherit;background:#fff;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid #b8dcf4;border-color:var(--blue)}
.btn{display:inline-block;border:1px solid #b9c8d4;border-radius:6px;padding:9px 13px;background:#fff;color:var(--navy);cursor:pointer;text-decoration:none;font-weight:bold}.btn:hover{filter:brightness(.97)}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.small{padding:6px 10px}.btn.full{width:100%}
.alert{padding:11px 13px;border-radius:7px;margin-bottom:16px}.alert.success{background:#e6f6e8;color:#246b2a;border:1px solid #b9dfbd}.alert.error{background:#fdeaea;color:#8a2525;border:1px solid #efb5b5}
.calendar-wrap{overflow:auto}.calendar{border-collapse:separate;border-spacing:0;min-width:980px;width:100%;font-size:12px}.calendar th,.calendar td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center}.calendar thead th{background:#edf3f7;color:var(--navy);padding:7px 4px;position:sticky;top:0;z-index:2}.calendar thead th:first-child{border-left:1px solid var(--line)}.calendar th small{font-weight:normal;color:#71808b}.employee-col{min-width:180px;text-align:left!important}.employee-name{text-align:left!important;padding:7px 9px;font-weight:bold;white-space:nowrap;background:#fff;position:sticky;left:0;z-index:1}.day-cell{width:35px;height:42px;padding:1px}.cell-button{width:100%;height:100%;border:0;background:transparent;cursor:pointer;font-weight:bold;font-size:10px;color:#17324a;border-radius:4px}.cell-button:hover{outline:2px solid var(--orange)}
.grid2{display:grid;grid-template-columns:1fr 1.4fr;gap:16px}.inline-form,.work-form{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.inline-form input{flex:1;min-width:180px}.work-form input:not([type=color]){flex:1;min-width:150px}.work-form input[type=color]{width:48px;padding:3px}.simple-list{margin:0;padding-left:20px}.work-list{display:grid;gap:7px}.work-item{padding:7px 9px;border:1px solid var(--line);border-radius:6px}.swatch{display:inline-block;width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:6px;border:1px solid #aaa}
.summary-wrap{overflow:auto}.summary{width:100%;border-collapse:collapse}.summary th,.summary td{border:1px solid var(--line);padding:8px;text-align:left}.summary th{background:#edf3f7}
.footer{display:flex;justify-content:center;align-items:center;gap:10px;color:#667784;font-size:12px;padding:18px}.footer img{height:42px;max-width:140px;object-fit:contain}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:16px;z-index:20}.modal[hidden]{display:none}.modal-card{background:#fff;border-radius:10px;padding:20px;width:min(430px,100%);position:relative;box-shadow:0 15px 45px rgba(0,0,0,.25)}.modal-card label{display:flex;flex-direction:column;gap:5px;margin:12px 0;font-weight:bold;font-size:13px}.modal-close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:28px;cursor:pointer;color:#667}

/* Login moderno Prosafire */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px 20px;position:relative;overflow:hidden;background:radial-gradient(circle at 15% 20%,rgba(215,25,32,.09),transparent 28%),radial-gradient(circle at 88% 80%,rgba(22,119,184,.18),transparent 32%),linear-gradient(135deg,#f8fbfd 0%,#e7f1f7 48%,#dceaf4 100%)}
.auth-page:before{content:"";position:absolute;inset:-12%;background-image:linear-gradient(rgba(22,119,184,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(22,119,184,.045) 1px,transparent 1px);background-size:46px 46px;transform:perspective(700px) rotateX(58deg) scale(1.3);transform-origin:center bottom;opacity:.7}
.auth-page:after{content:"";position:absolute;width:min(720px,70vw);height:min(720px,70vw);right:-260px;top:-260px;background:url('assets/prosafire_logo.png') center/contain no-repeat;opacity:.045;filter:grayscale(1);transform:rotate(8deg)}
.auth-tech{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.auth-tech:before,.auth-tech:after{content:"";position:absolute;border:1px solid rgba(22,119,184,.16);transform:rotate(45deg);border-radius:22px}.auth-tech:before{width:360px;height:360px;left:-190px;bottom:-170px;box-shadow:0 0 0 34px rgba(22,119,184,.035),0 0 0 68px rgba(22,119,184,.025)}.auth-tech:after{width:240px;height:240px;right:-130px;bottom:30px;box-shadow:0 0 0 28px rgba(215,25,32,.035),0 0 0 56px rgba(215,25,32,.02)}
.auth-card{position:relative;z-index:2;width:min(500px,100%);background:rgba(255,255,255,.95);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.85);border-radius:20px;padding:34px 38px 28px;box-shadow:0 28px 80px rgba(18,48,74,.20),0 3px 12px rgba(18,48,74,.08);border-top:5px solid var(--red)}
.auth-brand{display:flex;justify-content:center;margin-bottom:12px}.auth-logo{display:block;height:112px;max-width:330px;width:auto;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(18,48,74,.10))}.auth-card h1{text-align:center;font-size:27px;letter-spacing:-.4px;color:var(--navy);margin:4px 0 7px}.auth-card>p{text-align:center;font-size:14px;margin:0 0 24px}.auth-card form label{display:flex;flex-direction:column;gap:7px;margin:16px 0;font-weight:bold;font-size:13px;color:var(--navy)}.auth-input-wrap{position:relative;width:100%;display:block}.auth-input-wrap span{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:17px;opacity:.65}.auth-input-wrap input{display:block;width:100%!important;max-width:none;padding:13px 14px 13px 43px;border-radius:10px;background:#fbfdff;border-color:#ccdbe6}.auth-input-wrap input:focus{outline:3px solid rgba(215,25,32,.10);border-color:var(--red)}.auth-submit{display:block;width:100%;margin-top:22px;height:48px;border:0;border-radius:10px;background:linear-gradient(90deg,#e51d25,#b70f16);color:#fff;font-size:15px;font-weight:700;letter-spacing:.2px;cursor:pointer;box-shadow:0 10px 24px rgba(215,25,32,.20);transition:.2s}.auth-submit:hover{transform:translateY(-1px);box-shadow:0 13px 28px rgba(215,25,32,.27)}.auth-footer{text-align:center;margin-top:20px;font-size:12px;color:#637585}.auth-footer strong{color:var(--navy)}
.auth-tagline{position:absolute;right:34px;bottom:34px;z-index:1;color:#557188;font-size:11px;letter-spacing:4px;text-transform:uppercase;line-height:1.8;text-align:right}.auth-tagline:after{content:"";display:block;width:38px;height:2px;background:var(--red);margin:7px 0 0 auto}.auth-brand-caption{text-align:center;font-size:10px;letter-spacing:3px;color:#7890a1;text-transform:uppercase;margin-top:-2px;margin-bottom:5px}
.empty{padding:20px;text-align:center;color:#6c7b86}
@media(max-width:700px){.topbar{padding:8px 10px;align-items:flex-start}.brand img{height:58px;max-width:160px}.brand strong{font-size:16px}.brand span{font-size:9px}.top-actions{font-size:11px;flex-direction:column;align-items:flex-end}.container{padding:0 8px;margin:10px auto}.panel{padding:10px}.toolbar{align-items:stretch;flex-direction:column}.month-form{align-items:stretch}.month-form label{flex:1}.month-form .btn{width:100%}.grid2{grid-template-columns:1fr}.calendar{min-width:980px}.footer{font-size:10px}.footer img{height:36px}.auth-page{padding:18px 12px}.auth-card{padding:28px 20px 23px;border-radius:16px}.auth-logo{height:88px;max-width:270px}.auth-card h1{font-size:23px}.auth-tagline{display:none}.auth-page:after{width:520px;height:520px;right:-240px;top:-180px;opacity:.035}}

/* =========================================================
   EXPERIÊNCIA MOBILE — Prosafire
   ========================================================= */
@media (max-width: 700px){
  html,body{width:100%;min-width:0;overflow-x:hidden}
  body{font-size:14px;-webkit-text-size-adjust:100%}
  .topbar{position:sticky;top:0;z-index:30;box-shadow:0 2px 12px rgba(12,41,69,.12)}
  .brand{gap:8px;min-width:0}.brand img{height:54px;max-width:150px}.brand strong{font-size:15px}.brand span{font-size:8px}
  .top-actions{gap:5px}.top-actions .btn{padding:7px 9px;font-size:11px}
  .container{width:100%;padding:0 8px;margin:8px auto}.panel{border-radius:12px;margin-bottom:10px;box-shadow:0 2px 10px rgba(20,45,70,.06)}
  h1{font-size:21px}h2{font-size:17px}
  input,select,textarea{font-size:16px;min-height:44px;border-radius:9px}
  .btn{min-height:44px;padding:10px 13px;border-radius:9px}
  .inline-form,.work-form{gap:7px}.inline-form input,.work-form input:not([type=color]),.work-form select{width:100%;min-width:0;flex-basis:100%}
  .work-form input[type=color]{width:54px;min-height:44px;flex:0 0 54px}.work-form .btn{flex:1}
  .calendar-wrap{margin:0 -2px;border:1px solid var(--line);border-radius:10px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .calendar{min-width:920px;font-size:11px}.calendar thead th{padding:8px 4px}.employee-col{min-width:145px}.employee-name{min-width:145px;padding:7px;font-size:12px}.day-cell{height:46px;width:34px}
  .cell-button{font-size:10px;min-height:44px}.summary-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.summary{min-width:620px}
  .modal{padding:8px;align-items:flex-end}.modal-card{width:100%;max-height:92vh;overflow:auto;border-radius:16px 16px 10px 10px;padding:18px 15px}
  .footer{padding:14px 8px;text-align:center;flex-wrap:wrap}

  /* login mobile */
  .auth-page{min-height:100svh;padding:12px 10px;align-items:center;background:radial-gradient(circle at 15% 10%,rgba(215,25,32,.12),transparent 32%),radial-gradient(circle at 90% 85%,rgba(22,119,184,.20),transparent 38%),linear-gradient(150deg,#f9fcfe 0%,#e9f3f8 55%,#dceaf4 100%)}
  .auth-page:before{background-size:28px 28px;opacity:.42;transform:perspective(600px) rotateX(62deg) scale(1.5)}
  .auth-page:after{width:460px;height:460px;right:-245px;top:-145px;opacity:.035}
  .auth-tech:before{width:240px;height:240px;left:-155px;bottom:-145px}.auth-tech:after{width:170px;height:170px;right:-105px;bottom:20px}
  .auth-card{width:100%;max-width:430px;padding:22px 18px 20px;border-radius:18px;border-top-width:4px;box-shadow:0 18px 45px rgba(18,48,74,.16)}
  .auth-brand{margin-bottom:3px}.auth-logo{height:82px;max-width:250px}.auth-brand-caption{font-size:8px;letter-spacing:2.2px;margin-bottom:3px}
  .auth-card h1{font-size:23px;margin:3px 0 6px;letter-spacing:-.3px}.auth-card>p{font-size:13px;line-height:1.4;margin-bottom:17px}
  .auth-card form label{font-size:13px;margin:12px 0;gap:6px}.auth-input-wrap span{left:13px;font-size:16px}.auth-input-wrap input{min-height:48px;padding:12px 12px 12px 42px;border-radius:10px;font-size:16px}
  .auth-submit{min-height:50px;height:50px;margin-top:17px;border-radius:10px;font-size:16px}.auth-footer{margin-top:15px;font-size:11px}.auth-tagline{display:none}
}

@media (max-width: 380px){
  .topbar{padding:7px 8px}.brand img{height:46px;max-width:125px}.brand strong{font-size:14px}.brand span{display:none}
  .top-actions .btn{padding:6px 7px;font-size:10px}
  .auth-page{padding:8px}.auth-card{padding:19px 14px 17px;border-radius:15px}.auth-logo{height:70px;max-width:220px}.auth-brand-caption{font-size:7px;letter-spacing:1.8px}.auth-card h1{font-size:21px}.auth-card>p{font-size:12px}.auth-input-wrap input{min-height:46px}.auth-submit{min-height:48px;height:48px}
}
