* { box-sizing: border-box; }
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0e1222;
  --muted: #5c637a;
  --primary: #3366ff;
  --primary-600: #2b57d6;
  --border: #e3e6ef;
}
/* Utilidad para ocultar elementos */
.hidden { display: none !important; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); }
.container { max-width: 920px; margin: 0 auto; padding: 24px; }
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: center; padding: 24px; }
.logo { height: 72px; width: auto; display: block; }
.lang-switch { position: absolute; right: 20px; top: 18px; display: flex; gap: 8px; }
.lang-btn { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px; cursor: pointer; display: grid; place-items: center; }
.lang-btn img { display: block; width: 24px; height: 16px; object-fit: cover; border-radius: 3px; }
.lang-btn[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(51,102,255,.15); }
.title { display: none; }
.notice { text-align: center; color: var(--muted); margin: 10px 0 0; font-size: .95rem; }
.tagline { text-align: center; color: var(--muted); margin: 0 0 10px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin: 20px 0; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.card-title { margin: 0 0 14px; font-size: 1.1rem; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
label { font-weight: 600; color: var(--muted); }
input[type="text"], input[type="email"], input[type="file"] { padding: 12px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); }

.dropzone { position: relative; border: 2px dashed var(--border); border-radius: 12px; padding: 24px; background: #fbfcff; color: var(--muted); text-align: center; cursor: pointer; }
.dropzone:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dropzone-content { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); }

.preview { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; margin-top: 12px; }
.preview img { max-width: 140px; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.preview-meta { color: var(--muted); font-size: .9rem; }

.actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.consent { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; max-width: 520px; }
.btn-primary, .btn-secondary, .btn-ghost, button, a[download] { background: var(--primary); color: #fff; padding: 10px 14px; border: 0; border-radius: 10px; text-decoration: none; cursor: pointer; font-weight: 600; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: #111827; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .6; cursor: not-allowed; }

.status { min-height: 20px; margin-top: 8px; color: var(--muted); }
.result.hidden { display: none; }
.result img, #edited-img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; }

.site-footer { padding: 20px 0 32px; color: var(--muted); text-align: center; }

/* Overlay de carga */
.loading { position: fixed; inset: 0; background: rgba(255,255,255,.7); display: grid; place-items: center; z-index: 9999; }
.loading .loading-inner { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.spinner { width: 28px; height: 28px; border: 3px solid #e5e7eb; border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toastr simple */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 10000; }
.toast { background: #111827; color: #fff; padding: 10px 12px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 90vw; }
.toast.info { background: #2563eb; }
.toast.success { background: #059669; }
.toast.warn { background: #d97706; }
.toast.error { background: #b91c1c; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 10001; }
.modal.hidden { display: none !important; }
.modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.4); }
.modal-dialog { position: relative; background: var(--card); border:1px solid var(--border); border-radius:14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); width: min(720px, 92vw); margin: 10vh auto; padding: 16px; }
.modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.modal-body { color: var(--text); }
.modal-body ul { margin-top: 6px; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; margin-top: 12px; }

