/* DomiFactura - Two-Factor Authentication Stylesheet (Replaces development-only Tailwind CDN) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.max-w-4xl { max-width: 56rem; }
.container { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.h-auto { height: auto; }
.overflow-hidden { overflow: hidden; }
.shrink-0 { flex-shrink: 0; }
.block { display: block; }
.hidden { display: none; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:w-auto { width: auto; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:flex { display: flex; }
}

/* Spacing */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Sizing */
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-28 { width: 7rem; }
.w-48 { width: 12rem; }
.h-48 { height: 12rem; }
.object-contain { object-fit: contain; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.break-all { word-break: break-all; }
.select-all { user-select: all; }

/* Colors & Backgrounds */
.bg-white { background-color: #ffffff; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-red-50 { background-color: #fef2f2; }
.bg-green-100 { background-color: #dcfce7; }
.bg-blue-600 { background-color: #2563eb; }
.bg-indigo-600 { background-color: #4f46e5; }

.bg-gradient-to-br {
  background: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 100%);
}

.text-white { color: #ffffff; }
.text-slate-500, .text-gray-500 { color: #64748b; }
.text-slate-600, .text-gray-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900, .text-gray-900 { color: #0f172a; }
.text-red-700 { color: #b91c1c; }
.text-rose-600 { color: #e11d48; }
.text-green-600 { color: #16a34a; }
.text-indigo-600 { color: #4f46e5; }
.opacity-90 { opacity: 0.9; }

/* Borders & Shadows */
.border { border-width: 1px; border-style: solid; border-color: #e2e8f0; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-red-100 { border-color: #fee2e2; }
.border-red-200 { border-color: #fecaca; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Interactive Hover States */
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:text-slate-700:hover { color: #334155; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }

/* Buttons */
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25rem;
  box-sizing: border-box;
}

.btn-primary, button[type="submit"].btn-primary, input[type="submit"].btn-primary {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover, button[type="submit"].btn-primary:hover {
  background-color: #4338ca !important;
}

.btn-default, .btn-secondary, button[name="wizard_goto_step"] {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

.btn-default:hover, .btn-secondary:hover, button[name="wizard_goto_step"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

.btn-link, a.btn-link {
  background: transparent !important;
  border: none !important;
  color: #6366f1 !important;
  padding: 0.5rem 0.75rem !important;
  text-decoration: none !important;
  box-shadow: none !important;
  font-size: 0.875rem;
}

.btn-link:hover, a.btn-link:hover {
  text-decoration: underline !important;
  color: #4338ca !important;
}

/* Inputs & Form Elements */
.twofactor-form input, input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.help-block {
  display: block;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

.actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
