/* UpTechDesk Design System — Light Theme */

/* ─── Fonts (self-hosted) ─── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Variables ─── */
:root {
  --color-primary:       #2563EB;
  --color-primary-dark:  #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-secondary:     #7C3AED;
  --color-success:       #16A34A;
  --color-success-light: #F0FDF4;
  --color-warning:       #D97706;
  --color-warning-light: #FFFBEB;
  --color-danger:        #DC2626;
  --color-danger-light:  #FEF2F2;
  --color-info:          #0891B2;
  --color-info-light:    #ECFEFF;

  --bg:         #FFFFFF;
  --bg-subtle:  #F8FAFC;
  --bg-muted:   #F1F5F9;
  --border:     #E2E8F0;
  --border-dark: #CBD5E1;

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --text-disabled:  #CBD5E1;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow:    0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);

  --radius-sm: 6px;
  --radius:    8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 150ms cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: var(--text-primary); }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
p  { color: var(--text-secondary); }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Grid ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Flex Utils ─── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}
.navbar-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: -.5px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.navbar-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.navbar-links a:hover { color: var(--color-primary); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  padding: 4px;
}
.hamburger span {
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(37 99 235 / .35);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn-white:hover {
  background: #f0f4ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(0 0 0 / .12);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-primary); }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.btn-success:hover { background: #15803d; transform: translateY(-1px); }

.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius-md); }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-loading { pointer-events: none; opacity: .8; }

/* ─── Cards ─── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-hover:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .08), var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Forms ─── */
.form-group { display: flex; flex-direction: column; gap: .375rem; }

.form-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: .625rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .12);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { resize: vertical; min-height: 100px; }

.form-input.error, .form-select.error, .form-textarea.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgb(220 38 38 / .12);
}

.form-error { font-size: .8rem; color: var(--color-danger); margin-top: .25rem; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .625rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-primary { background: var(--color-primary-light); color: var(--color-primary); }
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger); }
.badge-muted { background: var(--bg-muted); color: var(--text-secondary); }
.badge-purple { background: #F3E8FF; color: #7C3AED; }
.badge-cyan { background: #ECFEFF; color: #0891B2; }

/* ─── Ticket Status Badges ─── */
.status-aberto { background: var(--color-primary-light); color: var(--color-primary); }
.status-em_andamento { background: var(--color-warning-light); color: var(--color-warning); }
.status-aguardando_cliente { background: #F3E8FF; color: #7C3AED; }
.status-resolvido { background: var(--color-success-light); color: var(--color-success); }
.status-fechado { background: var(--bg-muted); color: var(--text-muted); }
.status-cancelado { background: var(--color-danger-light); color: var(--color-danger); }

/* ─── Stats Cards ─── */
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-primary);
}
.stat-card.success::before { background: var(--color-success); }
.stat-card.warning::before { background: var(--color-warning); }
.stat-card.danger::before { background: var(--color-danger); }
.stat-card.purple::before { background: var(--color-secondary); }

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .375rem; font-weight: 500; }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ─── Table ─── */
.table-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-subtle); }
th {
  padding: .875rem 1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 1rem;
  font-size: .9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }

/* ─── Sidebar (dashboards) ─── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .625rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .875rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.sidebar-nav a:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.sidebar-nav .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .8;
}

.sidebar-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: .5rem .875rem .25rem;
  margin-top: .5rem;
}

.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem;
  border-radius: var(--radius);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-name { font-size: .875rem; font-weight: 600; }
.sidebar-user-role { font-size: .75rem; color: var(--text-muted); }

.dashboard-content {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.dashboard-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 5;
}

.dashboard-main {
  padding: 2rem;
}

/* ─── Alert / Toast ─── */
.alert {
  padding: .875rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1px solid;
}
.alert-success { background: var(--color-success-light); color: #15803d; border-color: #86efac; }
.alert-danger  { background: var(--color-danger-light); color: #b91c1c; border-color: #fca5a5; }
.alert-warning { background: var(--color-warning-light); color: #92400e; border-color: #fcd34d; }
.alert-info    { background: var(--color-info-light); color: #0e7490; border-color: #67e8f9; }

/* Toast container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 360px;
}

.toast {
  background: var(--text-primary);
  color: #fff;
  padding: .875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  box-shadow: var(--shadow-xl);
  animation: slideIn .2s ease;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-danger); }
.toast.warning { background: var(--color-warning); color: #fff; }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── Avatar ─── */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.avatar-sm  { width: 32px; height: 32px; font-size: .8rem; }
.avatar-md  { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg  { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-xl  { width: 96px; height: 96px; font-size: 2rem; }
.avatar-2xl { width: 120px; height: 120px; font-size: 2.5rem; }

/* ─── Stars ─── */
.stars {
  display: flex;
  gap: 2px;
  color: #F59E0B;
  font-size: 1rem;
}
.stars .empty { color: var(--border-dark); }

/* ─── Progress ─── */
.progress-bar-wrapper { width: 100%; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-muted); margin-bottom: .375rem; }
.progress-track { background: var(--bg-muted); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), #7C3AED);
  transition: width .6s ease;
}

/* ─── Online Badge ─── */
.online-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .875rem;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

.online-badge.online {
  background: var(--color-success-light);
  color: var(--color-success);
  box-shadow: 0 0 0 0 rgb(22 163 74 / .4);
  animation: pulse-green 2s infinite;
}

.online-badge.offline {
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: default;
}

.online-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgb(22 163 74 / .4); }
  50% { box-shadow: 0 0 0 8px rgb(22 163 74 / 0); }
}

/* ─── Tags ─── */
.tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .625rem;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.tag-primary { background: var(--color-primary-light); color: var(--color-primary); border-color: #BFDBFE; }

/* ─── Chat ─── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-subtle);
}

.chat-bubble {
  max-width: 70%;
  padding: .75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: .9rem;
  line-height: 1.5;
  position: relative;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble-time {
  font-size: .72rem;
  opacity: .65;
  margin-top: .25rem;
  text-align: right;
}

.chat-input-area {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  gap: .75rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: .625rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: .9rem;
  resize: none;
  max-height: 120px;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--color-primary); }

/* ─── Divider ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .85rem;
  margin: 1rem 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .2s ease;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn .2s ease;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, #e9eef5 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .5rem; }
.empty-state-text { font-size: .9rem; }

/* ─── Pagination ─── */
.pagination {
  display: flex;
  align-items: center;
  gap: .25rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.page-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ─── Search ─── */
.search-box {
  position: relative;
}
.search-box input {
  padding-left: 2.5rem;
}
.search-box .search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* ─── Hero Section ─── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: .375rem 1rem;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-title .gradient {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Feature Cards ─── */
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.feature-icon.blue   { background: var(--color-primary-light); }
.feature-icon.green  { background: var(--color-success-light); }
.feature-icon.purple { background: #F3E8FF; }
.feature-icon.orange { background: var(--color-warning-light); }

/* ─── Step indicator ─── */
.steps { display: flex; flex-direction: column; gap: 2rem; }
.step  { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgb(37 99 235 / .3);
}

/* ─── Section ─── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--bg-subtle); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: .75rem;
}
.section-title { margin-bottom: .75rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* ─── CTA Banner ─── */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ─── Footer ─── */
footer {
  background: var(--text-primary);
  color: #94A3B8;
  padding: 3rem 0 2rem;
}
footer a:hover { color: #fff; }
.footer-brand { color: #fff; font-size: 1.125rem; font-weight: 800; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  list-style: none;
}
.footer-links a { font-size: .875rem; transition: color var(--transition); }
.footer-bottom {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Onboarding ─── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #312e81 50%, #1e1b4b 100%);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .4s ease;
}

.onboarding-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  animation: scaleIn .4s ease;
}

.onboarding-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .75rem;
  min-height: 2em;
}

.onboarding-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.1rem;
  font-family: var(--font);
  outline: none;
  text-align: center;
  transition: border-color var(--transition);
}
.onboarding-input::placeholder { color: rgba(255,255,255,.4); }
.onboarding-input:focus { border-color: rgba(255,255,255,.6); }

.onboarding-choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.onboarding-choice {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.onboarding-choice:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.4);
  transform: translateY(-2px);
}

.onboarding-choice .choice-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.onboarding-choice .choice-text { display: flex; flex-direction: column; gap: .2rem; }
.onboarding-choice .choice-desc { font-size: .8rem; opacity: .6; font-weight: 400; }

/* ─── Live Counter ─── */
.live-counter {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.counter-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  min-width: 160px;
  box-shadow: var(--shadow);
}

.counter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.counter-dot.red    { background: #EF4444; animation: pulse-red 2s infinite; }
.counter-dot.yellow { background: #F59E0B; animation: pulse-yellow 2s infinite; }
.counter-dot.green  { background: #22C55E; animation: pulse-green-sm 2s infinite; }

@keyframes pulse-red    { 0%, 100% { box-shadow: 0 0 0 0 rgb(239 68 68 / .5); } 50% { box-shadow: 0 0 0 6px rgb(239 68 68 / 0); } }
@keyframes pulse-yellow { 0%, 100% { box-shadow: 0 0 0 0 rgb(245 158 11 / .5); } 50% { box-shadow: 0 0 0 6px rgb(245 158 11 / 0); } }
@keyframes pulse-green-sm { 0%, 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / .5); } 50% { box-shadow: 0 0 0 6px rgb(34 197 94 / 0); } }

.counter-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.counter-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; }

/* ─── Toggle ─── */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-dark);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}
input:checked + .toggle-slider { background: var(--color-primary); }
input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ─── Select Dropdown ─── */
.select-wrapper { position: relative; }
.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-links, .navbar-actions { display: none; }
  .navbar-links.open { display: flex; flex-direction: column; gap: 1rem; }
  .navbar-actions.open { display: flex; }

  .sidebar { position: fixed; left: -260px; transition: left var(--transition); }
  .sidebar.open { left: 0; box-shadow: var(--shadow-xl); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9;
    display: none;
  }
  .sidebar-overlay.show { display: block; }

  .dashboard-header { padding: 1rem 1.5rem; }
  .dashboard-main  { padding: 1.5rem; }

  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .modal { max-height: 85vh; }
  .chat-bubble { max-width: 85%; }
  .live-counter { gap: 1rem; }
  .counter-item { min-width: 140px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  .hero-title { font-size: 2rem; }
  .btn-xl { padding: .875rem 1.75rem; font-size: 1rem; }
  .onboarding-card { padding: 2rem 1.5rem; }
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary-color { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: .5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.hidden { display: none !important; }
.visible { display: block !important; }
.invisible { visibility: hidden; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sticky-top { position: sticky; top: 0; z-index: 10; }

.fade-in { animation: fadeIn .3s ease; }
.slide-up { animation: slideUp .3s ease; }

@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ─── Priority Colors ─── */
.priority-baixa   { color: var(--color-info); }
.priority-media   { color: var(--color-warning); }
.priority-alta    { color: #EA580C; }
.priority-critica { color: var(--color-danger); font-weight: 600; }

/* ─── Level Colors ─── */
.level-iniciante { color: var(--text-muted); }
.level-junior    { color: var(--color-success); }
.level-pleno     { color: var(--color-primary); }
.level-senior    { color: var(--color-secondary); }
