@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
:root{
  --bg:#f3f6fb;--panel:#fff;--text:#101828;--muted:#667085;--line:#e7edf5;
  --sidebar:#0b1526;--sidebar2:#081326;--blue:#2563ff;--blue2:#1d4ed8;
  --green-bg:#dcfae6;--green:#067647;--red-bg:#fee4e2;--red:#b42318;--yellow-bg:#fef0c7;--yellow:#b54708;
  --shadow:0 18px 50px rgba(16,24,40,.08);
}
*{box-sizing:border-box}html{font-size:14px}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);font-weight:400;-webkit-font-smoothing:antialiased}a{color:inherit}
.sidebar{position:fixed;inset:0 auto 0 0;width:280px;background:linear-gradient(180deg,#101828 0%,#081326 100%);color:#fff;padding:0 14px 18px;box-shadow:8px 0 30px rgba(16,24,40,.10);z-index:20}.brand{height:142px;margin:0 -14px 18px;padding:24px 22px;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;font-size:0}.brand img{max-width:210px;max-height:96px;object-fit:contain;display:block}.brand span{display:none}.sidebar a{display:flex;align-items:center;gap:13px;color:#d0d5dd;text-decoration:none;padding:14px 16px;border-radius:13px;margin:6px 0;font-weight:700;font-size:15px;letter-spacing:-.01em;transition:.18s ease}.sidebar a:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}.sidebar a.active{background:linear-gradient(135deg,var(--blue),#1d4ed8);color:#fff;box-shadow:0 10px 24px rgba(37,99,255,.28)}.sidebar a .ico{width:22px;height:22px;display:grid;place-items:center;flex:0 0 22px}.sidebar a .ico svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.sidebar-version{position:absolute;left:14px;right:14px;bottom:18px;border:1px solid rgba(255,255,255,.10);border-radius:12px;padding:13px 14px;color:#d0d5dd;background:rgba(255,255,255,.04);font-size:12px;font-weight:700}.sidebar-version:before{content:"";display:inline-block;width:9px;height:9px;background:#22c55e;border-radius:50%;margin-right:8px}
.main{margin-left:280px;padding:116px 32px 42px;max-width:none}.topbar{position:fixed;left:280px;right:0;top:0;height:82px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;z-index:10}.topbar-brand{display:flex;align-items:center;gap:14px;font-size:22px;font-weight:900;letter-spacing:-.035em}.topbar-brand .shield{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#eef4ff;color:var(--blue)}.topbar-brand .shield svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2}.topbar-user{color:#475467;font-weight:700;font-size:13px;display:flex;align-items:center;gap:12px}.topbar-user a{color:var(--blue);font-weight:800}
.page-head,.title-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin:0 0 28px}.page-head h1,.title-row h1,h1{font-size:30px;line-height:1.18;margin:0 0 10px;font-weight:800;letter-spacing:-.04em}.page-head p,.title-row p,.section-subtitle{margin:0;color:var(--muted);font-size:16px;line-height:1.55}.section-subtitle{margin:-8px 0 24px}.panel-spaced h2{margin-bottom:10px!important}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-bottom:24px}.dashboard-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.card{padding:26px 24px;min-height:132px;display:flex;flex-direction:column;justify-content:center}.card .card-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#eef4ff;color:var(--blue);font-size:20px;margin-bottom:14px}.card strong{display:block;font-size:34px;line-height:1;font-weight:800;letter-spacing:-.04em}.card span{color:#667085;font-weight:700;font-size:15px;margin-top:8px}.panel{padding:28px;margin-bottom:24px}.panel h2{margin:0 0 22px;font-size:24px;letter-spacing:-.035em}.panel h3{margin:22px 0 12px;font-size:18px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}th,td{text-align:left;padding:16px 18px;border-bottom:1px solid #eef2f6;vertical-align:middle}tr:last-child td{border-bottom:0}th{color:#475467;font-size:12px;text-transform:uppercase;font-weight:800;letter-spacing:.02em;background:#fff}tbody tr:nth-child(odd){background:#fbfcfe}tbody tr:hover{background:#f8fbff}.license-key{display:inline-block;background:#f1f5f9;border-radius:8px;padding:7px 9px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:800;color:#344054}.badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#eef2f6;color:#344054;font-weight:900;font-size:12px;line-height:1}.badge.active{background:var(--green-bg);color:var(--green)}.badge.blocked,.badge.expired{background:var(--red-bg);color:var(--red)}.badge.inactive{background:#eef2f6;color:#344054}.pill{display:inline-flex;padding:8px 13px;border-radius:999px;background:#dbeafe;color:#175cff;font-weight:900;font-size:12px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--blue);color:var(--blue);background:#fff;border-radius:12px;padding:11px 16px;font-weight:800;text-decoration:none;cursor:pointer;font:inherit;transition:.18s ease;white-space:nowrap}.btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(37,99,255,.12)}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 10px 22px rgba(37,99,255,.18)}.btn.primary:hover{background:var(--blue2)}.btn.mini{padding:8px 11px;font-size:12px;border-radius:9px}.btn.danger{border-color:#f04438;color:#b42318;background:#fff}.notice{padding:14px 18px;border-radius:14px;margin-bottom:18px;font-weight:800;border:1px solid transparent}.notice.success{background:#ecfdf3;color:#067647;border-color:#abefc6}.notice.danger{background:#fef3f2;color:#b42318;border-color:#fecdca}.filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto auto;gap:12px;align-items:center}.filters input,.filters select,.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid #d6deea;border-radius:12px;padding:13px 15px;font:inherit;background:#fff;color:#101828;outline:none;transition:.15s ease}.filters input:focus,.filters select:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,255,.10)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}.form-grid label{font-weight:800;color:#101828;font-size:13px}.form-grid .full{grid-column:1/-1}.form-grid textarea{min-height:120px}.form-actions{grid-column:1/-1;display:flex;gap:10px;align-items:center;margin-top:4px}.form-grid button,.login-card button{background:var(--blue);color:#fff;border:0;border-radius:12px;padding:14px 18px;font-weight:900;cursor:pointer}.field-help{display:block;margin-top:8px;color:#667085;font-weight:500;font-size:12px}.updates-form input[type=file]{padding:12px;background:#f8fafc;border-style:dashed}.actions{display:flex;gap:8px;flex-wrap:wrap;min-width:300px}.inline{display:inline-flex;gap:6px;align-items:center;margin:0}.inline select{border:1px solid #d0d5dd;border-radius:9px;padding:8px;max-width:104px;background:#fff}code{display:block;background:#0b1220;color:#e6edf7;border-radius:14px;padding:18px;overflow:auto;line-height:1.65;border:1px solid rgba(255,255,255,.08)}.api-code{background:#f6f8fb;color:#101828;border:1px solid var(--line)}.muted{color:var(--muted)}
.login-body{background:#f5f7fb}.login-shell{min-height:100vh;display:grid;grid-template-columns:1.08fr 1fr}.login-left{background:radial-gradient(circle at 18% 0%,rgba(37,99,255,.18),transparent 34%),linear-gradient(135deg,#081326,#0d2442);color:#fff;padding:64px;display:flex;align-items:center;justify-content:center}.login-left-inner{width:min(650px,100%)}.login-logo{display:block;width:210px;max-width:60%;margin:0 auto 42px}.login-left h1{font-size:30px;line-height:1.12;margin-bottom:14px;color:#fff}.login-left p{font-size:16px;color:#d0d5dd;line-height:1.65;margin-bottom:26px}.login-left p strong,.login-dev b{color:#60a5fa}.login-feature{display:flex;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid rgba(255,255,255,.10)}.login-feature span{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#2563ff;font-size:22px;box-shadow:0 10px 22px rgba(37,99,255,.25)}.login-feature strong,.login-dev strong{display:block;font-size:15px;color:#fff}.login-feature small,.login-dev small{display:block;margin-top:5px;color:#cbd5e1}.login-dev{display:flex;gap:16px;align-items:center;margin-top:20px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);border-radius:16px;padding:18px}.login-dev span{font-size:26px}.login-right{display:flex;align-items:center;justify-content:center;padding:40px}.login-card{background:#fff;border:1px solid #e6eaf0;border-radius:24px;box-shadow:0 24px 70px rgba(16,24,40,.12);padding:34px;width:min(440px,92%)}.login-lock{width:52px;height:52px;border-radius:50%;background:#eef4ff;display:grid;place-items:center;margin:0 auto 20px;font-size:24px}.login-intro{text-align:center;color:#667085;margin:0 0 22px}.login-card input[type=email],.login-card input[type=password]{width:100%;border:1px solid #d0d5dd;border-radius:12px;padding:14px 16px;margin:8px 0 20px;font:inherit}.login-card label{font-weight:800;font-size:13px}.remember{display:flex!important;align-items:center;gap:9px;color:#475467;margin:0 0 18px}.remember input{width:16px!important;height:16px;margin:0!important}.login-card button{width:100%;margin-top:0;background:linear-gradient(135deg,#2563ff,#1d4ed8);box-shadow:0 12px 24px rgba(37,99,255,.18)}.login-foot{text-align:center;margin-top:24px;padding-top:18px;border-top:1px solid #eef2f6;color:#667085;font-size:12px;line-height:1.7}.login-foot b{color:#2563ff}
@media(max-width:1500px){.dashboard-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:1100px){.filters{grid-template-columns:1fr}.title-row,.page-head{display:block}.actions{min-width:0}.grid,.dashboard-grid{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}}@media(max-width:900px){.sidebar{position:static;width:auto}.sidebar-version{position:static;margin-top:18px}.main{margin-left:0;padding:24px}.topbar{position:static;height:auto;margin-left:0;padding:18px}.grid,.dashboard-grid,.login-shell{grid-template-columns:1fr}.login-left{display:none}.login-right{min-height:100vh}}


/* v1.2.2 - Correções de espaçamento e menu ativo */
.page-head, .title-row {
  margin-bottom: 30px;
}
.page-head h1, .title-row h1 {
  margin-bottom: 10px;
}
.page-head p, .title-row p, .section-subtitle {
  margin-top: 0;
  margin-bottom: 24px;
}
.panel > h2 {
  margin-bottom: 28px !important;
}
.form-grid {
  gap: 24px 24px !important;
}
.form-grid label {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  line-height: 1.35 !important;
}
.form-grid input, .form-grid select, .form-grid textarea {
  margin-top: 0 !important;
}
.form-actions {
  margin-top: 12px !important;
}
.filters {
  margin-top: 2px;
}

/* v1.4.2 - Cadastro inteligente de clientes */
.client-lookup-status{
  min-height:22px;
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  margin-top:8px;
  padding:0;
  color:#667085;
  font-size:12px;
  font-weight:800;
}
.client-lookup-status.found{
  background:#ecfdf3;
  color:#067647;
  border:1px solid #abefc6;
  border-radius:999px;
  padding:7px 11px;
}
.client-lookup-status.new{
  color:#475467;
}
.client-lookup-status.error{
  color:#b42318;
}

/* v1.5.1 - Financeiro / Pagamento Simulado */
.finance-tabs{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:24px}
.badge.pending{background:#fef0c7;color:#b54708}.badge.paid,.badge.approved{background:#dcfae6;color:#067647}.badge.cancelled{background:#fee4e2;color:#b42318}.badge.active{background:#dcfae6;color:#067647}
#finance-order-form .client-lookup-status{margin-top:8px}
