/* ============================================================
   MECÂNICA CONNECT — ESTILOS GLOBAIS
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f97316;
  --bg: #f4f6f9;
  --dark: #0f172a;
  --sidebar-hover: #1e293b;
  --text: #1e293b;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.10);
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease;
}

body {
  background: #fff;
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* =================== FOCO ACESSÍVEL =================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =================== BOTÕES =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { color: var(--primary); }

.btn-white {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* =================== NAVBAR (landing) =================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 22px;
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
}

.logo-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* =================== HERO =================== */
.hero {
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: 46px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.highlight {
  background: linear-gradient(120deg, var(--primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 17px;
  color: var(--text-soft);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}

.hero-stats span {
  font-size: 13px;
  color: var(--text-soft);
}

/* Mockup */
.hero-visual { display: flex; justify-content: center; }

.mockup {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}

.mockup:hover { transform: rotate(0deg) translateY(-6px); }

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mock-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.mock-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.mock-icon.blue { background: #2563eb; }
.mock-icon.green { background: #16a34a; }
.mock-icon.orange { background: #f97316; }

.mock-card strong { font-size: 12px; display: block; color: var(--dark); }
.mock-card small { font-size: 11px; color: var(--text-soft); }

.mock-chart {
  grid-column: span 2;
  background: #f8fafc;
  border-radius: 10px;
  padding: 16px;
  height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.mock-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, #2563eb 0%, #60a5fa 100%);
  border-radius: 6px 6px 0 0;
  animation: grow 1.2s ease-out;
}

@keyframes grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

/* =================== SEÇÕES (landing) =================== */
.section { padding: 90px 24px; }
.section-alt { background: #f8fafc; }
.section-container { max-width: 1200px; margin: 0 auto; }

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 34px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header p { color: var(--text-soft); font-size: 16px; }

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  margin-bottom: 18px;
}
.feature-icon.blue   { background: #2563eb; }
.feature-icon.green  { background: #16a34a; }
.feature-icon.orange { background: #f97316; }
.feature-icon.purple { background: #8b5cf6; }
.feature-icon.cyan   { background: #06b6d4; }
.feature-icon.pink   { background: #ec4899; }

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.feature-card p { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

/* STEPS */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 18px;
}

.step h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.step p { font-size: 14px; color: var(--text-soft); }

/* CTA */
.cta {
  padding: 90px 24px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  text-align: center;
}

.cta-container { max-width: 640px; margin: 0 auto; }

.cta h2 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.cta p { font-size: 16px; opacity: 0.9; margin-bottom: 32px; }

/* FOOTER */
.footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 60px 24px 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 14px;
  max-width: 260px;
}

.footer-brand .logo-title { color: #fff; }
.footer-brand .logo-sub   { color: #94a3b8; }

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* =================== AUTENTICAÇÃO (cadastro, login, config) =================== */
.auth-page {
  background: #f4f6f9;
  min-height: 100vh;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-side {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-logo { margin-bottom: 40px; }

.auth-side-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
}

.auth-side-content h2 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.auth-side-content p {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 32px;
}

.auth-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-features li {
  font-size: 14px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-side-footer {
  font-size: 12px;
  color: #94a3b8;
  position: relative;
  z-index: 2;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

.blob-1 {
  width: 320px; height: 320px;
  background: #2563eb;
  top: -80px; right: -60px;
}

.blob-2 {
  width: 260px; height: 260px;
  background: #8b5cf6;
  bottom: -60px; left: -60px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 440px;
}

.auth-header { margin-bottom: 28px; }

.auth-back {
  display: inline-block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 16px;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--primary); }

.auth-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-header p { font-size: 14px; color: var(--text-soft); }

.link-primary { color: var(--primary); font-weight: 500; }
.link-primary:hover { text-decoration: underline; }

/* =================== CAMPOS =================== */
.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field input:hover:not(:focus),
.field select:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-color: #cbd5e1;
}

.field input::placeholder,
.field textarea::placeholder { color: #94a3b8; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.field select:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.field textarea {
  resize: vertical;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  min-height: 14px;
}

.field input.error-input,
.field select.error-input,
.field textarea.error-input {
  border-color: #dc2626;
  background: #fef2f2;
}

.field input.error-input:focus,
.field select.error-input:focus,
.field textarea.error-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Input de senha com olho */
.input-password { position: relative; }
.input-password input { padding-right: 44px; }

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.toggle-pass:hover { opacity: 1; }

/* Checkbox */
.field-checkbox { margin-top: 4px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Divisor */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--text-soft);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 14px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Login extras */
.login-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.login-extras .checkbox { font-size: 13px; margin: 0; }

.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  font-weight: 500;
}

.btn-link:hover { text-decoration: underline; }

/* =================== CONFIG EMPRESA =================== */
.config-wrapper {
  min-height: 100vh;
  background: #f4f6f9;
  display: flex;
  flex-direction: column;
}

.config-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.config-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 500;
}

.step-item.active { color: var(--primary); }
.step-item.done   { color: #16a34a; }

.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

.step-item.active .step-dot { background: var(--primary); color: #fff; }
.step-item.done   .step-dot { background: #16a34a;         color: #fff; }

.step-line {
  width: 30px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

.config-main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.config-intro {
  text-align: center;
  margin-bottom: 36px;
}

.config-intro h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.config-intro p { font-size: 14px; color: var(--text-soft); }

.config-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.config-section {
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.config-section-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.config-section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.config-section-header p { font-size: 13px; color: var(--text-soft); }

.logo-upload {
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo-preview {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 2px dashed var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-placeholder { font-size: 32px; opacity: 0.4; }

.logo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.config-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* =================== APP LOGADO =================== */
.app-page {
  background: var(--bg);
  min-height: 100vh;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #0f172a 0%, #1a2332 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.03) inset;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.sidebar .logo-icon {
  font-size: 22px;
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.sidebar .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar .logo-title { font-weight: 600; font-size: 15px; color: #fff; }
.sidebar .logo-sub   { font-size: 12px; color: #94a3b8; }

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.menu-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.menu-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #fff;
  border-radius: 0 3px 3px 0;
  transition: height 0.25s ease;
}

.menu-item.active::before { height: 60%; }

.menu-item:hover .menu-icon {
  transform: scale(1.15);
  transition: transform 0.2s ease;
}

.menu-icon { font-size: 16px; }

.sidebar-footer {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
}

/* CONTEÚDO */
.content {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
  min-width: 0;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
}

.topbar-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 2px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-img { background: #f1f5f9; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.user-info strong {
  font-size: 13px;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-info span {
  font-size: 11px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-icon:hover { background: #f1f5f9; }

/* Botão de tema */
.btn-tema {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
  display: grid;
  place-items: center;
  color: var(--text);
}

.btn-tema:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04),
              0 4px 16px rgba(15, 23, 42, 0.04);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08),
              0 12px 32px rgba(15, 23, 42, 0.08);
}

.card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-link:hover {
  border-color: var(--primary);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.card-icon.blue   { background: #2563eb; }
.card-icon.green  { background: #16a34a; }
.card-icon.orange { background: #f97316; }
.card-icon.purple { background: #8b5cf6; }

.card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-label { font-size: 12px; color: var(--text-soft); }

.card-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-top: 2px;
}

/* PAINÉIS */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04),
              0 4px 16px rgba(15, 23, 42, 0.04);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
}

.link { font-size: 13px; color: var(--primary); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* LISTA */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.list li:last-child { border-bottom: none; }

.list li.empty {
  padding: 30px 0;
  justify-content: center;
}

.empty-state {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state span {
  font-size: 40px;
  opacity: 0.5;
  animation: floaty 3s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.empty-state p { font-size: 14px; color: var(--text-soft); }

.list .item-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.list .item-left strong {
  font-weight: 500;
  color: var(--dark);
}

.list .item-left small {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 2px;
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.badge.confirmado { background: #dcfce7; color: #166534; }
.badge.pendente   { background: #fef3c7; color: #92400e; }
.badge.andamento  { background: #dbeafe; color: #1e40af; animation: pulseSoft 2.5s ease-in-out infinite; }

@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.75; }
}

/* AÇÕES RÁPIDAS */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-actions-4 { grid-template-columns: repeat(4, 1fr); }

.quick-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.quick-btn span { font-size: 22px; }

.quick-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* BANNER BOAS-VINDAS */
.welcome-banner {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.welcome-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-content p {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 20px;
  max-width: 640px;
}

.welcome-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.welcome-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

/* DASHBOARD — alertas e resumo */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(90deg, #fef2f2 0%, #fff 100%);
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.alert-icon { font-size: 26px; flex-shrink: 0; }

.alert-text { flex: 1; min-width: 200px; }

.alert-text strong {
  display: block;
  font-size: 14px;
  color: #991b1b;
  margin-bottom: 2px;
}

.alert-text p {
  font-size: 13px;
  color: #7f1d1d;
  margin: 0;
}

.os-resumo-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.os-resumo-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
}

.os-resumo-item:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.os-resumo-label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

.os-resumo-item strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
}

/* =================== TOOLBAR / TABELA =================== */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-box span { font-size: 14px; opacity: 0.5; }

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 0;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}

.filter-select {
  padding: 11px 38px 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background-color: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  min-width: 170px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.count-badge {
  font-size: 12px;
  color: var(--text-soft);
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* ESTADOS */
.state-loading,
.state-empty {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-loading {
  animation: fadeIn 0.3s ease;
}

.state-loading p { color: var(--text-soft); font-size: 14px; }

.state-empty span { font-size: 48px; opacity: 0.5; }

.state-empty h3 {
  font-size: 16px;
  color: var(--dark);
  font-weight: 600;
}

.state-empty p {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1) inset;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* TABELA */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.15s ease, transform 0.15s ease;
}

.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

.cell-cliente {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cell-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.cell-cliente strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.cell-cliente small {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.text-soft { color: var(--text-soft); }

/* AÇÕES DA LINHA */
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-action {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
  position: relative;
}

.btn-action:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-action:active {
  transform: translateY(0) scale(0.96);
}

.btn-action.danger:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

.btn-action[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  animation: tooltipFade 0.15s ease;
}

.btn-action[title]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  z-index: 100;
  pointer-events: none;
  animation: tooltipFade 0.15s ease;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =================== MODAIS =================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden],
[hidden] {
  display: none !important;
}

.modal-overlay-top { z-index: 1100; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-sm { max-width: 420px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 780px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
}

.modal-sub {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-soft);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body p {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

/* Trava scroll */
body.modal-open { overflow: hidden; }

/* =================== TOAST =================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #16a34a;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
              0 2px 8px rgba(0, 0, 0, 0.1);
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast.erro { background: #dc2626; }

.toast.erro::before {
  content: '!';
  background: rgba(255, 255, 255, 0.25);
}

/* =================== PRODUTOS E SERVIÇOS =================== */
.tipo-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.tipo-option { cursor: pointer; }
.tipo-option input[type="radio"] { display: none; }

.tipo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tipo-card .tipo-icon { font-size: 26px; margin-bottom: 4px; }

.tipo-card strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.tipo-card small { font-size: 11px; color: var(--text-soft); }

.tipo-option:hover .tipo-card {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.tipo-option input:checked + .tipo-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  transform: scale(1.02);
}

.tipo-option input:checked + .tipo-card strong { color: var(--primary-dark); }

.tipo-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tipo-tag.produto { background: #dbeafe; color: #1e40af; }
.tipo-tag.servico { background: #ede9fe; color: #6d28d9; }

.estoque-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.estoque-badge.ok { background: #dcfce7; color: #166534; }

.estoque-badge.baixo {
  background: #fee2e2;
  color: #991b1b;
  animation: pulseLowStock 2s ease-in-out infinite;
}

@keyframes pulseLowStock {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

input[list] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* =================== AGENDA =================== */
.veiculo-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 16px;
}

.veiculo-info-icon { font-size: 26px; }

.veiculo-info-dados {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.veiculo-info-dados strong {
  font-size: 14px;
  color: #1e40af;
  font-weight: 600;
}

.veiculo-info-dados span {
  font-size: 12px;
  color: #3b82f6;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dia-grupo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dia-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.dia-titulo {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dia-titulo strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.dia-titulo small { font-size: 12px; color: var(--text-soft); }

.dia-grupo.hoje .dia-titulo strong { color: var(--primary); }

.dia-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.dia-badge.atrasado { background: #fee2e2; color: #991b1b; }

.dia-itens {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.agenda-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(2px);
}

.agenda-item.agendado  { border-left-color: #3b82f6; }
.agenda-item.andamento { border-left-color: #f97316; }
.agenda-item.concluido { border-left-color: #16a34a; opacity: 0.85; }
.agenda-item.cancelado { border-left-color: #94a3b8; opacity: 0.6; }

.agenda-item.atrasado { background: #fef2f2; }

.agenda-hora {
  text-align: center;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}

.agenda-hora strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
}

.agenda-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.agenda-info strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.agenda-info small { font-size: 12px; color: var(--text-soft); }

.agenda-info .agenda-servico {
  color: #475569;
  font-weight: 500;
  margin-top: 2px;
}

.agenda-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-badge.agendado  { background: #dbeafe; color: #1e40af; }
.status-badge.andamento { background: #ffedd5; color: #9a3412; animation: pulseSoft 2.5s ease-in-out infinite; }
.status-badge.concluido { background: #dcfce7; color: #166534; }
.status-badge.cancelado { background: #f1f5f9; color: #475569; }

.status-wrapper .btn-action {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.status-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  z-index: 50;
}

.status-wrapper.aberto .status-menu { display: flex; }

.status-menu button {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.status-menu button:hover { background: #f1f5f9; }

/* =================== ORDENS DE SERVIÇO =================== */
.os-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.os-section:first-of-type { padding-top: 0; }
.os-section:last-of-type { border-bottom: none; padding-bottom: 0; }

.os-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.os-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.os-section-header .os-section-title { margin-bottom: 0; }

.status-os {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-os.aberta     { background: #dbeafe; color: #1e40af; }
.status-os.andamento  { background: #ffedd5; color: #9a3412; animation: pulseSoft 2.5s ease-in-out infinite; }
.status-os.aguardando { background: #fef3c7; color: #92400e; }
.status-os.finalizada { background: #dcfce7; color: #166534; }
.status-os.entregue   { background: #d1fae5; color: #065f46; }
.status-os.cancelada  { background: #f1f5f9; color: #475569; }

/* ITENS DA OS */
.itens-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.itens-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 30px 20px;
  background: #f8fafc;
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}

.itens-vazio span { font-size: 30px; opacity: 0.5; }
.itens-vazio p    { font-size: 14px; font-weight: 500; color: var(--text); }
.itens-vazio small{ font-size: 12px; color: var(--text-soft); }

.item-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow 0.2s;
}

.item-linha:hover { box-shadow: var(--shadow-sm); }

.item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.item-nome {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.item-tipo-icon { font-size: 14px; }

.item-nome strong {
  font-size: 14px;
  color: var(--dark);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-nome small {
  font-size: 11px;
  color: var(--text-soft);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.item-valores {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.qtd-controle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.btn-qtd {
  background: #f8fafc;
  border: none;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  transition: background 0.15s;
}

.btn-qtd:hover { background: #e2e8f0; }

.input-qtd {
  width: 40px;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  font-family: inherit;
  padding: 4px 0;
  background: #fff;
  outline: none;
}

.input-qtd::-webkit-outer-spin-button,
.input-qtd::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-subtotal {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.item-subtotal strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* RESUMO FINANCEIRO DA OS */
.os-resumo {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resumo-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-soft);
}

.resumo-linha strong {
  color: var(--dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.desconto-linha {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.desconto-input {
  display: flex;
  gap: 6px;
  align-items: center;
}

.desconto-input input {
  width: 90px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  text-align: right;
  background: #fff;
  color: var(--text);
  outline: none;
}

.desconto-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.desconto-input input::-webkit-outer-spin-button,
.desconto-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.desconto-input select {
  padding: 6px 24px 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background-color: #fff;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.resumo-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  color: var(--dark);
  padding-top: 4px;
}

.resumo-total strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* MINI-MODAL ADD ITEM */
.add-itens-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.add-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.add-item-row:hover {
  border-color: var(--primary);
  background: #f8faff;
  transform: translateX(2px);
}

.add-item-row.sem-estoque {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc;
}

.add-item-row.sem-estoque:hover {
  transform: none;
  border-color: var(--border);
  background: #f8fafc;
}

.add-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.add-item-icon.produto { background: #f1f5f9; }
.add-item-icon.servico { background: #ede9fe; }

.add-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.add-item-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-item-info small { font-size: 11px; color: var(--text-soft); }

.add-item-preco {
  text-align: right;
  flex-shrink: 0;
}

.add-item-preco strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.add-item-preco small {
  display: block;
  font-size: 10px;
  color: #dc2626;
  font-weight: 500;
  margin-top: 2px;
}

/* =================== PDF =================== */
.pdf-area { display: none; }

@media print {
  body > *:not(.pdf-area) { display: none !important; }

  .pdf-area {
    display: block !important;
    position: static !important;
    width: 100%;
    background: #fff;
    color: #000;
    padding: 0;
    margin: 0;
    font-family: 'Poppins', sans-serif;
  }

  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .pdf-doc {
    max-width: 100%;
    margin: 0;
    padding: 0;
    page-break-inside: avoid;
  }

  .pdf-header,
  .pdf-section,
  .pdf-assinatura,
  .pdf-footer { page-break-inside: avoid; }

  .pdf-tabela { page-break-inside: auto; }
  .pdf-tabela tr { page-break-inside: avoid; }

  @page {
    margin: 12mm;
    size: A4;
  }
}

.pdf-doc {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Poppins', sans-serif;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.5;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #2563eb;
  margin-bottom: 18px;
}

.pdf-header-left {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex: 1;
}

.pdf-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.pdf-logo-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.pdf-empresa h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.pdf-empresa p { font-size: 11px; color: #475569; margin: 1px 0; }

.pdf-header-right {
  text-align: right;
  flex-shrink: 0;
}

.pdf-doc-titulo {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #64748b;
  font-weight: 600;
}

.pdf-doc-numero {
  font-size: 26px;
  font-weight: 800;
  color: #2563eb;
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
}

.pdf-doc-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.pdf-doc-status.status-aberta     { background: #dbeafe; color: #1e40af; }
.pdf-doc-status.status-andamento  { background: #ffedd5; color: #9a3412; }
.pdf-doc-status.status-aguardando { background: #fef3c7; color: #92400e; }
.pdf-doc-status.status-finalizada { background: #dcfce7; color: #166534; }
.pdf-doc-status.status-entregue   { background: #d1fae5; color: #065f46; }
.pdf-doc-status.status-cancelada  { background: #f1f5f9; color: #475569; }

.pdf-doc-data {
  font-size: 10px;
  color: #475569;
  line-height: 1.6;
}

.pdf-doc-data strong { color: #0f172a; }

.pdf-section { margin-bottom: 16px; }

.pdf-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pdf-box {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.pdf-box h3 {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pdf-box p { font-size: 11px; color: #334155; margin: 2px 0; }

.pdf-descricao {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  border-radius: 4px;
}

.pdf-descricao strong {
  font-size: 11px;
  color: #0f172a;
  display: block;
  margin-bottom: 3px;
}

.pdf-descricao p {
  font-size: 11px;
  color: #334155;
  margin: 0;
  white-space: pre-wrap;
}

.pdf-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
}

.pdf-tabela thead th {
  background: #2563eb;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pdf-tabela thead th:first-child { border-radius: 6px 0 0 0; }
.pdf-tabela thead th:last-child  { border-radius: 0 6px 0 0; }

.pdf-tabela tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.pdf-tabela tbody td small {
  font-size: 9px;
  color: #94a3b8;
  margin-left: 4px;
}

.pdf-tabela .center { text-align: center; }
.pdf-tabela .right  { text-align: right; }

.pdf-tabela .text-soft { color: #94a3b8; font-style: italic; }

.pdf-tabela .pdf-totais-sep td {
  border-top: 2px solid #e2e8f0;
  border-bottom: none;
  padding-top: 12px;
}

.pdf-tabela .pdf-total-final td {
  font-size: 14px;
  color: #0f172a;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.pdf-tabela .pdf-total-final td:last-child {
  color: #2563eb;
  font-size: 16px;
}

.pdf-assinatura {
  margin-top: 40px;
  text-align: center;
}

.pdf-assinatura-linha {
  width: 300px;
  max-width: 100%;
  height: 1px;
  background: #334155;
  margin: 0 auto 6px;
}

.pdf-assinatura p { font-size: 10px; color: #64748b; }

.pdf-footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.pdf-footer p { font-size: 9px; color: #94a3b8; margin: 0; }
.pdf-footer strong { color: #2563eb; }

/* =================== FINANCEIRO =================== */
.mes-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.mes-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
  display: grid;
  place-items: center;
}

.mes-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mes-atual {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  min-width: 180px;
  text-align: center;
  text-transform: capitalize;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  font-family: inherit;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content { animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-content[hidden] { display: none !important; }

.lanc-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lanc-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid #16a34a;
  border-radius: 12px;
  transition: all 0.2s;
}

.lanc-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.lanc-item.saida { border-left-color: #dc2626; }

.lanc-item.de-os {
  background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}

.lanc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #dcfce7;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.lanc-item.saida .lanc-icon { background: #fee2e2; }
.lanc-item.de-os .lanc-icon { background: #dbeafe; }

.lanc-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lanc-info strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lanc-info small { font-size: 12px; color: var(--text-soft); }

.auto-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lanc-valor {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lanc-valor.entrada { color: #16a34a; }
.lanc-valor.saida   { color: #dc2626; }

.lanc-actions { display: flex; gap: 6px; }

.resumo-categorias {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resumo-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resumo-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.resumo-item-header strong {
  color: var(--dark);
  font-weight: 600;
}

.resumo-item-header span {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.resumo-item-header .pos { color: #16a34a; }
.resumo-item-header .neg { color: #dc2626; }

.resumo-barra {
  height: 8px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.resumo-barra-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.resumo-barra-fill.entrada {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.resumo-barra-fill.saida {
  background: linear-gradient(90deg, #f87171 0%, #dc2626 100%);
}

.grafico-meses {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding: 20px 10px;
  background: #f8fafc;
  border-radius: 12px;
}

.grafico-mes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.grafico-barras {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  width: 100%;
  justify-content: center;
}

.barra {
  width: 20px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.barra.entrada { background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%); }
.barra.saida   { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%); }

.barra:hover {
  opacity: 0.8;
  transform: scaleY(1.03);
  transform-origin: bottom;
}

.grafico-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =================== SCROLLBAR =================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: content-box;
  border: 2px solid transparent;
}

/* ============================================================
   🌙 MODO ESCURO
   ============================================================ */

[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #1e3a8a;
  --accent: #fb923c;
  --bg: #0f172a;
  --dark: #f1f5f9;
  --sidebar-hover: #1e293b;
  --text: #e2e8f0;
  --text-soft: #94a3b8;
  --border: #1e293b;
  --card-bg: #1e293b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body,
[data-theme="dark"].app-page,
[data-theme="dark"].auth-page {
  background: #0f172a;
  color: var(--text);
}

[data-theme="dark"] .app { background: #0f172a; }

[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0a0f1d 0%, #131b2e 100%);
  border-right: 1px solid #1e293b;
}

[data-theme="dark"] .card,
[data-theme="dark"] .panel {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
              0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .panel:hover {
  border-color: #475569;
}

[data-theme="dark"] .card-value { color: #f1f5f9; }
[data-theme="dark"] .topbar h1 { color: #f1f5f9; }

[data-theme="dark"] .topbar-user {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .user-info strong { color: #f1f5f9; }
[data-theme="dark"] .btn-icon:hover { background: #334155; }

[data-theme="dark"] .btn-tema:hover { background: rgba(255, 255, 255, 0.1); }

[data-theme="dark"] .toolbar .search-box {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .search-box input { color: #e2e8f0; }
[data-theme="dark"] .search-box input::placeholder { color: #64748b; }

[data-theme="dark"] .filter-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .field input::placeholder,
[data-theme="dark"] .field textarea::placeholder { color: #64748b; }

[data-theme="dark"] .field input:hover:not(:focus),
[data-theme="dark"] .field select:hover:not(:focus),
[data-theme="dark"] .field textarea:hover:not(:focus) { border-color: #475569; }

[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .table thead th {
  color: #94a3b8;
  border-bottom-color: #334155;
}

[data-theme="dark"] .table tbody td {
  color: #e2e8f0;
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .table tbody tr:hover { background: #334155; }
[data-theme="dark"] .cell-cliente strong { color: #f1f5f9; }

[data-theme="dark"] .cell-avatar {
  background: #334155;
  color: #93c5fd;
}

[data-theme="dark"] .modal {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .modal-header {
  background: linear-gradient(180deg, #1e293b 0%, #1a2332 100%);
  border-bottom-color: #334155;
}

[data-theme="dark"] .modal-header h2 { color: #f1f5f9; }
[data-theme="dark"] .modal-close { color: #94a3b8; }

[data-theme="dark"] .modal-close:hover {
  background: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .modal-footer {
  background: #1a2332;
  border-top-color: #334155;
}

[data-theme="dark"] .modal-body p { color: #e2e8f0; }

[data-theme="dark"] .btn-outline {
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-outline:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

[data-theme="dark"] .btn-ghost { color: #94a3b8; }

[data-theme="dark"] .btn-ghost:hover {
  color: #3b82f6;
  background: #334155;
}

[data-theme="dark"] .btn-action {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-action:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .btn-action.danger:hover {
  background: #7f1d1d;
  border-color: #dc2626;
}

[data-theme="dark"] .quick-btn {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .quick-btn:hover {
  background: var(--primary);
  color: #fff;
}

[data-theme="dark"] .state-empty h3 { color: #f1f5f9; }
[data-theme="dark"] .empty-state p { color: #94a3b8; }
[data-theme="dark"] .list li { border-bottom-color: #334155; }
[data-theme="dark"] .list .item-left strong { color: #f1f5f9; }

[data-theme="dark"] .agenda-item,
[data-theme="dark"] .lanc-item,
[data-theme="dark"] .item-linha {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .agenda-item.atrasado { background: #3f1d1d; }
[data-theme="dark"] .agenda-hora { border-right-color: #334155; }
[data-theme="dark"] .agenda-info strong { color: #f1f5f9; }
[data-theme="dark"] .dia-titulo strong { color: #f1f5f9; }
[data-theme="dark"] .dia-grupo.hoje .dia-titulo strong { color: #3b82f6; }

[data-theme="dark"] .status-menu {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .status-menu button { color: #e2e8f0; }
[data-theme="dark"] .status-menu button:hover { background: #334155; }

[data-theme="dark"] .mes-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .mes-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

[data-theme="dark"] .tab { color: #94a3b8; }
[data-theme="dark"] .tab.active { color: #3b82f6; }
[data-theme="dark"] .tabs { border-bottom-color: #334155; }
[data-theme="dark"] .resumo-item-header strong { color: #f1f5f9; }
[data-theme="dark"] .resumo-barra { background: #334155; }
[data-theme="dark"] .grafico-meses { background: #1a2332; }
[data-theme="dark"] .lanc-info strong { color: #f1f5f9; }

[data-theme="dark"] .alert-banner {
  background: linear-gradient(90deg, #3f1d1d 0%, #1e293b 100%);
  border-color: #7f1d1d;
}

[data-theme="dark"] .alert-text strong { color: #fca5a5; }
[data-theme="dark"] .alert-text p { color: #fecaca; }

[data-theme="dark"] .os-resumo-item {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .os-resumo-item strong { color: #f1f5f9; }

[data-theme="dark"] .os-resumo {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .resumo-linha strong { color: #f1f5f9; }

[data-theme="dark"] .desconto-input input,
[data-theme="dark"] .desconto-input select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .itens-vazio,
[data-theme="dark"] .add-item-row {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .add-item-row:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .add-item-info strong { color: #f1f5f9; }
[data-theme="dark"] .item-nome strong { color: #f1f5f9; }

[data-theme="dark"] .item-nome small {
  background: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .item-subtotal strong { color: #f1f5f9; }

[data-theme="dark"] .qtd-controle {
  background: #1a2332;
  border-color: #475569;
}

[data-theme="dark"] .btn-qtd {
  background: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-qtd:hover { background: #475569; }

[data-theme="dark"] .input-qtd {
  background: #1a2332;
  color: #f1f5f9;
}

[data-theme="dark"] .tipo-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .tipo-card strong { color: #f1f5f9; }

[data-theme="dark"] .tipo-option:hover .tipo-card {
  background: #334155;
  border-color: #475569;
}

[data-theme="dark"] .tipo-option input:checked + .tipo-card {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .auth-page { background: #0f172a; }
[data-theme="dark"] .auth-main { background: #0f172a; }
[data-theme="dark"] .auth-header h1 { color: #f1f5f9; }
[data-theme="dark"] .auth-back { color: #94a3b8; }
[data-theme="dark"] .auth-back:hover { color: #3b82f6; }

[data-theme="dark"] .config-wrapper { background: #0f172a; }

[data-theme="dark"] .config-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-theme="dark"] .config-section {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .config-section-header { border-bottom-color: #334155; }
[data-theme="dark"] .config-section-header h2 { color: #f1f5f9; }
[data-theme="dark"] .config-intro h1 { color: #f1f5f9; }

[data-theme="dark"] .logo-preview {
  background: #334155;
  border-color: #475569;
}

[data-theme="dark"] .veiculo-info {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .veiculo-info-dados strong { color: #bfdbfe; }
[data-theme="dark"] .veiculo-info-dados span { color: #93c5fd; }

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #475569;
  background-clip: content-box;
  border: 2px solid transparent;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
  background-clip: content-box;
  border: 2px solid transparent;
}

/* =================== RESPONSIVO =================== */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-text h1 { font-size: 34px; }
  .hero-text p  { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-stats   { justify-content: center; gap: 28px; }
  .footer-container { grid-template-columns: 1fr 1fr; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .nav-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }

  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-side {
    padding: 32px 24px;
    min-height: auto;
  }
  .auth-side-content h2 { font-size: 24px; }
  .auth-side-content p  { font-size: 14px; margin-bottom: 20px; }
  .auth-features li     { font-size: 13px; }
  .auth-side-footer     { display: none; }
  .auth-main { padding: 32px 20px; }

  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .app { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    overflow-x: auto;
    gap: 12px;
  }

  .sidebar .logo { margin-bottom: 0; flex-shrink: 0; }
  .sidebar .logo-text { display: none; }

  .menu {
    flex-direction: row;
    gap: 4px;
    flex: 1;
  }

  .menu-item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  .menu-item span.menu-icon { font-size: 14px; }
  .sidebar-footer { display: none; }
  .content { padding: 20px; }
  .topbar h1 { font-size: 18px; }
  .welcome-banner { padding: 22px; }
  .welcome-content h2 { font-size: 17px; }

  .table thead { display: none; }

  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 14px;
  }

  .table td {
    padding: 6px 0;
    border: none;
  }

  .table td:last-child {
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .row-actions { justify-content: flex-start; }

  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }

  .toast { left: 20px; right: 20px; bottom: 20px; text-align: center; }

  .config-header {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px;
  }
  .config-steps {
    justify-content: center;
    font-size: 12px;
  }
  .config-steps .step-item span:not(.step-dot) {
    display: none;
  }
  .step-line { width: 20px; }
  .config-main { padding: 24px 16px 40px; }
  .config-section { padding: 20px; }
  .config-intro h1 { font-size: 22px; }
  .logo-upload { flex-direction: column; align-items: flex-start; }
  .config-actions { justify-content: stretch; }
  .config-actions .btn { width: 100%; }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-select { width: 100%; }
  .toolbar .btn { width: 100%; justify-content: center; }
  .tipo-selector { grid-template-columns: 1fr; }

  .agenda-item {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
  }

  .agenda-actions {
    grid-column: span 2;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .modal-lg { max-width: 100%; }
  .os-section { padding: 14px 0; }
  .os-section-title { font-size: 12px; }

  .item-linha {
    flex-direction: column;
    align-items: stretch;
  }

  .item-subtotal {
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .desconto-input input { width: 70px; }
  .resumo-total strong { font-size: 18px; }

  .lanc-item {
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
  }

  .lanc-actions {
    grid-column: span 3;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .mes-atual {
    font-size: 15px;
    min-width: 140px;
  }

  .tabs { overflow-x: auto; }

  .tab {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .grafico-meses {
    height: 160px;
    padding: 14px 6px;
  }

  .barra { width: 14px; }

  .quick-actions-4 { grid-template-columns: 1fr 1fr; }
  .os-resumo-dash { grid-template-columns: 1fr 1fr; }

  .alert-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .alert-banner .btn { width: 100%; }
}

@media (max-width: 500px) {
  .hero { padding: 50px 20px 40px; }
  .hero-text h1 { font-size: 28px; }
  .section { padding: 60px 20px; }
  .section-header h2 { font-size: 26px; }
  .cta h2 { font-size: 26px; }
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .footer-brand .nav-logo { justify-content: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .mockup-body { grid-template-columns: 1fr; }
  .mock-chart { grid-column: span 1; }
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .auth-header h1 { font-size: 22px; }
}

/* ============================================================
   FINANCEIRO — Categoria customizável
   ============================================================ */

.categoria-select-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.categoria-select-wrapper select {
  flex: 1;
  min-width: 0;
}

.btn-nova-categoria {
  flex-shrink: 0;
  width: 42px;
  min-height: 42px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-nova-categoria:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-nova-categoria:active {
  transform: translateY(0) scale(0.96);
}

[data-theme="dark"] .btn-nova-categoria {
  background: #3b82f6;
}

[data-theme="dark"] .btn-nova-categoria:hover {
  background: #2563eb;
}
/* ============================================================
   PAINEL ADMIN DE AVISOS
   ============================================================ */

/* Tela de acesso negado */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  gap: 16px;
}

.access-denied span {
  font-size: 64px;
  opacity: 0.8;
}

.access-denied h2 {
  font-size: 24px;
  color: var(--dark);
  font-weight: 700;
}

.access-denied p {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

/* Lista de avisos */
.avisos-lista {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aviso-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid #3b82f6;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.aviso-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(2px);
}

.aviso-card.info    { border-left-color: #3b82f6; }
.aviso-card.aviso   { border-left-color: #f59e0b; }
.aviso-card.urgente { border-left-color: #dc2626; }

.aviso-card.inativo {
  opacity: 0.6;
  background: #f8fafc;
}

.aviso-card.fixado {
  background: linear-gradient(90deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

.aviso-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.aviso-card.info    .aviso-icon { background: #dbeafe; }
.aviso-card.aviso   .aviso-icon { background: #fef3c7; }
.aviso-card.urgente .aviso-icon { background: #fee2e2; }

.aviso-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aviso-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aviso-header strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.aviso-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.aviso-tag.fixado  { background: #fef3c7; color: #92400e; }
.aviso-tag.inativo { background: #f1f5f9; color: #475569; }
.aviso-tag.expirado { background: #fee2e2; color: #991b1b; }

.aviso-mensagem {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.aviso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
}

.aviso-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Seletor de tipo no modal */
.tipo-aviso-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}

.tipo-aviso-option { cursor: pointer; }

.tipo-aviso-option input[type="radio"] {
  display: none;
}

.tipo-aviso-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: all 0.2s ease;
}

.tipo-aviso-card span {
  font-size: 24px;
  margin-bottom: 2px;
}

.tipo-aviso-card strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.tipo-aviso-card small {
  font-size: 10px;
  color: var(--text-soft);
  line-height: 1.3;
}

.tipo-aviso-option:hover .tipo-aviso-card {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.tipo-aviso-option input:checked + .tipo-aviso-card.info {
  border-color: #3b82f6;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.tipo-aviso-option input:checked + .tipo-aviso-card.aviso {
  border-color: #f59e0b;
  background: #fef3c7;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.tipo-aviso-option input:checked + .tipo-aviso-card.urgente {
  border-color: #dc2626;
  background: #fee2e2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Checkboxes de opções */
.aviso-opcoes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

.aviso-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.aviso-checkbox input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Dark mode */
[data-theme="dark"] .aviso-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .aviso-card.inativo {
  background: #1a2332;
}

[data-theme="dark"] .aviso-card.fixado {
  background: linear-gradient(90deg, #2a2416 0%, #1e293b 100%);
}

[data-theme="dark"] .aviso-card.info    .aviso-icon { background: #1e3a8a; }
[data-theme="dark"] .aviso-card.aviso   .aviso-icon { background: #78350f; }
[data-theme="dark"] .aviso-card.urgente .aviso-icon { background: #7f1d1d; }

[data-theme="dark"] .aviso-header strong { color: #f1f5f9; }
[data-theme="dark"] .aviso-mensagem { color: #cbd5e1; }

[data-theme="dark"] .tipo-aviso-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .tipo-aviso-card strong { color: #f1f5f9; }

[data-theme="dark"] .aviso-opcoes {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .aviso-checkbox { color: #e2e8f0; }

/* Responsivo */
@media (max-width: 700px) {
  .aviso-card {
    grid-template-columns: 44px 1fr;
    padding: 16px;
  }

  .aviso-actions {
    grid-column: span 2;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .tipo-aviso-selector {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SINO DE AVISOS + MODAL
   ============================================================ */

/* Botão do sino no topbar */
.btn-sino {
  position: relative;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
  color: var(--text);
}

.btn-sino:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

.btn-sino.pulsando {
  animation: sinoPulse 1.2s ease;
}

@keyframes sinoPulse {
  0%, 100% { transform: scale(1) rotate(0); }
  20%      { transform: scale(1.15) rotate(-10deg); }
  40%      { transform: scale(1.15) rotate(10deg); }
  60%      { transform: scale(1.15) rotate(-6deg); }
  80%      { transform: scale(1.15) rotate(6deg); }
}

.sino-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: #dc2626;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

/* Modal de avisos — dropdown estilo notificação */
.avisos-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(2px);
  z-index: 1050;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 20px 20px;
  animation: fadeIn 0.2s ease;
}

.avisos-modal {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avisos-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.avisos-modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}

.avisos-modal-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.avisos-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-soft);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: background 0.2s;
}

.avisos-modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.avisos-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item de aviso */
.aviso-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.aviso-item:hover {
  background: #f8fafc;
}

.aviso-item.info    { border-left: 3px solid #3b82f6; }
.aviso-item.aviso   { border-left: 3px solid #f59e0b; }
.aviso-item.urgente { border-left: 3px solid #dc2626; background: #fef2f2; }

.aviso-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.aviso-item.info    .aviso-item-icon { background: #dbeafe; }
.aviso-item.aviso   .aviso-item-icon { background: #fef3c7; }
.aviso-item.urgente .aviso-item-icon { background: #fee2e2; }

.aviso-item-content {
  flex: 1;
  min-width: 0;
}

.aviso-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.aviso-item-header strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.aviso-item-pin {
  font-size: 11px;
}

.aviso-item-content p {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
  white-space: pre-wrap;
}

.aviso-item-content small {
  font-size: 10px;
  color: var(--text-soft);
}

/* Estado vazio */
.avisos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  gap: 8px;
}

.avisos-empty span {
  font-size: 40px;
  opacity: 0.5;
}

.avisos-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.avisos-empty small {
  font-size: 12px;
  color: var(--text-soft);
}

/* Dark mode */
[data-theme="dark"] .btn-sino:hover { background: #334155; }

[data-theme="dark"] .avisos-modal {
  background: #1e293b;
}

[data-theme="dark"] .avisos-modal-header {
  background: linear-gradient(180deg, #1e293b 0%, #1a2332 100%);
  border-bottom-color: #334155;
}

[data-theme="dark"] .avisos-modal-header h2 { color: #f1f5f9; }

[data-theme="dark"] .avisos-modal-close { color: #94a3b8; }
[data-theme="dark"] .avisos-modal-close:hover {
  background: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .aviso-item {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .aviso-item:hover {
  background: #334155;
}

[data-theme="dark"] .aviso-item.urgente { background: #3f1d1d; }

[data-theme="dark"] .aviso-item-header strong { color: #f1f5f9; }
[data-theme="dark"] .aviso-item-content p { color: #cbd5e1; }

[data-theme="dark"] .aviso-item.info    .aviso-item-icon { background: #1e3a8a; }
[data-theme="dark"] .aviso-item.aviso   .aviso-item-icon { background: #78350f; }
[data-theme="dark"] .aviso-item.urgente .aviso-item-icon { background: #7f1d1d; }

/* Responsivo */
@media (max-width: 700px) {
  .avisos-modal-overlay {
    padding: 70px 10px 10px;
  }

  .avisos-modal {
    max-width: 100%;
    max-height: calc(100vh - 80px);
  }
}
/* ============================================================
   🚧 TELA DE MANUTENÇÃO ANIMADA
   ============================================================ */

#telaManutencao {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0a0f1d 0%, #0f172a 50%, #1a1f3a 100%);
  background-size: 200% 200%;
  animation: gradientShiftManut 12s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  padding: 20px;
}

@keyframes gradientShiftManut {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Blobs de fundo coloridos */
.blob-manut {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.blob-manut-1 {
  width: 400px;
  height: 400px;
  background: #2563eb;
  top: -100px;
  left: -100px;
  animation: floatManut 15s ease-in-out infinite;
}

.blob-manut-2 {
  width: 350px;
  height: 350px;
  background: #7c3aed;
  bottom: -100px;
  right: -100px;
  animation: floatManut 18s ease-in-out infinite reverse;
}

.blob-manut-3 {
  width: 300px;
  height: 300px;
  background: #f97316;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: floatManut 20s ease-in-out infinite;
  opacity: 0.2;
}

@keyframes floatManut {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -40px) scale(1.1); }
  66%      { transform: translate(-30px, 30px) scale(0.95); }
}

/* Conteúdo central */
.manut-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 560px;
  animation: fadeInManut 0.8s ease;
}

@keyframes fadeInManut {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Engrenagem girando */
.manut-icon {
  font-size: 90px;
  margin-bottom: 24px;
  display: inline-block;
  animation: spinManut 4s linear infinite;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.6));
}

@keyframes spinManut {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Logo */
.manut-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
}

.manut-logo-title {
  color: #fff;
}

.manut-logo-sub {
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6, #60a5fa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerManut 3s linear infinite;
}

@keyframes shimmerManut {
  to { background-position: 200% center; }
}

/* Título */
.manut-titulo {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 32px;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Barra de progresso fake */
.manut-barra {
  width: 280px;
  max-width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  margin: 0 auto 28px;
  overflow: hidden;
  position: relative;
}

.manut-barra-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #3b82f6, #a78bfa, #f472b6, #3b82f6);
  background-size: 200% auto;
  border-radius: 100px;
  animation: 
    progressManut 2.5s ease-in-out infinite,
    shimmerManut 2s linear infinite;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

@keyframes progressManut {
  0%   { width: 10%; margin-left: 0%; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 10%; margin-left: 90%; }
}

/* Mensagem */
.manut-mensagem {
  font-size: 16px;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Status pulsante */
.manut-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  backdrop-filter: blur(10px);
}

.manut-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseStatusManut 2s ease-out infinite;
}

@keyframes pulseStatusManut {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Responsivo */
@media (max-width: 600px) {
  .manut-icon { font-size: 70px; }
  .manut-titulo { font-size: 26px; }
  .manut-logo { font-size: 17px; }
  .manut-mensagem { font-size: 14px; }
  .manut-status { font-size: 12px; padding: 8px 16px; }
}

