/* =====================================================
   AGÊNCIA PW — Sistema de Gestão
   Estilos Globais
   ===================================================== */

:root {
  --primary:        #4361ee;
  --primary-dark:   #3a56d4;
  --primary-light:  #eef0fd;
  --secondary:      #3f37c9;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #06b6d4;
  --purple:         #8b5cf6;
  --pink:           #ec4899;

  --sidebar-bg:     #0f172a;
  --sidebar-hover:  #1e293b;
  --sidebar-active: #4361ee;
  --sidebar-text:   #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-width:  260px;
  --sidebar-collapsed: 70px;

  --body-bg:        #f1f5f9;
  --card-bg:        #ffffff;
  --border-color:   #e2e8f0;
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;

  --header-height:  65px;
  --border-radius:  12px;
  --border-radius-sm: 8px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --transition:     all .2s ease;
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: .9rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Wrapper Layout ───────────────────────────────── */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Brand */
.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  min-height: var(--header-height);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #fff;
}

.brand-text { overflow: hidden; transition: var(--transition); }
.brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-sub {
  font-size: .7rem;
  color: var(--sidebar-text);
  white-space: nowrap;
}

#sidebar.collapsed .brand-text { opacity: 0; width: 0; }

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .75rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sidebar-text);
  padding: 1rem 1.25rem .4rem;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

#sidebar.collapsed .nav-label { opacity: 0; }

.nav-item { list-style: none; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.25rem;
  color: var(--sidebar-text);
  border-radius: 0;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-link.active {
  background: rgba(67, 97, 238, .15);
  color: #fff;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-link .nav-icon {
  width: 20px;
  text-align: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.nav-link .nav-text { flex: 1; font-size: .86rem; font-weight: 500; }
.nav-link .nav-arrow { font-size: .7rem; transition: transform .2s; }
.nav-link.open .nav-arrow { transform: rotate(90deg); }
.nav-link .badge-nav {
  font-size: .65rem;
  padding: .2em .5em;
  border-radius: 20px;
}

#sidebar.collapsed .nav-text,
#sidebar.collapsed .nav-arrow,
#sidebar.collapsed .badge-nav { display: none; }

/* Sub-menu */
.sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0,0,0,.15);
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}

.sub-menu.open { max-height: 500px; }

.sub-menu .nav-link {
  padding: .5rem 1.25rem .5rem 3.2rem;
  font-size: .82rem;
}

.sub-menu .nav-link::before { display: none; }

.sub-menu .nav-link.active {
  color: var(--primary);
  background: transparent;
}

/* Tooltip for collapsed */
#sidebar.collapsed .nav-link { justify-content: center; padding: .7rem; }
#sidebar.collapsed .nav-link .nav-icon { width: auto; margin: 0; }

/* User area */
.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
  overflow: hidden;
}

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

.user-info-sm { overflow: hidden; transition: var(--transition); }
.user-info-sm .user-name { font-size: .82rem; font-weight: 600; color: #fff; white-space: nowrap; }
.user-info-sm .user-role { font-size: .72rem; color: var(--sidebar-text); white-space: nowrap; }
#sidebar.collapsed .user-info-sm { opacity: 0; width: 0; }
#sidebar.collapsed .sidebar-user { justify-content: center; }

/* ── Main Content ─────────────────────────────────── */
#content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  transition: margin-left .2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content.expanded { margin-left: var(--sidebar-collapsed); }

/* ── Topbar ───────────────────────────────────────── */
#topbar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-sm);
}

.topbar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: .4rem;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.topbar-toggle:hover { background: var(--body-bg); color: var(--primary); }

.topbar-search {
  flex: 1;
  max-width: 380px;
}

.topbar-search .input-group-text {
  background: var(--body-bg);
  border-color: var(--border-color);
  color: var(--text-muted);
}

.topbar-search .form-control {
  background: var(--body-bg);
  border-color: var(--border-color);
  font-size: .85rem;
}

.topbar-search .form-control:focus { box-shadow: none; border-color: var(--primary); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: .95rem;
}

.topbar-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: var(--body-bg);
  margin-left: .25rem;
}

.topbar-user:hover { background: var(--primary-light); border-color: var(--primary); }

.topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
}

.topbar-user-info .name { font-size: .82rem; font-weight: 600; line-height: 1.2; }
.topbar-user-info .role { font-size: .7rem; color: var(--text-muted); }

/* ── Page Content ─────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 1.5rem;
}

/* ── Page Header ──────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .2rem;
}

.page-subtitle {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

.breadcrumb { margin: 0; padding: 0; background: none; font-size: .8rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: .95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.card-body { padding: 1.25rem; }
.card-footer { background: transparent; border-top: 1px solid var(--border-color); padding: .875rem 1.25rem; }

/* ── Stat Cards ───────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after  { background: var(--danger); }
.stat-card.info::after    { background: var(--info); }
.stat-card.purple::after  { background: var(--purple); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.danger  { background: #fee2e2; color: var(--danger); }
.stat-icon.info    { background: #cffafe; color: var(--info); }
.stat-icon.purple  { background: #ede9fe; color: var(--purple); }

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: .3rem; }
.stat-change { font-size: .76rem; display: flex; align-items: center; gap: .3rem; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--text-muted); }

/* ── Tables ───────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
}

.table {
  margin: 0;
  font-size: .85rem;
}

.table thead th {
  background: var(--body-bg);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-color);
  padding: .75rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  padding: .85rem 1rem;
  vertical-align: middle;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.table tbody tr:hover { background: var(--body-bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Badges / Status ──────────────────────────────── */
.badge { font-weight: 600; font-size: .72rem; padding: .35em .7em; border-radius: 6px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-ativo    { background: #d1fae5; color: #065f46; }
.status-ativo::before    { background: var(--success); }
.status-inativo  { background: #f1f5f9; color: #64748b; }
.status-inativo::before  { background: #94a3b8; }
.status-andamento { background: #dbeafe; color: #1e40af; }
.status-andamento::before { background: var(--primary); }
.status-pausado  { background: #fef3c7; color: #92400e; }
.status-pausado::before  { background: var(--warning); }
.status-concluido { background: #d1fae5; color: #065f46; }
.status-concluido::before { background: var(--success); }
.status-cancelado { background: #fee2e2; color: #991b1b; }
.status-cancelado::before { background: var(--danger); }
.status-pendente { background: #fef3c7; color: #92400e; }
.status-pendente::before { background: var(--warning); }
.status-aprovado { background: #d1fae5; color: #065f46; }
.status-aprovado::before { background: var(--success); }
.status-recusado { background: #fee2e2; color: #991b1b; }
.status-recusado::before { background: var(--danger); }
.status-enviado  { background: #dbeafe; color: #1e40af; }
.status-enviado::before  { background: var(--info); }

/* ── Buttons ──────────────────────────────────────── */
.btn { border-radius: 8px; font-size: .85rem; font-weight: 500; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { font-size: .78rem; padding: .3rem .65rem; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .85rem;
}

/* ── Form Controls ────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border-color);
  border-radius: 8px;
  font-size: .86rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,.1);
}

.form-label { font-size: .83rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .4rem; }
.form-section { margin-bottom: 1.5rem; }
.form-section-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

/* ── Avatar ───────────────────────────────────────── */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  color: #fff;
}

.avatar-sm { width: 30px; height: 30px; font-size: .72rem; border-radius: 8px; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 14px; }
.avatar-circle { border-radius: 50%; }

.avatar.bg-primary { background: var(--primary); }
.avatar.bg-success { background: var(--success); }
.avatar.bg-warning { background: var(--warning); }
.avatar.bg-danger  { background: var(--danger); }
.avatar.bg-info    { background: var(--info); }
.avatar.bg-purple  { background: var(--purple); }
.avatar.bg-pink    { background: var(--pink); }

/* ── Progress Bars ────────────────────────────────── */
.progress { height: 6px; border-radius: 10px; background: var(--border-color); }
.progress-bar { border-radius: 10px; }

/* ── Tabs ─────────────────────────────────────────── */
.nav-tabs { border-bottom: 1px solid var(--border-color); gap: .25rem; }
.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  padding: .75rem 1rem;
  border-radius: 0;
  transition: var(--transition);
  margin-bottom: -1px;
}
.nav-tabs .nav-link:hover { color: var(--primary); border-bottom-color: var(--primary); background: none; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: none; }

/* ── Kanban ───────────────────────────────────────── */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.kanban-col {
  min-width: 280px;
  max-width: 280px;
  background: var(--body-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

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

.kanban-col-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.kanban-count {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-items { padding: .75rem; display: flex; flex-direction: column; gap: .75rem; min-height: 200px; }

.kanban-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: .875rem;
  cursor: grab;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kanban-card-title { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.kanban-card-client { font-size: .75rem; color: var(--text-muted); margin-bottom: .6rem; }

/* ── Timeline ─────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: .55rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.55rem;
  top: .15rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--border-color);
}

.timeline-dot.primary { background: var(--primary); box-shadow: 0 0 0 2px rgba(67,97,238,.2); }
.timeline-dot.success { background: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
.timeline-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px rgba(245,158,11,.2); }
.timeline-dot.danger  { background: var(--danger);  box-shadow: 0 0 0 2px rgba(239,68,68,.2); }
.timeline-dot.muted   { background: #94a3b8;         box-shadow: 0 0 0 2px rgba(148,163,184,.2); }

.timeline-time { font-size: .72rem; color: var(--text-muted); margin-bottom: .2rem; }
.timeline-title { font-size: .85rem; font-weight: 600; margin-bottom: .15rem; }
.timeline-desc { font-size: .8rem; color: var(--text-secondary); }

/* ── Login Page ───────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.login-page::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='%234361ee' fill-opacity='0.04'%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");
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,.25);
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 auto 1.25rem;
}

.login-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: .25rem; }
.login-subtitle { font-size: .84rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }

.input-login {
  border-radius: 10px;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border-color);
  font-size: .88rem;
  transition: var(--transition);
}

.input-login:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,.1); }

.btn-login {
  width: 100%;
  padding: .8rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  background: var(--primary);
  border: none;
  color: #fff;
  transition: var(--transition);
  cursor: pointer;
}

.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(67,97,238,.3); }

/* ── Portal ───────────────────────────────────────── */
.portal-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%);
}

.portal-project-card {
  border-left: 4px solid var(--primary);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }

  #sidebar.mobile-open { transform: translateX(0); }

  #content { margin-left: 0 !important; }

  .main-content { padding: 1rem; }

  .page-header { flex-direction: column; }

  .topbar-search { display: none; }

  .kanban-board { flex-direction: column; }
  .kanban-col { min-width: auto; max-width: none; }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
}

@media (max-width: 768px) {
  .sidebar-overlay.show { display: block; }
}

/* ── Utilities ────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-light { background: var(--primary-light) !important; }
.rounded-10 { border-radius: 10px !important; }
.rounded-12 { border-radius: 12px !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fs-13 { font-size: .81rem !important; }
.fs-12 { font-size: .75rem !important; }
.cursor-pointer { cursor: pointer; }
.hover-shadow:hover { box-shadow: var(--shadow) !important; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Dropdown menus ───────────────────────────────── */
.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  padding: .5rem;
  font-size: .85rem;
}

.dropdown-item { border-radius: 8px; padding: .5rem .75rem; color: var(--text-primary); }
.dropdown-item:hover { background: var(--body-bg); color: var(--primary); }
.dropdown-divider { border-color: var(--border-color); margin: .4rem 0; }
.dropdown-header { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }

/* ── Notification dropdown ────────────────────────── */
.notif-item {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  border-radius: 10px;
  transition: var(--transition);
  cursor: pointer;
}

.notif-item:hover { background: var(--body-bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: .82rem; font-weight: 600; margin-bottom: .1rem; }
.notif-text { font-size: .78rem; color: var(--text-secondary); margin-bottom: .1rem; }
.notif-time { font-size: .72rem; color: var(--text-muted); }

/* ── Checklist ────────────────────────────────────── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-color);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done .checklist-text { text-decoration: line-through; color: var(--text-muted); }
.checklist-checkbox { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border-color); flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.checklist-checkbox.checked { background: var(--success); border-color: var(--success); color: #fff; font-size: .7rem; }

/* ── Line items (proposta) ────────────────────────── */
.line-item-row { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .75rem; }
.line-item-row .form-control { font-size: .84rem; }

/* ── Portal specific ──────────────────────────────── */
.milestone {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border-color);
}
.milestone:last-child { border-bottom: none; }
.milestone-dot { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.milestone-done { background: #d1fae5; color: var(--success); }
.milestone-active { background: var(--primary-light); color: var(--primary); }
.milestone-pending { background: var(--body-bg); color: var(--text-muted); }

/* ── Charts area ──────────────────────────────────── */
.chart-container { position: relative; }

/* ── Empty state ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }
.empty-state h6 { font-weight: 600; margin-bottom: .4rem; color: var(--text-secondary); }
.empty-state p { font-size: .84rem; }

/* ── Tooltip ──────────────────────────────────────── */
.tooltip-inner { font-size: .78rem; border-radius: 8px; }
