@import './tokens.css';

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-primary:disabled { background: var(--paper-3); color: var(--ink-faint); cursor: not-allowed; }

.btn-ghost { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); }

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

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 36, 28, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(22, 36, 28, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-family: 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal .modal-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }

input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='number'],
input[type='url'],
input[type='date'],
input[type='datetime-local'],
input[type='search'],
input:not([type]),
select,
textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-sizing: border-box;
  min-height: 42px;
  appearance: none;
  -webkit-appearance: none;
}

input[type='date'],
input[type='datetime-local'] {
  min-height: 42px;
  line-height: 1.2;
}

input[type='date']::-webkit-calendar-picker-indicator,
input[type='datetime-local']::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}

select {
  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='%237a857f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.45;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 100px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 60;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

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

.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
}

.brand .name span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}

.hidden { display: none !important; }

/* Modal informativo (substitui alert) */
.alert-modal {
  text-align: center;
  max-width: 420px;
  padding: 32px 28px 28px;
}

.alert-modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--white);
}

.alert-modal-icon svg { width: 26px; height: 26px; }

.alert-modal-icon.info { background: var(--primary); }
.alert-modal-icon.success { background: var(--primary); }
.alert-modal-icon.error { background: var(--coral); }

.alert-modal h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--ink);
}

.alert-modal-message {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 0;
}

.alert-modal-actions {
  justify-content: center;
  margin-top: 24px;
}

.alert-modal-actions .btn-primary {
  min-width: 140px;
  justify-content: center;
}

