/* ============================================================
   medico.css — Portal Médico Harmant
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --border:    #21262d;
  --border-hi: #30363d;
  --blue:      #2f81f7;
  --blue-dim:  #1f6feb;
  --green:     #3fb950;
  --red:       #f85149;
  --yellow:    #d29922;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --mono:      'DM Mono', monospace;
  --sans:      'DM Sans', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── BODY ── */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(
    ellipse at 20% 50%,
    rgba(47, 129, 247, 0.04) 0%,
    transparent 60%
  );
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--blue);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px rgba(47,129,247,0.5); }
  50%       { box-shadow: 0 0 14px rgba(47,129,247,0.9); }
}

.header-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--border);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── PANEL ── */
.panel {
  width: 100%;
  max-width: 480px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.panel-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-hi);
}

/* ── FIELDS ── */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.field input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input[type="text"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47,129,247,0.15);
}

.field input[type="text"]::placeholder {
  color: var(--border-hi);
}

/* ── DROP ZONE ── */
.dropzone {
  border: 2px dashed var(--border-hi);
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg);
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--blue);
  background: rgba(47,129,247,0.05);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dz-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dz-text {
  font-size: 0.875rem;
  color: var(--muted);
}

.dz-text strong {
  color: var(--blue);
}

.dz-file-name {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dz-file-name.visible {
  display: flex;
}

/* ── BOTÓN SUBMIT ── */
.btn-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: 12px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(47, 129, 247, 0.3);
}

.btn-submit:hover:not(:disabled) {
  background: var(--blue-dim);
  box-shadow: 0 4px 18px rgba(47, 129, 247, 0.45);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── SPINNER ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
#toast {
  margin-top: 1rem;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#toast.ok {
  display: flex;
  background: rgba(63,185,80,0.12);
  border: 1px solid rgba(63,185,80,0.4);
  color: var(--green);
}

#toast.err {
  display: flex;
  background: rgba(248,81,73,0.12);
  border: 1px solid rgba(248,81,73,0.4);
  color: var(--red);
}

#toast.loading {
  display: flex;
  background: rgba(47,129,247,0.1);
  border: 1px solid rgba(47,129,247,0.3);
  color: var(--blue);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  header { padding: 0 1rem; }
  .panel-title { font-size: 1.2rem; }
}
