/* ========================================
   BIBLIOTECA DE COMPONENTES REUTILIZÁVEIS
   ======================================== */

/* --- DESIGN TOKENS --- */
/* All design tokens are now centralized in design-system.css
   This file only contains component-specific styles that use those tokens */

/* ========================================
   1. BUTTONS
   ======================================== */

.btn {
  height: 40px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: var(--success-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-error {
  background: var(--error);
  color: white;
}

.btn-error:hover:not(:disabled) {
  background: var(--error-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-warning {
  background: var(--warning);
  color: var(--gray-900);
}

.btn-warning:hover:not(:disabled) {
  background: var(--warning-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-info:hover:not(:disabled) {
  background: var(--info-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Outline Variants */
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline-primary:hover:not(:disabled) {
  background: var(--primary);
  color: white;
}

.btn-outline-secondary {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-outline-secondary:hover:not(:disabled) {
  background: var(--secondary);
  color: white;
}

/* Ghost/Text Buttons */
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  padding: 0 var(--space-3);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
}

/* Button Sizes */
.btn-xs {
  height: 28px;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
}

.btn-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
}

.btn-xl {
  height: 56px;
  padding: 0 var(--space-8);
  font-size: var(--text-lg);
}

/* Button Shapes */
.btn-rounded {
  border-radius: var(--radius-full);
}

.btn-square {
  border-radius: 0;
}

/* Icon Button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.btn-icon.btn-lg {
  width: 48px;
  height: 48px;
}

/* Button with Icon */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ========================================
   LOADING BUTTON STATES
   ======================================== */

/* Button loading state - Use with setButtonLoading() helper */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Primary button loading */
.btn-primary.btn-loading::before,
.btn-success.btn-loading::before,
.btn-danger.btn-loading::before,
.btn-warning.btn-loading::before,
.btn-info.btn-loading::before {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* Outline button loading */
.btn-outline-primary.btn-loading::before,
.btn-outline-secondary.btn-loading::before {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: currentColor;
}

/* Small button loading */
.btn-sm.btn-loading::before {
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-width: 2px;
}

/* Large button loading */
.btn-lg.btn-loading::before {
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border-width: 3px;
}

/* ========================================
   2. FORM CONTROLS
   ======================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
}

.form-label-required::after {
  content: " *";
  color: var(--error);
}

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: var(--transition-base);
  background: white;
  color: var(--gray-900);
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.form-control:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-control::placeholder {
  color: var(--gray-500);
}

/* Form Control States */
.form-control.is-invalid {
  border-color: var(--error);
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.form-control.is-invalid:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-light);
}

.form-control.is-valid {
  border-color: var(--success);
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2328a745' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.form-control.is-valid:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}

/* Textarea */
textarea.form-control {
  height: auto;
  min-height: 80px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

/* Select */
select.form-control {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23343a40' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  appearance: none;
}

/* Form Control Sizes */
.form-control-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.form-control-lg {
  height: 48px;
  padding: 0 var(--space-5);
  font-size: var(--text-lg);
}

/* Feedback Messages */
.form-feedback {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-feedback-error {
  color: var(--error);
}

.form-feedback-success {
  color: var(--success);
}

.form-feedback-info {
  color: var(--gray-600);
}

/* Input Group */
.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  border-radius: 0;
}

.input-group .form-control:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.input-group .form-control:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  color: var(--gray-600);
  white-space: nowrap;
}

.input-group-addon:first-child {
  border-right: none;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.input-group-addon:last-child {
  border-left: none;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-400);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input[type="radio"] {
  border-radius: var(--radius-full);
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}

/* Switch */
.form-switch {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.form-switch-input {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  position: relative;
  cursor: pointer;
  transition: var(--transition-base);
  border: none;
  appearance: none;
}

.form-switch-input::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: white;
  top: 2px;
  left: 2px;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.form-switch-input:checked {
  background: var(--primary);
}

.form-switch-input:checked::before {
  left: 22px;
}

.form-switch-label {
  font-size: var(--text-sm);
  color: var(--gray-700);
  user-select: none;
}

/* ========================================
   3. CARDS
   ======================================== */

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--gray-200);
}

.card-flat:hover {
  box-shadow: none;
  transform: none;
}

.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
}

/* Card Parts */
.card-header {
  padding: var(--space-4) var(--space-6);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--gray-800);
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-6);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  margin: var(--space-6) calc(-1 * var(--space-6)) calc(-1 * var(--space-6));
}

.card-title {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
}

.card-subtitle {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.card-text {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Card Sizes */
.card-sm {
  padding: var(--space-4);
}

.card-lg {
  padding: var(--space-8);
}

/* Card with Image */
.card-img-top {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-6);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   4. BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Badge Variants */
.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-secondary {
  background: var(--secondary-light);
  color: var(--secondary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-error {
  background: var(--error-light);
  color: var(--error);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning-hover);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-gray {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* Solid Badges */
.badge-solid-primary {
  background: var(--primary);
  color: white;
}

.badge-solid-secondary {
  background: var(--secondary);
  color: white;
}

.badge-solid-success {
  background: var(--success);
  color: white;
}

.badge-solid-error {
  background: var(--error);
  color: white;
}

.badge-solid-warning {
  background: var(--warning);
  color: var(--gray-900);
}

.badge-solid-info {
  background: var(--info);
  color: white;
}

/* Badge Sizes */
.badge-sm {
  padding: 2px var(--space-2);
  font-size: 10px;
}

.badge-lg {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* Badge with Dot */
.badge-dot {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* Badge with Icon */
.badge-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* Pill Badge */
.badge-pill {
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
}

/* ========================================
   5. ALERTS & TOASTS
   ======================================== */

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin: 0 0 var(--space-1) 0;
  font-size: var(--text-sm);
}

.alert-message {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

/* Alert Variants */
.alert-success {
  background: var(--success-light);
  color: var(--success);
  border-left-color: var(--success);
}

.alert-error {
  background: var(--error-light);
  color: var(--error);
  border-left-color: var(--error);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning-hover);
  border-left-color: var(--warning);
}

.alert-info {
  background: var(--info-light);
  color: var(--info);
  border-left-color: var(--info);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--error);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-info {
  border-left-color: var(--info);
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin: 0 0 var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--gray-900);
}

.toast-message {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--gray-500);
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--gray-900);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-exit {
  animation: slideOutRight 0.3s ease-out;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
}

/* ========================================
   6. LOADING STATES
   ======================================== */

/* ==================== SPINNERS ==================== */

/* Base Spinner - Bootstrap 5 Compatible */
.spinner,
.spinner-border {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* Spinner Sizes */
.spinner-sm,
.spinner-border-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

.spinner-xl {
  width: 48px;
  height: 48px;
  border-width: 5px;
}

/* Spinner Colors */
.spinner-primary,
.text-primary .spinner-border {
  border-color: rgba(230, 0, 170, 0.2);
  border-top-color: var(--primary);
}

.spinner-secondary {
  border-color: rgba(100, 116, 139, 0.2);
  border-top-color: var(--secondary);
}

.spinner-success {
  border-color: rgba(16, 185, 129, 0.2);
  border-top-color: var(--success);
}

.spinner-danger {
  border-color: rgba(239, 68, 68, 0.2);
  border-top-color: var(--danger);
}

.spinner-warning {
  border-color: rgba(245, 158, 11, 0.2);
  border-top-color: var(--warning);
}

.spinner-white,
.text-light .spinner-border {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* Spin Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== SKELETON LOADERS ==================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 25%,
    var(--gray-100) 50%,
    var(--gray-200) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
  display: block;
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-4);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.skeleton-button {
  height: 40px;
  width: 120px;
}

.skeleton-card {
  height: 200px;
  width: 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==================== LOADING OVERLAY ==================== */

/* Global loading overlay - Use with showLoading() / hideLoading() */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.loading-overlay.show {
  display: flex;
  opacity: 1;
}

/* Loading overlay content card */
.loading-overlay-content {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  min-width: 200px;
}

.loading-overlay-spinner {
  margin: 0 auto var(--space-4);
}

.loading-overlay-text {
  color: var(--gray-700);
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
}

/* Inline loading container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  min-height: 200px;
}

.loading-container-sm {
  min-height: 100px;
  padding: var(--space-4);
}

.loading-container-lg {
  min-height: 300px;
  padding: var(--space-12);
}

/* Progress Bar */
.progress {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% {
    background-position: 1rem 0;
  }
  100% {
    background-position: 0 0;
  }
}

.progress-sm {
  height: 4px;
}

.progress-lg {
  height: 12px;
}

/* ========================================
   7. MODALS - COMENTADO (CONFLITA COM BOOTSTRAP 5)
   ======================================== */

/*
IMPORTANTE: Este CSS customizado foi desabilitado pois conflita com Bootstrap 5.
O Bootstrap já possui um sistema completo de modais.
Deixe o Bootstrap gerenciar os modais nativamente.

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.3s ease-out;
}

.modal-sm {
  max-width: 400px;
}

.modal-lg {
  max-width: 800px;
}

.modal-xl {
  max-width: 1200px;
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--gray-500);
  transition: var(--transition-fast);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
*/

/* ========================================
   9. UTILITY CLASSES
   ======================================== */

/* All utility classes have been moved to design-system.css
   Only component-specific utilities should remain here */
