/* =============================================
   CPA/IFMG - Sistema de Avaliação Institucional
   Estilos Principais
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1a3a5c;
  --primary-light: #1e4d7b;
  --primary-hover: #153052;
  --accent: #2e7d32;
  --accent-light: #388e3c;
  --accent-hover: #1b5e20;
  --sidebar-bg: #0f2744;
  --sidebar-text: #b8cfe8;
  --sidebar-active: #1e4d7b;
  --sidebar-hover: #163459;
  --bg-main: #f0f2f5;
  --card-bg: #ffffff;
  --text-primary: #1a2e44;
  --text-secondary: #5a7184;
  --text-muted: #8fa3b5;
  --border: #e1e8ef;
  --border-light: #f0f4f8;
  --success: #2e7d32;
  --warning: #f57c00;
  --danger: #c62828;
  --info: #0277bd;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --sidebar-width: 260px;
  --header-height: 64px;
  --transition: all 0.22s ease;
}

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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-main);
  overflow: hidden;
}

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */

.app-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: var(--transition);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

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

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-logo .logo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon i {
  color: white;
  font-size: 20px;
}

.logo-text .logo-title {
  font-size: 16px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.logo-text .logo-subtitle {
  font-size: 11px;
  color: var(--sidebar-text);
  font-weight: 400;
  margin-top: 1px;
}

.sidebar-section {
  padding: 18px 0 8px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(184, 207, 232, 0.45);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 20px 8px;
}

.sidebar-nav {
  list-style: none;
  padding: 0 10px;
}

.sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  opacity: 0.75;
  transition: var(--transition);
}

.sidebar-nav a .nav-label { flex: 1; }

.sidebar-nav a .nav-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-nav a:hover i { opacity: 1; }

.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: white;
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--accent-light);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav a.active i { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: var(--sidebar-hover); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e4d7b, #2e7d32);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar span {
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.user-info .user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.user-info .user-role {
  font-size: 11px;
  color: var(--sidebar-text);
}

/* =============================================
   CONTEÚDO PRINCIPAL
   ============================================= */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.topbar-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: var(--transition);
  position: relative;
}

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

.topbar-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid white;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.page-content::-webkit-scrollbar { width: 6px; }
.page-content::-webkit-scrollbar-track { background: transparent; }
.page-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* =============================================
   SEÇÕES DE PÁGINAS
   ============================================= */

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

/* =============================================
   CARDS
   ============================================= */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--accent);
  font-size: 16px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 14px 24px;
  background: var(--border-light);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* =============================================
   DASHBOARD
   ============================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.stat-card.green::before { background: var(--accent); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.blue::before { background: var(--info); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.stat-icon.navy { background: rgba(26,58,92,0.1); color: var(--primary); }
.stat-icon.green { background: rgba(46,125,50,0.1); color: var(--accent); }
.stat-icon.orange { background: rgba(245,124,0,0.1); color: var(--warning); }
.stat-icon.blue { background: rgba(2,119,189,0.1); color: var(--info); }

.stat-info .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.stat-info .stat-change {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-grid.three-col {
  grid-template-columns: 2fr 1fr;
}

/* =============================================
   FORMULÁRIOS
   ============================================= */

.form-section {
  margin-bottom: 28px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i {
  color: var(--accent);
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.full { grid-template-columns: 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-label .required {
  color: var(--danger);
  font-size: 13px;
}

.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13.5px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  background: white;
  transition: var(--transition);
  width: 100%;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(30, 77, 123, 0.10);
}

.form-control:disabled {
  background: var(--border-light);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-control.hidden-field {
  display: none;
}

select.form-control {
  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='%235a7184' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

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

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =============================================
   BOTÕES
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn i { font-size: 14px; }

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,58,92,0.25);
}

.btn-success {
  background: var(--accent);
  color: white;
}

.btn-success:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.28);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

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

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #b71c1c;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
}

.btn-icon {
  padding: 8px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   TABELAS
   ============================================= */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12.5px;
  text-align: left;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

tbody tr:hover { background: rgba(240,244,248,0.7); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.table-empty {
  text-align: center;
  padding: 48px !important;
  color: var(--text-muted);
}

.table-empty i {
  display: block;
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* =============================================
   BADGES / CHIPS / STATUS
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: rgba(46,125,50,0.1); color: var(--accent); }
.badge-warning { background: rgba(245,124,0,0.1); color: var(--warning); }
.badge-danger { background: rgba(198,40,40,0.1); color: var(--danger); }
.badge-info { background: rgba(2,119,189,0.1); color: var(--info); }
.badge-neutral { background: rgba(90,113,132,0.1); color: var(--text-secondary); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 77, 123, 0.08);
  color: var(--primary);
  border: 1px solid rgba(30, 77, 123, 0.18);
  border-radius: 20px;
  padding: 3px 10px 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  margin: 2px;
  white-space: nowrap;
}

.chip .chip-remove {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(30,77,123,0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--primary);
  transition: var(--transition);
  flex-shrink: 0;
}

.chip .chip-remove:hover {
  background: var(--danger);
  color: white;
}

/* =============================================
   MULTISELECT CUSTOMIZADO
   ============================================= */

.multiselect-wrapper {
  position: relative;
}

.multiselect-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  min-height: 42px;
  padding: 6px 38px 6px 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  position: relative;
}

.multiselect-control:focus-within,
.multiselect-control.open {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(30,77,123,0.10);
}

.multiselect-control .ms-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 12px;
  pointer-events: none;
  transition: transform 0.2s;
}

.multiselect-control.open .ms-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.multiselect-search {
  border: none;
  outline: none;
  flex: 1;
  min-width: 120px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: transparent;
  padding: 2px 4px;
}

.multiselect-placeholder {
  font-size: 13.5px;
  color: var(--text-muted);
  pointer-events: none;
  padding: 2px 4px;
}

.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  scrollbar-width: thin;
}

.multiselect-dropdown.open { display: block; }

.ms-option {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ms-option:hover { background: var(--border-light); }

.ms-option.selected {
  background: rgba(30,77,123,0.07);
  color: var(--primary);
  font-weight: 600;
}

.ms-option .ms-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  color: transparent;
  transition: var(--transition);
}

.ms-option.selected .ms-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.ms-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* =============================================
   LIKERT OPTIONS
   ============================================= */

.likert-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}

.likert-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text-primary);
}

.likert-item i {
  font-size: 12px;
  color: var(--accent);
}

/* =============================================
   MÚLTIPLA ESCOLHA
   ============================================= */

.opcoes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.opcao-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.opcao-item input {
  flex: 1;
}

.opcao-number {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* =============================================
   ALERT / TOAST
   ============================================= */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(46,125,50,0.09);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.alert-info {
  background: rgba(2,119,189,0.09);
  color: var(--info);
  border-left: 3px solid var(--info);
}

.alert-warning {
  background: rgba(245,124,0,0.09);
  color: var(--warning);
  border-left: 3px solid var(--warning);
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  animation: slideIn 0.3s ease;
  pointer-events: all;
  border-left: 4px solid var(--accent);
}

.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { font-size: 18px; }
.toast.success .toast-icon { color: var(--accent); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-msg {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

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

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* =============================================
   BARRA DE PESQUISA / FILTROS
   ============================================= */

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar i {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  font-size: 13px;
}

.search-bar input {
  padding-left: 34px;
  width: 220px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =============================================
   DIMENSÃO CHIPS NA TABELA
   ============================================= */

.dim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 340px;
}

.dim-chip {
  background: rgba(30,77,123,0.07);
  color: var(--primary);
  border: 1px solid rgba(30,77,123,0.15);
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.4;
}

/* =============================================
   PROGRESS BARS
   ============================================= */

.progress {
  background: var(--border-light);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent), #43a047);
  transition: width 0.6s ease;
}

/* =============================================
   LISTA DE ATIVIDADE
   ============================================= */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.activity-dot.blue { background: var(--info); }
.activity-dot.orange { background: var(--warning); }

.activity-content .activity-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.activity-content .activity-time {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =============================================
   PÁGINA TÍTULO
   ============================================= */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.page-title p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.breadcrumb span { color: var(--primary); font-weight: 600; }

/* =============================================
   CONFIGURAÇÃO CICLOS E AVALIAÇÕES - DASHBOARD
   ============================================= */

.cycle-card {
  border-left: 4px solid var(--primary);
  padding: 16px;
  background: white;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}

.cycle-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.cycle-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.cycle-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.cycle-meta span {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =============================================
   CAMPOS CONDICIONAIS
   ============================================= */

.conditional-field {
  display: none;
}

.conditional-field.visible {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  display: none;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger); color: white; }

.modal-body { padding: 24px 26px; }
.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =============================================
   USUÁRIOS - AVATAR
   ============================================= */

.user-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-table-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar { transform: translateX(-260px); width: 260px; position: fixed; height: 100vh; }
  .sidebar.mobile-open { transform: translateX(0); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .page-content { padding: 18px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
