:root{--bg:#f4f7fb;--panel:#fff;--text:#172033;--muted:#6d778b;--line:#e5eaf2;--nav:#111827;--nav2:#1f2937;--primary:#315bea;--primary2:#2149cc;--green:#159a6b;--yellow:#c37a0d;--red:#c44949;--shadow:0 8px 30px rgba(28,45,76,.06)}*{box-sizing:border-box}body{margin:0;font-family:Inter,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}a{color:#315bea;text-decoration:none}button,input,select{font:inherit}.app-shell{min-height:100vh;display:flex}.sidebar{width:248px;background:linear-gradient(180deg,var(--nav),#0b1220);color:#d8deea;padding:20px 14px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}.brand{display:flex;gap:11px;align-items:center;padding:2px 8px 24px}.brand-mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#4b73ff,#33c48d);color:#fff;display:grid;place-items:center;font-weight:900;font-size:20px}.brand b{display:block;color:#fff;font-size:16px}.brand small,.who small{display:block;color:#8e9aaf;margin-top:2px}.sidebar nav{display:flex;flex-direction:column;gap:4px}.sidebar nav a{color:#aeb8c9;padding:11px 12px;border-radius:10px;display:flex;gap:11px;align-items:center;font-weight:600}.sidebar nav a:hover,.sidebar nav a.active{background:#1f2a3d;color:#fff}.nav-label{text-transform:uppercase;font-size:10px;letter-spacing:.12em;color:#5e6b82;padding:20px 12px 6px}.sidebar-foot{margin-top:auto;border-top:1px solid #263145;padding:15px 8px 0;display:flex;align-items:center;gap:9px}.avatar{width:34px;height:34px;border-radius:50%;background:#344257;display:grid;place-items:center;font-weight:800;color:white}.who{min-width:0;flex:1}.who b{font-size:12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-btn{border:0;background:transparent;color:#9aa6ba;cursor:pointer;font-size:20px}.main{margin-left:248px;width:calc(100% - 248px);min-height:100vh}.topbar{padding:28px 34px 16px;display:flex;justify-content:space-between;align-items:center}.topbar h1{font-size:25px;margin:0 0 5px}.topbar p{margin:0;color:var(--muted)}.content{padding:8px 34px 40px}.top-actions{display:flex;gap:8px}.cards{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:18px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:var(--shadow)}.stat span,.stat em{display:block;color:var(--muted);font-style:normal;font-size:12px}.stat strong{display:block;font-size:27px;margin:8px 0}.stat.accent{border-top:3px solid var(--green)}.stat.warn{border-top:3px solid var(--yellow)}.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:var(--shadow);margin-bottom:18px}.panel.compact{padding:18px}.panel h3{margin:0 0 5px}.panel p{color:var(--muted);margin:4px 0 14px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.grid-2{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}.top-grid{grid-template-columns:1fr 1fr}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th{text-align:left;color:#667287;font-size:11px;text-transform:uppercase;letter-spacing:.04em;padding:10px;border-bottom:1px solid var(--line)}td{padding:12px 10px;border-bottom:1px solid #eef1f5;vertical-align:middle}td small{display:block;color:#8b94a5;font-size:10px;max-width:280px;overflow:hidden;text-overflow:ellipsis}.pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef2f8;color:#526078;font-size:11px;font-weight:700}.pill.ok{background:#e7f8f1;color:#14795a}.pill.warn{background:#fff3dd;color:#a6650a}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d9e0eb;background:#fff;color:#344158;border-radius:9px;padding:9px 13px;font-weight:700;cursor:pointer}.btn:hover{background:#f6f8fb}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary2)}.btn.full{width:100%;margin-top:8px}.toolbar{display:flex;gap:8px;margin-bottom:14px}.toolbar input{min-width:280px;flex:1}.toolbar select{min-width:160px}input,select{border:1px solid #d9e0eb;border-radius:9px;padding:9px 11px;background:#fff;color:var(--text);min-height:38px}input:focus,select:focus{outline:2px solid rgba(49,91,234,.15);border-color:#6e8bf0}label{font-weight:700;color:#4d596d;font-size:12px;display:block;margin-bottom:5px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.form-grid input,.form-grid select{width:100%}.span2{grid-column:span 2}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.form-stack{display:flex;flex-direction:column;gap:7px}.form-stack .btn{margin-top:7px}.inline-form{display:flex;gap:8px;align-items:flex-end}.queue-list{display:flex;flex-direction:column;gap:12px}.queue-card{border:1px solid var(--line);border-radius:12px;padding:15px;background:#fbfcfe}.queue-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.queue-title b{font-size:15px}.queue-title small{display:block;color:var(--muted);margin-top:3px}.queue-fields{display:grid;grid-template-columns:2fr 1fr;gap:10px}.queue-fields input,.queue-fields select{width:100%}.queue-fields .span2{grid-column:span 2}.queue-actions{text-align:right;margin-top:10px}.missing{color:#9a610b!important;background:#fff6e8;padding:8px;border-radius:7px;font-size:12px}.flash-wrap{padding:0 34px}.flash{padding:11px 14px;border-radius:10px;margin-bottom:8px;background:#edf2ff;color:#344b87}.flash.success{background:#e8f8f2;color:#116b50}.flash.error{background:#ffebeb;color:#a13d3d}.flash.warning{background:#fff4df;color:#8d5a08}.timeline>div{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid #f0f2f6}.timeline p{margin:0;display:flex;justify-content:space-between;gap:10px;width:100%;color:var(--text)}.timeline small{color:var(--muted)}.dot{width:8px;height:8px;border-radius:50%;background:#4970ec;margin-top:6px}.empty{text-align:center;color:var(--muted);padding:35px!important}.status-dot{font-size:11px;font-weight:700;color:#a25c0a}.status-dot.on{color:#16805d}.security-note{background:#f6f8fc;border:1px solid #e3e8f0;padding:10px;border-radius:8px;color:#69758a;font-size:12px;margin-bottom:12px}.automation-row{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.automation-row p{margin:3px 0 0}.login-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,#e7edff,transparent 34%),#f4f7fb}.login-card{width:min(410px,calc(100% - 30px));background:#fff;border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:0 24px 70px rgba(35,52,86,.12)}.login-logo{display:flex;gap:12px;align-items:center;margin-bottom:24px}.login-logo h2{margin:0}.login-logo p{margin:4px 0 0;color:var(--muted)}.login-card form{display:flex;flex-direction:column;gap:7px}.login-note{display:block;text-align:center;color:#98a1b1;margin-top:18px}hr{border:0;border-top:1px solid var(--line);margin:20px 0}@media(max-width:1200px){.cards{grid-template-columns:repeat(3,1fr)}}@media(max-width:850px){.sidebar{width:76px;padding:18px 9px}.brand>div:last-child,.sidebar nav span,.nav-label,.who{display:none}.brand{padding-left:10px}.sidebar nav a{justify-content:center;font-size:18px}.main{margin-left:76px;width:calc(100% - 76px)}.topbar,.content{padding-left:18px;padding-right:18px}.flash-wrap{padding:0 18px}.grid-2,.top-grid{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.cards{grid-template-columns:1fr}.topbar{align-items:flex-start;gap:12px}.form-grid,.queue-fields{grid-template-columns:1fr}.span2,.queue-fields .span2{grid-column:span 1}.toolbar,.inline-form{flex-direction:column;align-items:stretch}.toolbar input{min-width:0}}

/* ==========================================================
   BRANDING INFOTECHNOLOGY / MEDICINA DIGITAL
   ========================================================== */

.brand-logo{
  width:46px;
  height:46px;
  border-radius:12px;
  object-fit:cover;
  flex-shrink:0;
  box-shadow:0 5px 18px rgba(0,0,0,.25);
}

.brand{
  min-height:62px;
}

.brand b{
  font-size:15px;
}

.brand small{
  font-size:11px;
}


.topbar-right{
  display:flex;
  align-items:center;
  gap:14px;
}

.medical-brand{
  display:flex;
  align-items:center;
  gap:9px;
  padding-right:14px;
  border-right:1px solid var(--line);
}

.medical-brand img{
  width:36px;
  height:36px;
  border-radius:10px;
  object-fit:cover;
}

.medical-brand strong{
  display:block;
  font-size:13px;
  color:var(--text);
}

.medical-brand small{
  display:block;
  margin-top:2px;
  font-size:10px;
  color:var(--muted);
}


.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:8px 12px;

  border:1px solid var(--line);
  border-radius:10px;

  background:var(--panel);
  color:var(--text);

  font-weight:700;
  cursor:pointer;
}

.theme-toggle:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow);
}


.app-footer{
  margin:0 34px;
  padding:20px 0 24px;

  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;

  border-top:1px solid var(--line);

  color:var(--muted);
  font-size:11px;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:8px;
}

.footer-brand img{
  width:26px;
  height:26px;
  object-fit:cover;
  border-radius:7px;
}


/* ==========================================================
   DARK MODE
   ========================================================== */

html[data-theme="dark"]{
  --bg:#071018;
  --panel:#0e1824;
  --text:#e9f0f7;
  --muted:#91a0b3;
  --line:#223040;

  --nav:#060c12;
  --nav2:#0d1721;

  --primary:#3e73ff;
  --primary2:#2859db;

  --green:#19b883;
  --yellow:#e9a338;
  --red:#ef6666;

  --shadow:0 10px 30px rgba(0,0,0,.22);
}


html[data-theme="dark"] body{
  background:var(--bg);
  color:var(--text);
}


html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .login-card{
  background:var(--panel);
  border-color:var(--line);
}


html[data-theme="dark"] input,
html[data-theme="dark"] select{
  background:#111d29;
  border-color:#2b3a4a;
  color:var(--text);
}


html[data-theme="dark"] input::placeholder{
  color:#78879a;
}


html[data-theme="dark"] .btn{
  background:#152230;
  color:#dce6f0;
  border-color:#2c3b4c;
}


html[data-theme="dark"] .btn:hover{
  background:#1b2b3b;
}


html[data-theme="dark"] .btn.primary{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}


html[data-theme="dark"] td{
  border-bottom-color:#1f2d3b;
}


html[data-theme="dark"] th{
  color:#8f9fb1;
  border-bottom-color:var(--line);
}


html[data-theme="dark"] .queue-card{
  background:#101b27;
}


html[data-theme="dark"] .security-note{
  background:#111d29;
  border-color:#273647;
  color:#91a0b3;
}


html[data-theme="dark"] .flash{
  background:#17263b;
  color:#b8caf3;
}


html[data-theme="dark"] .flash.success{
  background:#102c25;
  color:#7adbb9;
}


html[data-theme="dark"] .flash.error{
  background:#35191d;
  color:#ff9fa6;
}


html[data-theme="dark"] .flash.warning{
  background:#332714;
  color:#f2c573;
}


html[data-theme="dark"] .pill{
  background:#182535;
  color:#aebdd0;
}


html[data-theme="dark"] .pill.ok{
  background:#103329;
  color:#72dfb5;
}


html[data-theme="dark"] .pill.warn{
  background:#392b14;
  color:#f0be67;
}


html[data-theme="dark"] .timeline > div{
  border-bottom-color:#1d2a38;
}


html[data-theme="dark"] hr{
  border-top-color:var(--line);
}


/* ==========================================================
   RESPONSIVO
   ========================================================== */

@media(max-width:1000px){

  .medical-brand{
    display:none;
  }

}


@media(max-width:850px){

  .brand-logo{
    width:42px;
    height:42px;
  }

  .theme-toggle span:last-child{
    display:none;
  }

  .app-footer{
    margin-left:18px;
    margin-right:18px;
  }

}


@media(max-width:560px){

  .topbar-right{
    gap:7px;
  }

  .app-footer{
    flex-direction:column;
    align-items:flex-start;
  }

}


/* ==========================================================
   LOGIN INFOTECHNOLOGY / MEDICINA DIGITAL
   ========================================================== */

.infotech-login{
  --login-bg:#020b17;
  --login-bg2:#061729;
  --login-card:rgba(6,22,38,.88);
  --login-line:rgba(43,200,235,.22);
  --login-cyan:#18d7e8;
  --login-blue:#3184f7;
  --login-text:#f4f8fc;
  --login-muted:#8fa4b8;

  position:relative;
  min-height:100vh;
  overflow-x:hidden;
  display:block;

  background:
    radial-gradient(circle at 5% 75%,rgba(11,202,207,.12),transparent 30%),
    radial-gradient(circle at 95% 55%,rgba(23,129,234,.11),transparent 32%),
    linear-gradient(135deg,var(--login-bg),var(--login-bg2));

  color:var(--login-text);
}


.infotech-login .login-grid-bg{
  position:fixed;
  inset:0;
  pointer-events:none;

  background-image:
    linear-gradient(rgba(54,131,177,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(54,131,177,.055) 1px,transparent 1px);

  background-size:54px 54px;

  mask-image:
    linear-gradient(to bottom,rgba(0,0,0,.75),transparent 95%);
}


.login-glow{
  position:fixed;
  width:460px;
  height:460px;
  border-radius:50%;
  filter:blur(110px);
  pointer-events:none;
  opacity:.13;
}

.login-glow-left{
  left:-260px;
  bottom:-180px;
  background:#00d5c4;
}

.login-glow-right{
  right:-280px;
  top:140px;
  background:#168eff;
}


.login-header{
  position:relative;
  z-index:3;

  height:88px;
  padding:0 clamp(24px,5vw,76px);

  display:flex;
  justify-content:space-between;
  align-items:center;

  border-bottom:1px solid rgba(95,156,195,.12);
}


.login-brand{
  display:flex;
  align-items:center;
  gap:13px;
}

.login-brand img{
  width:48px;
  height:48px;

  object-fit:cover;

  border-radius:13px;

  box-shadow:
    0 0 25px rgba(28,211,224,.13);
}

.login-brand strong{
  display:block;

  color:#f4f7fa;

  font-size:17px;
  letter-spacing:-.02em;
}

.login-brand strong span{
  color:var(--login-cyan);
}

.login-brand small{
  display:block;

  margin-top:4px;

  color:#70889e;

  font-size:10px;
  letter-spacing:.07em;
}


.login-theme-toggle{
  width:40px;
  height:40px;

  border:1px solid rgba(65,174,218,.22);
  border-radius:10px;

  background:rgba(10,31,48,.72);

  color:#9ed9e8;

  cursor:pointer;

  font-size:16px;
}


.login-layout{
  position:relative;
  z-index:2;

  width:min(1420px,calc(100% - 48px));
  min-height:calc(100vh - 154px);

  margin:0 auto;

  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,.72fr);
  gap:clamp(60px,8vw,140px);
  align-items:center;
}


.login-product{
  max-width:720px;
}


.login-kicker{
  margin-bottom:18px;

  color:#80a7bc;

  font-size:11px;
  font-weight:700;
  letter-spacing:.25em;
}


.login-product h1{
  max-width:650px;

  margin:0;

  color:#f6f8fb;

  font-size:clamp(42px,5vw,72px);
  line-height:1.03;
  letter-spacing:-.045em;
}


.login-product h1 span{
  background:
    linear-gradient(
      90deg,
      var(--login-cyan),
      var(--login-blue)
    );

  -webkit-background-clip:text;
  background-clip:text;

  color:transparent;
}


.login-product-description{
  max-width:600px;

  margin:24px 0 34px;

  color:#9aafc0;

  font-size:17px;
  line-height:1.65;
}


.login-features{
  max-width:620px;

  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}


.login-feature{
  min-height:72px;

  padding:13px 16px;

  display:flex;
  align-items:center;
  gap:15px;

  border:1px solid rgba(70,150,191,.13);
  border-radius:13px;

  background:rgba(7,24,40,.42);
}


.feature-icon{
  width:42px;
  height:42px;

  flex:0 0 42px;

  display:grid;
  place-items:center;

  border:1px solid rgba(17,213,228,.25);
  border-radius:10px;

  color:var(--login-cyan);

  background:rgba(15,109,147,.12);

  font-size:11px;
  font-weight:800;
}


.login-feature strong{
  display:block;

  margin-bottom:4px;

  color:#edf5fa;

  font-size:13px;
}


.login-feature span{
  color:#8197a9;

  font-size:12px;
  line-height:1.4;
}


.login-product-footer{
  margin-top:32px;

  display:flex;
  align-items:center;
  gap:13px;

  color:#61788e;

  font-size:9px;
  letter-spacing:.17em;
}


.product-line{
  width:30px;
  height:2px;

  background:var(--login-cyan);
}


.login-access{
  display:flex;
  justify-content:flex-end;
}


.infotech-login-card{
  position:relative;

  width:min(100%,500px);

  padding:46px;

  overflow:hidden;

  border:1px solid rgba(44,197,231,.30);
  border-radius:20px;

  background:
    linear-gradient(
      150deg,
      rgba(9,34,55,.94),
      rgba(4,19,34,.96)
    );

  box-shadow:
    0 28px 90px rgba(0,0,0,.28);
}


.login-card-topline{
  position:absolute;
  top:0;
  left:48px;

  width:80px;
  height:2px;

  background:
    linear-gradient(
      90deg,
      var(--login-cyan),
      var(--login-blue)
    );
}


.login-card-kicker{
  color:#83a0b4;

  font-size:10px;
  font-weight:700;
  letter-spacing:.22em;
}


.infotech-login-card h2{
  margin:13px 0 7px;

  color:#f7fafc;

  font-size:32px;
  letter-spacing:-.035em;
}


.login-card-description{
  margin:0 0 28px;

  color:#8197a9;

  font-size:14px;
}


.infotech-login-card form{
  display:flex;
  flex-direction:column;
}


.infotech-login-card label{
  margin:0 0 7px;

  color:#dce7ef;

  font-size:12px;
}


.login-input{
  position:relative;

  margin-bottom:20px;
}


.login-input input{
  width:100%;
  min-height:50px;

  padding:0 48px;

  border:1px solid rgba(118,159,188,.30);
  border-radius:11px;

  background:rgba(9,30,47,.78);

  color:#f4f7fa;

  outline:none;
}


.login-input input:focus{
  border-color:rgba(28,215,232,.62);

  box-shadow:
    0 0 0 3px rgba(28,215,232,.07);
}


.login-input-icon{
  position:absolute;
  z-index:1;

  left:17px;
  top:50%;

  transform:translateY(-50%);

  color:#6e92aa;

  font-size:13px;
}


.password-toggle{
  position:absolute;

  right:13px;
  top:50%;

  transform:translateY(-50%);

  width:30px;
  height:30px;

  border:0;
  background:transparent;

  color:#80a2b8;

  cursor:pointer;
}


.login-submit{
  min-height:51px;

  margin-top:5px;

  justify-content:center;
  gap:13px;

  border:0;

  background:
    linear-gradient(
      90deg,
      #16dbe9,
      #2d9ff4
    ) !important;

  color:#01101c !important;

  box-shadow:
    0 12px 32px rgba(21,185,230,.16);
}


.login-submit:hover{
  filter:brightness(1.06);
}


.login-secure{
  margin-top:22px;

  display:flex;
  justify-content:center;
  align-items:center;
  gap:7px;

  color:#6f899c;

  font-size:10px;
}


.secure-dot{
  width:6px;
  height:6px;

  border-radius:50%;

  background:#18c995;

  box-shadow:
    0 0 8px rgba(24,201,149,.45);
}


.login-global-footer{
  position:relative;
  z-index:2;

  min-height:66px;

  padding:0 clamp(24px,5vw,76px);

  display:flex;
  justify-content:space-between;
  align-items:center;

  border-top:1px solid rgba(95,156,195,.10);

  color:#526a7d;

  font-size:10px;
}


.login-flashes{
  margin-bottom:18px;
}


/* LOGIN LIGHT MODE */

html[data-theme="light"] .infotech-login{
  --login-bg:#eef5fb;
  --login-bg2:#f8fbfe;
  --login-card:rgba(255,255,255,.94);
  --login-text:#112033;
  --login-muted:#697c8f;

  background:
    radial-gradient(circle at 5% 75%,rgba(11,202,207,.09),transparent 30%),
    radial-gradient(circle at 95% 55%,rgba(23,129,234,.08),transparent 32%),
    linear-gradient(135deg,#edf5fa,#f9fcfe);
}


html[data-theme="light"] .login-brand strong,
html[data-theme="light"] .login-product h1,
html[data-theme="light"] .infotech-login-card h2{
  color:#101d2d;
}


html[data-theme="light"] .login-feature{
  background:rgba(255,255,255,.55);
}


html[data-theme="light"] .login-feature strong,
html[data-theme="light"] .infotech-login-card label{
  color:#25384a;
}


html[data-theme="light"] .infotech-login-card{
  background:rgba(255,255,255,.88);

  box-shadow:
    0 28px 70px rgba(35,67,94,.11);
}


html[data-theme="light"] .login-input input{
  background:#f8fbfd;

  color:#172537;
}


html[data-theme="light"] .login-theme-toggle{
  background:#fff;
  color:#314b62;
}


@media(max-width:980px){

  .login-layout{
    grid-template-columns:1fr;

    padding:60px 0;
  }

  .login-product{
    display:none;
  }

  .login-access{
    justify-content:center;
  }

}


@media(max-width:560px){

  .login-header{
    height:74px;
    padding:0 18px;
  }

  .login-brand img{
    width:40px;
    height:40px;
  }

  .login-brand small{
    display:none;
  }

  .login-layout{
    width:calc(100% - 28px);
    padding:38px 0;
  }

  .infotech-login-card{
    padding:32px 23px;
  }

  .login-global-footer{
    padding:18px;
    flex-direction:column;
    gap:6px;
    text-align:center;
  }

}
