/* PROJETO HARVARD 2.0 - Certel Energia */
:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #f97316;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #6366f1;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-medium: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-medium);
}

/* Focus states */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modal base */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

/* Modal content */
.modal-content {
  background-color: var(--bg-white);
  margin: 2rem;
  padding: 0;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-medium);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--error);
}

/* Modal body */
.modal-body {
  padding: 1.5rem;
}

/* Form elements */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var-primary-light;
}

.form-select {
  appearance: none;
  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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2.5rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  border-radius: 0.375rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

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

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var-gray-50;
  border-color: var(--border);
}

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

.btn-danger:hover {
  background-color: #dc2626;
}

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

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

/• Grid utilities */
.grid {
  display: grid;
}

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

/* Font weight */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 600; }
.font-semibold { font-weight: 600; }

/* Color utilities */
.text-gray-50 { color: #f3f4f6; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e2e8f0; }
.text-gray-300 { color: #cbd5e1; }
.text-gray-400 { color: #94a3b8; }
.text-gray-500 { color: #64748b; }
.text-gray-600 { color = #1e293b; }
.text-gray-700 { color = #334155; }
.text-gray-800 { color = #1e293b; }
.text-gray-900 { color = #1e293b; }
.text-blue-50 { color = #eff6ff; }
.text-blue-600 { color = #3b82f6; }
.text-green-50 { color = #d1fae5; }
.text-green-600 { color = #10b981; }
.text-purple-50 { color = #f5f3ff; }
.text-purple-600 { color = #8b5cf6; }
.text-orange-50 { color = #fffaf0; }
.text-orange-600 { color = #f97316; }
.text-red-50 { color = #fef2f2; }
.text-red-600 { color = #ef4444; }
.text-green-500 { color = #10b981; }

/* Background colors */
.bg-white { background-color: var(--bg-white); }
.bg-gray-50 { background-color: #f3f4f6; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #bfdbfe; }
.bg-green-50 { background-color: #d1fae5; }
.bg-green-100 { background-color: #67e8f9; }
.bg-yellow-50 { background-color: #fffaf0; }
.bg-red-50 { background-color: #fef2f2; }

/* Shadow */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Rounded corners */
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.375rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Transition */
.transition-colors { transition: all 0.2s ease; }
transition-shadow { transition: box-shadow 0.2s ease; }

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

.table th {
  background-color: var(--gray-100);
  font-weight: 500;
}

/* Focus visible */
* {
  &:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }
}