/* ============================================================
   CALEVI SAS · Hub de herramientas
   Alineado al Manual de Marca v1.0
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}

:root{
  --green: #00C853;
  --green-soft: rgba(0,200,83,.12);
  --green-edge: rgba(0,200,83,.28);
  --ink: #0F1115;
  --ink-2: #1E232A;
  --ink-3: #12161C;
  --line: #E6E8EB;
  --muted: #8A93A0;
  --muted-2: #5A6270;
  --white: #FFFFFF;
  --danger: #E34B6A;
  --warn: #FFB84D;
  --warn-soft: rgba(255,184,77,.14);
  --warn-edge: rgba(255,184,77,.35);
  --ff: 'Montserrat', Helvetica, Arial, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

html,body{height:100%;}
body{
  font-family:var(--ff);
  background:var(--ink);
  color:var(--white);
  min-height:100vh;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  font-weight:400;
}
.hidden{display:none !important;}

/* WORDMARK / LOGO CALEVI */
.brand-logo{
  height:26px;
  width:auto;
  display:block;
}

/* Login: chip ink con icono + palabra CALEVI */
.login-brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.login-brand-chip{
  width:44px;
  height:44px;
  background:var(--ink);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:9px;
  box-shadow:0 4px 12px rgba(15,17,21,.15);
}
.login-brand-chip img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.login-brand-name{
  font-family:var(--ff);
  font-weight:700;
  letter-spacing:1px;
  font-size:17px;
  color:var(--ink);
  display:flex;
  align-items:center;
  gap:6px;
}
.login-brand-name .sub{
  color:var(--green);
  font-weight:700;
  letter-spacing:1.5px;
}

/* LAYOUT */
.shell{
  display:grid;
  grid-template-columns:240px 1fr;
  min-height:100vh;
  position:relative;
  z-index:1;
}

/* SIDEBAR */
.sidebar{
  background:var(--ink);
  border-right:1px solid rgba(255,255,255,.06);
  padding:28px 20px;
  display:flex;
  flex-direction:column;
  gap:28px;
  position:sticky;
  top:0;
  height:100vh;
}
.brand{display:flex;align-items:center;padding:0 6px;}
.nav{display:flex;flex-direction:column;gap:2px;margin-top:8px;}
.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 12px;
  border-radius:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  letter-spacing:1.5px;
  text-transform:uppercase;
  cursor:pointer;
  transition:all .2s ease;
  border-left:2px solid transparent;
}
.nav-item:hover{color:var(--line);background:rgba(255,255,255,.02);}
.nav-item.active{
  color:var(--white);
  background:rgba(255,255,255,.02);
  border-left-color:var(--green);
}
.nav-item svg{width:16px;height:16px;flex-shrink:0;}

.user{
  margin-top:auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 8px;
  border-top:1px solid rgba(255,255,255,.06);
}
.user-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--green);
  color:var(--ink);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:13px;
  flex-shrink:0;
}
.user-info{font-size:12px;line-height:1.3;flex:1;min-width:0;}
.user-info b{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--white);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.user-info span{
  color:var(--muted);
  font-size:9px;
  letter-spacing:2px;
  text-transform:uppercase;
  font-weight:600;
}
.logout-btn{
  background:transparent;
  border:1px solid rgba(255,255,255,.1);
  width:30px;
  height:30px;
  border-radius:7px;
  color:var(--muted);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all .2s ease;
  flex-shrink:0;
}
.logout-btn:hover{color:var(--danger);border-color:rgba(227,75,106,.4);}
.logout-btn svg{width:13px;height:13px;}

/* MAIN */
.main{
  padding:36px 40px;
  max-width:1200px;
  margin:0 auto;
  width:100%;
}
.content{min-width:0;}

.hero{
  margin-bottom:32px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.hero-label{
  color:var(--muted);
  font-size:10px;
  letter-spacing:4px;
  text-transform:uppercase;
  font-weight:600;
  margin-bottom:14px;
  display:flex;
  align-items:center;
  gap:10px;
}
.hero-label .dot{width:6px;height:6px;background:var(--green);border-radius:50%;}
.hero h1{
  font-size:36px;
  font-weight:700;
  letter-spacing:-.5px;
  margin-bottom:10px;
  line-height:1.1;
}
.hero h1 .wave{
  display:inline-block;
  animation:wave 1.6s ease infinite;
  transform-origin:70% 70%;
}
@keyframes wave{
  0%,60%,100%{transform:rotate(0)}
  20%{transform:rotate(18deg)}
  40%{transform:rotate(-10deg)}
}
.hero p{
  color:var(--line);
  font-size:14px;
  max-width:480px;
  line-height:1.7;
  font-weight:400;
}

.search{position:relative;width:320px;max-width:100%;}
.search input{
  width:100%;
  height:44px;
  background:var(--ink-2);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  color:var(--white);
  padding:0 14px 0 42px;
  font-family:var(--ff);
  font-size:13px;
  font-weight:500;
  outline:none;
  transition:all .2s ease;
}
.search input:focus{border-color:var(--green-edge);}
.search input::placeholder{color:var(--muted);}
.search svg{
  position:absolute;
  left:15px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  color:var(--muted);
}

/* SECCIONES */
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.section-head h2{
  font-size:12px;
  font-weight:600;
  letter-spacing:3px;
  text-transform:uppercase;
  color:var(--white);
  display:flex;
  align-items:center;
  gap:10px;
}
.section-head h2 .dot{width:6px;height:6px;background:var(--green);border-radius:50%;}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 16px;
  border-radius:8px;
  font-family:var(--ff);
  font-size:11px;
  font-weight:600;
  letter-spacing:2px;
  text-transform:uppercase;
  cursor:pointer;
  border:1px solid transparent;
  transition:all .2s ease;
}
.btn-primary{background:var(--green);color:var(--ink);}
.btn-primary:hover{
  background:#00E061;
  transform:translateY(-1px);
  box-shadow:0 6px 20px -6px rgba(0,200,83,.4);
}
.btn-ghost{background:transparent;border-color:rgba(255,255,255,.15);color:var(--line);}
.btn-ghost:hover{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.25);}

/* TOOLS */
.tools{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:16px;
}
.loading{
  grid-column:1/-1;
  text-align:center;
  padding:60px 20px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:2px;
  text-transform:uppercase;
}

.tool{
  background:var(--ink-2);
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  padding:20px;
  position:relative;
  transition:all .25s ease;
  overflow:hidden;
}
.tool::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:2px;
  background:transparent;
  transition:background .25s ease;
}
.tool:hover{
  background:#242A33;
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.1);
}
.tool:hover::before{background:var(--green);}

.tool-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:16px;
}
.tool-icon{
  width:44px;
  height:44px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--ff);
  font-weight:700;
  font-size:13px;
  letter-spacing:.5px;
  background:var(--green-soft);
  color:var(--green);
  border:1px solid var(--green-edge);
}
.tool-icon.meta{background:rgba(24,119,242,.12);color:#5B9EFF;border-color:rgba(24,119,242,.25);}
.tool-icon.meli{background:rgba(255,221,0,.12);color:#F5D446;border-color:rgba(255,221,0,.25);}
.tool-icon.telegram{background:rgba(0,136,204,.12);color:#4BB8F0;border-color:rgba(0,136,204,.25);}
.tool-icon.temu{background:rgba(255,110,0,.12);color:#FF9A4D;border-color:rgba(255,110,0,.25);}
.tool-icon.renting{background:var(--green-soft);color:var(--green);border-color:var(--green-edge);}
.tool-icon.calc{background:rgba(230,232,235,.08);color:var(--line);border-color:rgba(230,232,235,.18);}

.tool-actions{display:flex;gap:6px;opacity:0;transition:opacity .2s ease;}
.tool:hover .tool-actions{opacity:1;}
.icon-btn{
  width:28px;
  height:28px;
  border-radius:6px;
  background:transparent;
  border:1px solid rgba(255,255,255,.1);
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all .2s ease;
}
.icon-btn:hover{background:var(--ink);color:var(--white);border-color:rgba(255,255,255,.2);}
.icon-btn svg{width:13px;height:13px;}

.tool h3{
  font-size:15px;
  font-weight:600;
  letter-spacing:-.1px;
  margin-bottom:4px;
  color:var(--white);
}
.tool p{
  font-size:12.5px;
  color:var(--muted);
  line-height:1.6;
  margin-bottom:18px;
  min-height:40px;
  font-weight:400;
}

.tool-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;}

.status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:1.5px;
}
.status-dot{width:7px;height:7px;border-radius:50%;position:relative;}
.status-dot::after{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius:50%;
  opacity:.3;
  animation:pulse 2s ease infinite;
}
.status.online{color:var(--green);}
.status.online .status-dot{background:var(--green);}
.status.online .status-dot::after{background:var(--green);}
.status.offline{color:var(--danger);}
.status.offline .status-dot{background:var(--danger);}
.status.offline .status-dot::after{background:var(--danger);animation:none;}
.status.checking,.status.unknown{color:var(--warn);}
.status.checking .status-dot,.status.unknown .status-dot{background:var(--warn);}
.status.checking .status-dot::after,.status.unknown .status-dot::after{background:var(--warn);}
.status.slow{color:var(--warn);}
.status.slow .status-dot{background:var(--warn);}
.status.slow .status-dot::after{background:var(--warn);}
@keyframes pulse{
  0%,100%{transform:scale(1);opacity:.3}
  50%{transform:scale(1.4);opacity:0}
}

.tool-open{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  font-weight:700;
  letter-spacing:1.8px;
  text-transform:uppercase;
  color:var(--line);
  text-decoration:none;
  padding:9px 14px;
  border-radius:7px;
  background:var(--ink);
  border:1px solid rgba(255,255,255,.08);
  transition:all .2s ease;
}
.tool-open:hover{
  background:var(--green);
  color:var(--ink);
  border-color:var(--green);
}
.tool-open svg{width:11px;height:11px;}

.tool.add{
  border:1px dashed rgba(255,255,255,.15);
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  min-height:220px;
}
.tool.add::before{display:none;}
.tool.add:hover{
  background:rgba(0,200,83,.03);
  border-color:var(--green-edge);
  transform:none;
}
.add-inner{text-align:center;color:var(--muted);}
.add-inner .plus{
  width:46px;
  height:46px;
  border-radius:10px;
  background:var(--ink-2);
  border:1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 12px;
  font-size:22px;
  color:var(--green);
  font-weight:300;
  transition:all .2s ease;
}
.tool.add:hover .plus{background:var(--green);color:var(--ink);border-color:var(--green);}
.add-inner b{
  display:block;
  font-size:11px;
  color:var(--line);
  font-weight:700;
  margin-bottom:4px;
  letter-spacing:2px;
  text-transform:uppercase;
}
.add-inner span{font-size:10px;color:var(--muted);letter-spacing:1.5px;}

/* MODAL */
.modal-bg{
  position:fixed;
  inset:0;
  background:rgba(9,11,14,.75);
  backdrop-filter:blur(6px);
  z-index:100;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.modal-bg.open{display:flex;animation:fadeIn .2s ease;}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal{
  background:var(--ink-2);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:28px;
  width:100%;
  max-width:480px;
  max-height:90vh;
  overflow-y:auto;
  animation:modalUp .25s ease;
}
@keyframes modalUp{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}
.modal h3{
  font-size:20px;
  font-weight:700;
  margin-bottom:6px;
  letter-spacing:-.3px;
  color:var(--white);
}
.modal .sub{font-size:13px;color:var(--muted);margin-bottom:24px;line-height:1.5;}
.field{margin-bottom:16px;}
.field label{
  display:block;
  font-size:10px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:2px;
}
.field input,.field textarea,.field select{
  width:100%;
  background:var(--ink);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  padding:12px 14px;
  color:var(--white);
  font-family:var(--ff);
  font-size:13px;
  font-weight:500;
  outline:none;
  transition:border-color .2s ease;
}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--green-edge);}
.field textarea{resize:vertical;min-height:72px;}

.icon-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;}
.icon-opt{
  aspect-ratio:1;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.08);
  background:var(--ink);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--ff);
  font-size:12px;
  font-weight:700;
  transition:all .15s ease;
}
.icon-opt:hover{border-color:rgba(255,255,255,.2);}
.icon-opt.selected{border-color:var(--green);box-shadow:0 0 0 2px var(--green-soft);}

.modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,.06);
}
.modal-error{color:var(--danger);font-size:12px;min-height:18px;margin-top:4px;font-weight:500;}

/* LOGIN */
.login-bg{
  position:fixed;
  inset:0;
  background:var(--white);
  z-index:1000;
  display:grid;
  grid-template-columns:1fr 1fr;
}
.login-left{
  position:relative;
  display:flex;
  flex-direction:column;
  padding:48px 64px;
  z-index:1;
}
.login-brand{display:flex;align-items:center;gap:10px;}
.login-form-wrap{flex:1;display:flex;align-items:center;}
.login-form{width:100%;max-width:400px;}
.login-form .hero-label{color:var(--muted);margin-bottom:24px;}
.login-form h2{
  font-size:32px;
  font-weight:800;
  letter-spacing:-.6px;
  color:var(--ink);
  margin-bottom:12px;
  line-height:1.1;
}
.login-form .sub{
  font-size:14px;
  color:#6B7280;
  margin-bottom:32px;
  line-height:1.6;
  font-weight:500;
}

.field-light{margin-bottom:18px;}
.field-light label{
  display:block;
  font-size:10px;
  font-weight:700;
  color:#6B7280;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:2px;
}
.field-light input{
  width:100%;
  background:var(--white);
  border:1px solid #E6E8EB;
  border-radius:8px;
  padding:14px 16px;
  color:var(--ink);
  font-family:var(--ff);
  font-size:14px;
  font-weight:500;
  outline:none;
  transition:all .2s ease;
}
.field-light input:focus{border-color:var(--green);box-shadow:0 0 0 3px var(--green-soft);}
.field-light input::placeholder{color:#B8BEC8;}

.login-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
  font-size:13px;
}
.login-row label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#6B7280;
  cursor:pointer;
  font-weight:500;
}
.login-row input[type="checkbox"]{width:16px;height:16px;accent-color:var(--green);cursor:pointer;}

.login-error{
  color:#D93A5C;
  font-size:13px;
  min-height:20px;
  margin-bottom:8px;
  font-weight:500;
}

.btn-login{
  width:100%;
  height:52px;
  background:var(--green);
  color:var(--ink);
  border:none;
  border-radius:10px;
  font-family:var(--ff);
  font-weight:700;
  font-size:13px;
  letter-spacing:.5px;
  cursor:pointer;
  transition:all .2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-transform:none;
}
.btn-login:hover{
  background:#00E061;
  transform:translateY(-1px);
  box-shadow:0 10px 28px -8px rgba(0,200,83,.5);
}
.btn-login:disabled{opacity:.6;cursor:not-allowed;transform:none;}
.btn-login .arrow{
  width:20px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.btn-login .arrow svg{width:16px;height:16px;}

.login-foot{
  margin-top:auto;
  padding-top:32px;
  font-size:10px;
  color:var(--muted);
  letter-spacing:2.5px;
  text-transform:uppercase;
  font-weight:600;
}
.login-foot .sep{margin:0 10px;opacity:.4;}

.login-right{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px;
  overflow:hidden;
  background:linear-gradient(135deg, #00A844 0%, #00C853 40%, #3DD97F 100%);
}
.login-right::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(15,17,21,.18), transparent 40%);
}
/* Dots flotantes decorativos como en el mockup */
.login-right::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.3) 1.5px, transparent 1.5px);
  background-size:130px 130px;
  background-position:10px 20px, 70px 80px;
  opacity:.5;
  -webkit-mask-image:radial-gradient(ellipse at center, black 40%, transparent 80%);
  mask-image:radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.login-visual{
  position:relative;
  z-index:1;
  color:var(--white);
  max-width:460px;
  padding:40px 30px;
  text-align:center;
}
.login-visual .visual-label{
  font-size:10px;
  letter-spacing:4px;
  text-transform:uppercase;
  color:rgba(255,255,255,.8);
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:20px;
  padding:6px 14px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:100px;
  background:rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
}
.login-visual .visual-label .dot{
  width:6px;
  height:6px;
  background:var(--white);
  border-radius:50%;
  animation:pulseLight 2s ease infinite;
}
@keyframes pulseLight{
  0%,100%{opacity:.5}
  50%{opacity:1}
}
.login-visual h3{
  font-size:32px;
  font-weight:700;
  letter-spacing:-.4px;
  margin-bottom:14px;
  line-height:1.2;
  color:var(--white);
}
.login-visual h3 .accent{
  color:var(--ink);
}
.login-visual p{
  font-size:14px;
  color:rgba(255,255,255,.9);
  line-height:1.7;
  margin-bottom:36px;
  font-weight:500;
  max-width:380px;
  margin-left:auto;
  margin-right:auto;
}

.visual-cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  max-width:420px;
  margin:0 auto;
}
.vcard{
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter:blur(12px);
  border-radius:12px;
  padding:18px 10px;
  transition:all .3s ease;
  cursor:default;
}
.vcard:hover{
  background:rgba(255,255,255,.22);
  transform:translateY(-2px);
}
.vcard-ico{
  width:36px;
  height:36px;
  border-radius:9px;
  background:rgba(255,255,255,.2);
  color:var(--white);
  margin:0 auto 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--ff);
  font-weight:700;
  font-size:10px;
  letter-spacing:.5px;
  border:1px solid rgba(255,255,255,.15);
}
.vcard-name{
  font-size:11px;
  font-weight:700;
  text-align:center;
  color:var(--white);
  letter-spacing:.3px;
}

/* TOAST */
.toast{
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%) translateY(100px);
  background:var(--ink-2);
  border:1px solid rgba(255,255,255,.1);
  border-radius:8px;
  padding:14px 20px;
  font-size:11px;
  font-weight:700;
  letter-spacing:1.5px;
  text-transform:uppercase;
  z-index:200;
  transition:transform .3s ease;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.toast.show{transform:translateX(-50%) translateY(0);}
.toast.success{border-color:var(--green-edge);color:var(--green);}
.toast.error{border-color:rgba(227,75,106,.4);color:var(--danger);}

/* ============================================================
   SEARCH SHORTCUT BADGE
   ============================================================ */
.search{position:relative;}
.search-kbd{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-family:var(--fm);
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  border-radius:5px;
  pointer-events:none;
  transition:opacity .2s ease;
}
.search input:focus ~ .search-kbd{opacity:.4;}

/* ============================================================
   PILLS DE CATEGORÍAS
   ============================================================ */
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:22px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:100px;
  border:1px solid rgba(255,255,255,.1);
  background:transparent;
  color:var(--muted);
  font-family:var(--ff);
  font-size:10px;
  font-weight:700;
  letter-spacing:1.8px;
  text-transform:uppercase;
  cursor:pointer;
  transition:all .2s ease;
}
.pill:hover{border-color:rgba(255,255,255,.2);color:var(--line);}
.pill.active{
  background:var(--green-soft);
  border-color:var(--green-edge);
  color:var(--green);
}
.pill .count{
  font-family:var(--fm);
  font-size:10px;
  font-weight:600;
  opacity:.7;
  letter-spacing:.3px;
}
.pill.active .count{opacity:.9;}

/* ============================================================
   SECCIONES (Favoritos / Todas)
   ============================================================ */
.grid-section{margin-bottom:28px;}
.grid-section:last-child{margin-bottom:0;}
.section-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.section-label{
  font-size:10px;
  font-weight:700;
  letter-spacing:2.5px;
  text-transform:uppercase;
  color:var(--white);
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.section-label .dot{width:6px;height:6px;background:var(--green);border-radius:50%;}
.section-count{
  font-size:10px;
  font-weight:700;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--muted);
  font-family:var(--fm);
}

/* TOOL variant .fav (tarjetas más grandes) */
.tool.fav{padding:22px;}
.tool.fav .tool-icon{width:48px;height:48px;font-size:14px;}
.tool.fav h3{font-size:16px;}

/* ============================================================
   FAVORITE STAR
   ============================================================ */
.star-btn{
  position:absolute;
  top:14px;
  right:14px;
  width:30px;
  height:30px;
  border-radius:7px;
  background:transparent;
  border:none;
  padding:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  transition:all .2s ease;
  z-index:2;
}
.star-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;}
.star-btn:hover{color:var(--green);background:rgba(255,255,255,.04);}
.star-btn.on{color:var(--green);}
.star-btn.on svg{fill:var(--green);stroke:var(--green);}
/* Oculta las acciones de editar/eliminar en la esquina para darle espacio a la estrella */
.tool .tool-top{padding-right:34px;}

/* ============================================================
   THEME TOGGLE (sidebar) + LIGHT MODE
   ============================================================ */
.theme-toggle{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  padding:0;
  margin:-16px 0 0 8px;
  background:transparent;
  border:none;
  cursor:pointer;
  font-family:var(--ff);
  color:var(--muted);
  transition:opacity .2s ease;
}
.theme-toggle:hover{opacity:.85;}
.theme-track{
  position:relative;
  width:42px;
  height:22px;
  border-radius:100px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 4px;
  transition:background .25s ease, border-color .25s ease;
}
.theme-icon{
  width:11px;
  height:11px;
  stroke-width:2.2;
  z-index:1;
  transition:opacity .2s ease, color .2s ease;
}
.theme-icon.ti-moon{color:var(--green);}
.theme-icon.ti-sun{color:var(--muted);}
.theme-thumb{
  position:absolute;
  top:2px;
  left:2px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 2px 6px rgba(0,200,83,.35);
  transition:transform .25s cubic-bezier(.4,.0,.2,1), background .25s ease;
}
.theme-toggle[aria-checked="true"] .theme-thumb{
  transform:translateX(20px);
  background:#FFB84D;
  box-shadow:0 2px 6px rgba(255,184,77,.4);
}
.theme-toggle[aria-checked="true"] .theme-icon.ti-moon{color:var(--muted);}
.theme-toggle[aria-checked="true"] .theme-icon.ti-sun{color:#FFB84D;}

/* ---------- LIGHT MODE ---------- */
body.light{
  --ink:   #F5F6F8;
  --ink-2: #FFFFFF;
  --ink-3: #EEF1F4;
  --white: #0F1115;
  --line:  #2A2F38;
  --muted: #6B7280;
  --muted-2:#8A93A0;
}
body.light .sidebar{border-right-color:rgba(15,17,21,.08);}
body.light .nav-item:hover{background:rgba(15,17,21,.04);color:var(--ink);}
body.light .nav-item.active{background:rgba(15,17,21,.04);}
body.light .user{border-top-color:rgba(15,17,21,.08);}
body.light .user-avatar{color:#FFFFFF;}
body.light .logout-btn{border-color:rgba(15,17,21,.12);}
body.light .logout-btn:hover{border-color:rgba(227,75,106,.45);}

body.light .search input{
  background:#FFFFFF;
  border-color:rgba(15,17,21,.1);
  color:var(--white);
}
body.light .section-head{border-bottom-color:rgba(15,17,21,.08);}
body.light .btn-primary{color:#FFFFFF;}
body.light .btn-primary:hover{color:#FFFFFF;box-shadow:0 6px 20px -6px rgba(0,200,83,.35);}
body.light .btn-ghost{border-color:rgba(15,17,21,.15);color:var(--white);}
body.light .btn-ghost:hover{background:rgba(15,17,21,.04);border-color:rgba(15,17,21,.25);}

body.light .tool{
  border-color:rgba(15,17,21,.08);
  box-shadow:0 1px 3px rgba(15,17,21,.04);
}
body.light .tool:hover{
  background:#FAFBFC;
  border-color:rgba(15,17,21,.14);
  box-shadow:0 8px 24px -12px rgba(15,17,21,.12);
}
body.light .tool-icon.calc{
  background:rgba(15,17,21,.05);
  color:var(--white);
  border-color:rgba(15,17,21,.12);
}
body.light .icon-btn{
  border-color:rgba(15,17,21,.12);
  color:var(--muted);
}
body.light .icon-btn:hover{
  background:#FFFFFF;
  color:var(--white);
  border-color:rgba(15,17,21,.22);
}
body.light .tool-open{
  background:#FFFFFF;
  border-color:rgba(15,17,21,.1);
}
body.light .tool-open:hover{color:#FFFFFF;}
body.light .tool.add{
  border-color:rgba(15,17,21,.14);
  background:transparent;
}
body.light .tool.add:hover{
  background:rgba(0,200,83,.04);
  border-color:var(--green-edge);
}
body.light .tool.add .plus{
  background:#FFFFFF;
  border-color:rgba(15,17,21,.1);
}
body.light .tool.add:hover .plus{background:var(--green);color:#FFFFFF;}

body.light .modal-bg{background:rgba(15,17,21,.35);}
body.light .modal{border-color:rgba(15,17,21,.1);box-shadow:0 20px 60px rgba(15,17,21,.15);}
body.light .field input,
body.light .field textarea,
body.light .field select{
  border-color:rgba(15,17,21,.1);
  color:var(--white);
}
body.light .icon-opt{border-color:rgba(15,17,21,.1);}
body.light .modal-actions{border-top-color:rgba(15,17,21,.08);}

body.light .toast{
  border-color:rgba(15,17,21,.1);
  box-shadow:0 10px 30px rgba(15,17,21,.12);
}

body.light .theme-track{
  background:rgba(15,17,21,.06);
  border-color:rgba(15,17,21,.1);
}

body.light .search-kbd{
  background:rgba(15,17,21,.04);
  border-color:rgba(15,17,21,.1);
  color:var(--muted);
}
body.light .pill{
  border-color:rgba(15,17,21,.12);
  color:var(--muted);
}
body.light .pill:hover{border-color:rgba(15,17,21,.22);color:var(--white);}
body.light .pill.active{
  background:var(--green-soft);
  border-color:var(--green-edge);
  color:var(--green);
}
body.light .star-btn{color:rgba(15,17,21,.35);}
body.light .star-btn:hover{color:var(--green);background:rgba(15,17,21,.04);}
body.light .star-btn.on{color:var(--green);}
body.light .star-btn.on svg{fill:var(--green);stroke:var(--green);}

/* RESPONSIVE */
@media (max-width:900px){
  .login-bg{grid-template-columns:1fr;}
  .login-right{display:none;}
  .login-left{padding:32px 24px;}
  .shell{grid-template-columns:1fr;}
  .sidebar{
    position:static;
    height:auto;
    flex-direction:row;
    align-items:center;
    padding:16px 20px;
  }
  .sidebar .nav{display:none;}
  .user{margin:0 0 0 auto;border-top:none;padding-top:0;}
  .main{padding:24px 20px;}
  .hero{flex-direction:column;}
  .search{width:100%;}
  .hero h1{font-size:28px;}
}
