/* Variáveis CSS */
:root {
  --primary: #094465;
  --primary-hover: #06314a;
  --secondary: #FFD700;
  --secondary-hover: #e6c200;
  --accent: #2ecc71;
  --danger: #e74c3c;
  --dark: #2c3e50;
  --light: #f8f9fa;
  --gray: #95a5a6;
  --text: #333333;
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --sidebar-width: 250px;
  --topbar-height: 70px;
  --border-radius: 10px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--bg-color);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

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

.login-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 30px 30px 30px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 30px;
}

.login-icon {
  width: 70px;
  height: 70px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
  margin: 0 auto 15px;
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.login-title {
  color: var(--primary);
  font-weight: 800;
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: var(--gray);
  font-size: 14px;
  margin: 5px 0 0;
}

.login-input {
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
}

.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(9, 68, 101, 0.1);
}

.btn-login {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(9, 68, 101, 0.25);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  padding: 0px;
}

/* Animations */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand .brand-icon {
  color: var(--secondary);
  font-size: 24px;
  margin-right: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.brand-slogan {
  font-size: 11px;
  opacity: 0.7;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-section-label {
  padding: 10px 25px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  font-weight: 600;
  margin-top: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-item i {
  width: 35px;
  font-size: 16px;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(255, 255, 255, 0.2);
}

.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
  border-left-color: var(--secondary);
}

.nav-item.active i {
  color: var(--secondary);
}

.sidebar-footer {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-role {
  font-size: 11px;
  opacity: 0.7;
}

.btn-logout {
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
  transform: scale(1.1);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: var(--transition);
}

.topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--dark);
  cursor: pointer;
  margin-right: 20px;
  display: none;
}

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

.topbar-right {
  margin-left: auto;
}

.topbar-date {
  background: var(--bg-color);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
}

.content-area {
  padding: 20px;
  flex: 1;
}

/* UI Components */
.card-panel {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: none;
  margin-bottom: 24px;
}

.panel-header {
  padding: 20px 25px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.panel-body {
  padding: 25px;
}

/* Buttons */
.btn-link-sm {
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(9, 68, 101, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

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

.btn-primary-action {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-primary-action:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(9, 68, 101, 0.2);
}

.btn-secondary-action {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-secondary-action:hover {
  background: rgba(9, 68, 101, 0.05);
  color: var(--primary);
}

.btn-danger-action {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-danger-action:hover {
  background: #c0392b;
  color: white;
}

.btn-back {
  background: var(--bg-color);
  color: var(--dark);
  border: 1px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-back:hover {
  background: #e9ecef;
  color: var(--primary);
  border-color: #d0d0d0;
}

.action-btns {
  display: flex;
  gap: 8px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-color);
  color: var(--gray);
  transition: var(--transition);
  text-decoration: none;
}

.btn-action:hover {
  transform: translateY(-2px);
}

.btn-action.view:hover {
  background: #e3f2fd;
  color: #1976d2;
}

.btn-action.edit:hover {
  background: #fff3e0;
  color: #f57c00;
}

.btn-action.delete:hover {
  background: #ffebee;
  color: #d32f2f;
}

.btn-action.info:hover {
  background: #e0f7fa;
  color: #0097a7;
}

/* Dashboard Stats */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
}

.stat-blue::after {
  background: #3498db;
}

.stat-yellow::after {
  background: var(--secondary);
}

.stat-green::after {
  background: var(--accent);
}

.stat-orange::after {
  background: #e67e22;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 20px;
}

.stat-blue .stat-icon {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

.stat-yellow .stat-icon {
  background: rgba(255, 215, 0, 0.2);
  color: #d4af37;
}

.stat-green .stat-icon {
  background: rgba(46, 204, 113, 0.1);
  color: var(--accent);
}

.stat-orange .stat-icon {
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
}

/* Table */
.app-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  font-weight: 600;
  border-top: none;
  padding: 12px;
}

.app-table td {
  padding: 15px 10px;
  vertical-align: middle;
  color: var(--text);
  border-bottom: 1px solid #f5f5f5;
}

/* Forms */
.form-label {
  font-weight: 500;
  color: var(--dark);
  font-size: 14px;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(9, 68, 101, 0.1);
}

/* Avatars */
.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.avatar-xl {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  border: 4px solid white;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 64px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.empty-state h3 {
  color: var(--dark);
  font-weight: 600;
}

.empty-state p {
  color: var(--gray);
  margin-bottom: 25px;
}

.empty-state-sm {
  text-align: center;
  padding: 30px 10px;
}

.empty-state-sm i {
  font-size: 32px;
  color: #e0e0e0;
  margin-bottom: 10px;
}

.empty-state-sm p {
  color: var(--gray);
  font-size: 14px;
  margin: 0;
}

/* List Items */
.list-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f5f5f5;
}

.list-item:first-child {
  padding-top: 0px;
}

.list-item:last-child {
  border-bottom: none;
  padding-bottom: 0px;
}

.list-item-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 15px;
}

.bg-primary-soft {
  background: rgba(9, 68, 101, 0.1);
}

.bg-yellow-soft {
  background: rgba(255, 215, 0, 0.2);
}

.bg-warning-soft {
  background: rgba(255, 193, 7, 0.2);
}

.bg-info-soft {
  background: rgba(13, 202, 240, 0.1);
}

.list-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.list-item-title {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.list-item-sub {
  font-size: 12px;
  color: var(--gray);
}

/* Campanhas Cards */
.campanha-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.campanha-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.campanha-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.campanha-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--secondary) 0%, #d4af37 100%);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.campanha-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}

.campanha-desc {
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 20px;
  flex: 1;
}

.campanha-dates {
  background: var(--bg-color);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.campanha-actions {
  display: flex;
  gap: 10px;
}

/* Show Header & Nav */
.campanha-show-header {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.csh-info h2 {
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 5px;
}

.csh-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mini-stat {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.mini-stat span {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 5px;
}

.mini-stat label {
  color: var(--gray);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.campanha-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.cnav-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--dark);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.cnav-card:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.cnav-card i {
  font-size: 36px;
  display: block;
  margin-bottom: 15px;
  color: var(--primary);
  transition: var(--transition);
}

.cnav-card:hover i {
  color: var(--secondary);
}

.cnav-card span {
  font-weight: 600;
  font-size: 16px;
}

/* Relatorios */
.report-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.report-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.rc-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
}

.rc-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.rc-info p {
  font-size: 13px;
  color: var(--gray);
  margin: 0;
}

/* Tabs */
.app-tabs {
  border-bottom: 2px solid #f0f0f0;
  gap: 2px;
}

.app-tabs .nav-link {
  border: none;
  color: var(--gray);
  font-weight: 500;
  padding: 12px 18px;
  position: relative;
}

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

.app-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

/* Modals */
.app-modal {
  border: none;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
}

.app-modal .modal-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 20px 25px;
}

.app-modal .modal-title {
  font-weight: 700;
  color: var(--primary);
}

.app-modal .modal-body {
  padding: 25px;
}

.app-modal .modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 15px 25px;
}

/* Info List */
.info-list .info-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

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

.info-list .info-item i {
  width: 30px;
  color: var(--primary);
  font-size: 16px;
}

/* Observacoes */
.obs-card {
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 4px solid;
  background: white;
  box-shadow: var(--shadow-sm);
}

.obs-positive {
  border-left-color: var(--accent);
}

.obs-negative {
  border-left-color: var(--danger);
}

.obs-neutral {
  border-left-color: var(--gray);
}

.obs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.obs-badge {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.obs-positive .obs-badge {
  color: var(--accent);
}

.obs-negative .obs-badge {
  color: var(--danger);
}

.obs-neutral .obs-badge {
  color: var(--gray);
}

.obs-body {
  font-size: 14px;
  margin-bottom: 10px;
}

.btn-icon-sm {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
}

.btn-icon-sm:hover {
  opacity: 1;
}

/* Print Styles */
@media print {

  .sidebar,
  .topbar,
  .btn,
  .btn-primary-action,
  .btn-secondary-action,
  .btn-danger-action,
  .action-btns,
  .d-print-none,
  .nav-tabs {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
  }

  .content-area {
    padding: 0;
  }

  .card-panel {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  body {
    background: white;
  }

  .app-table th {
    color: black;
    border-bottom: 2px solid #000;
  }

  .app-table td {
    border-bottom: 1px solid #ccc;
  }

  .progress {
    border: 1px solid #000;
  }
}

/* Responsivo */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .campanha-show-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}