/* TechOS — Global Styles */
:root {
  --cor-primaria: #f97316;
  --cor-primaria-dark: #ea6c0a;
  --sidebar-width: 250px;
  --topbar-height: 60px;
  --font: 'Inter', sans-serif;
}

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

html, body {
  font-family: var(--font);
  font-size: 15px;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
  margin: 0;
}

/* ════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo */
.sidebar .sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  border-bottom: 1px solid #334155;
}
.sidebar .sidebar-logo img {
  height: 42px;
  max-width: 170px;
  object-fit: contain;
}

/* Nome da loja */
.sidebar .sidebar-store {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  margin: 10px 12px 2px;
  background: #273548;
  border-radius: 8px;
}
.sidebar .sidebar-store-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}
.sidebar .sidebar-store-name {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Seções */
.sidebar .sidebar-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #475569;
  padding: 16px 16px 4px;
  margin: 0;
}

/* Nav container */
.sidebar nav {
  flex: 1;
  padding: 4px 10px 12px;
}

/* Links — .sidebar a tem especificidade maior que Bootstrap a */
.sidebar a.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 1px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar a.sidebar-link:hover {
  background: #273548;
  color: #e2e8f0;
  text-decoration: none;
}
.sidebar a.sidebar-link.active {
  background: rgba(249, 115, 22, .15);
  color: #fb923c;
  font-weight: 600;
}
.sidebar a.sidebar-link.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: #f97316;
  border-radius: 3px 0 0 3px;
}

/* Ícones dentro dos links */
.sidebar a.sidebar-link .lk-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar a.sidebar-link .lk-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Footer do usuário */
.sidebar .sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #334155;
  margin-top: auto;
}
.sidebar .sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f97316, #b45309);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar .sidebar-user-info {
  flex: 1;
  min-width: 0;
}
.sidebar .sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .sidebar-user-role {
  font-size: 11px;
  color: #475569;
  text-transform: capitalize;
}
.sidebar a.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #475569;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.sidebar a.sidebar-logout:hover {
  background: #450a0a;
  color: #fca5a5;
  text-decoration: none;
}
.sidebar a.sidebar-logout svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* ════════════════════════════════════════════
   MAIN CONTENT + TOPBAR
   ════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.page-content {
  padding: 24px;
  flex: 1;
}

/* ════════════════════════════════════════════
   KPI CARDS
   ════════════════════════════════════════════ */
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-card .kpi-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 800; color: #0f172a; line-height: 1; }
.kpi-card .kpi-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(249,115,22,.1); color: #f97316;
  display: flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════
   STATUS BADGES
   ════════════════════════════════════════════ */
.badge-status-aguardando      { background: #6b7280; color: #fff; }
.badge-status-em_andamento    { background: #3b82f6; color: #fff; }
.badge-status-aguardando_peca { background: #f59e0b; color: #fff; }
.badge-status-pronto          { background: #10b981; color: #fff; }
.badge-status-entregue        { background: #06b6d4; color: #fff; }
.badge-status-cancelado       { background: #ef4444; color: #fff; }

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn-primary {
  background-color: var(--cor-primaria) !important;
  border-color: var(--cor-primaria) !important;
  color: #fff !important;
}
.btn-primary:hover {
  background-color: var(--cor-primaria-dark) !important;
  border-color: var(--cor-primaria-dark) !important;
}
.btn-outline-primary {
  color: var(--cor-primaria) !important;
  border-color: var(--cor-primaria) !important;
}
.btn-outline-primary:hover {
  background-color: var(--cor-primaria) !important;
  color: #fff !important;
}
.text-primary   { color: var(--cor-primaria) !important; }
.bg-primary     { background-color: var(--cor-primaria) !important; }
.border-primary { border-color: var(--cor-primaria) !important; }

/* ════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════ */
.form-label { font-weight: 500; font-size: 14px; }
.form-control:focus, .form-select:focus {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 .2rem rgba(249,115,22,.2);
}

/* ════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════ */
.table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
}

/* ════════════════════════════════════════════
   FLASH
   ════════════════════════════════════════════ */
.flash-container { padding: 0 24px; }

/* ════════════════════════════════════════════
   WHATSAPP FLOAT
   ════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 54px; height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  z-index: 9999;
  transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ════════════════════════════════════════════
   SITE PÚBLICO (navbar, hero, pricing)
   ════════════════════════════════════════════ */
.site-navbar {
  background: #0f172a;
  padding: 8px 0;
  position: sticky;
  top: 0; z-index: 1030;
}
.site-navbar .navbar-brand img { height: 56px; }
.site-navbar .nav-link { color: #cbd5e1 !important; font-size: 14px; }
.site-navbar .nav-link:hover { color: #f97316 !important; }

.hero-section {
  background: #0f172a;
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(249,115,22,.15), transparent 60%);
}

.plano-card {
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  padding: 28px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.plano-card.destaque {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 4px rgba(249,115,22,.1);
}
.plano-card .preco-big {
  font-size: 2.4rem;
  font-weight: 800;
  color: #f97316;
  line-height: 1;
}
.plano-card .preco-riscado {
  text-decoration: line-through;
  color: #ef4444;
  font-size: .85rem;
}
.plano-card .feat-list {
  flex: 1;
}

/* ════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════ */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: #374151;
  padding: 4px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1039;
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
}

/* ════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .sidebar-overlay, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff; }
}
