/* ============================================================
   Óptica Salguero — Referencias de Video
   styles.css
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
  --c-bg:          #F7F8FA;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #F0F2F5;
  --c-border:      #E2E5EA;
  --c-border-strong: #C8CDD6;

  --c-text:        #0D1117;
  --c-text-2:      #4A5568;
  --c-text-3:      #8A96A4;

  --c-accent:      #1A56DB;        /* azul principal */
  --c-accent-soft: #EBF2FF;
  --c-accent-dark: #1240B0;

  --c-alta:        #C53030;
  --c-alta-bg:     #FFF5F5;
  --c-alta-border: #FEB2B2;

  --c-media:       #B7791F;
  --c-media-bg:    #FFFAF0;
  --c-media-border:#FAD78A;

  --c-baja:        #276749;
  --c-baja-bg:     #F0FFF4;
  --c-baja-border: #9AE6B4;

  --c-success:     #276749;
  --c-success-bg:  #F0FFF4;

  --font-display:  'DM Serif Display', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     20px;

  --shadow-card:   0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-focus:  0 0 0 3px rgba(26,86,219,.18);

  --transition:    .18s ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
}

a { color: var(--c-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent-dark); text-decoration: underline; }

/* ----- Container ----- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--c-text);
  color: var(--c-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.01em;
  color: var(--c-text);
}

.brand-sub {
  font-size: 11px;
  color: var(--c-text-3);
  letter-spacing: .01em;
}

.header-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-text-3);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--c-text);
  color: #fff;
  padding: 60px 0 52px;
  position: relative;
  overflow: hidden;
}

/* subtle dot grid texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 18px;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 16px;
}

.hero-title em {
  font-style: italic;
  color: rgba(255,255,255,.55);
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================================
   INSTRUCTIONS BAR
   ============================================================ */
.instructions-bar {
  background: var(--c-accent-soft);
  border-bottom: 1px solid #D6E5FF;
}

.instructions-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
}

.instructions-icon {
  color: var(--c-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.instructions-text {
  font-size: 13.5px;
  color: #1A3A6E;
  line-height: 1.6;
}

.instructions-text strong { font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.main-content {
  padding: 40px 0 80px;
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PANELS SHARED
   ============================================================ */
.panel-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--c-text);
  margin-bottom: 4px;
}

.panel-desc {
  font-size: 13px;
  color: var(--c-text-3);
}

/* ============================================================
   FORM PANEL
   ============================================================ */
.form-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 80px;
}

.panel-header { margin-bottom: 24px; }

/* ----- Fields ----- */
.form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required { color: var(--c-alta); font-size: 14px; }

/* ----- Text Input ----- */
.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  pointer-events: none;
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input::placeholder { color: var(--c-text-3); }

.input:focus {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-focus);
  background: var(--c-surface);
}

.input.error {
  border-color: var(--c-alta);
  box-shadow: 0 0 0 3px rgba(197,48,48,.12);
}

/* ----- Textarea ----- */
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.55;
}

.textarea::placeholder { color: var(--c-text-3); }

.textarea:focus {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-focus);
  background: var(--c-surface);
}

/* ----- Select ----- */
.select-wrap {
  position: relative;
}

.select {
  width: 100%;
  height: 42px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.select:focus {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-focus);
  background: var(--c-surface);
}

.select-arrow {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  pointer-events: none;
}

/* ----- Priority buttons ----- */
.priority-group {
  display: flex;
  gap: 8px;
}

.priority-option { cursor: pointer; }

.priority-radio { display: none; }

.priority-btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

/* default (unselected) state */
.priority-alta  { background: var(--c-surface-2); color: var(--c-text-2); border-color: var(--c-border); }
.priority-media { background: var(--c-surface-2); color: var(--c-text-2); border-color: var(--c-border); }
.priority-baja  { background: var(--c-surface-2); color: var(--c-text-2); border-color: var(--c-border); }

/* selected states via checked radio + sibling */
.priority-radio:checked + .priority-alta  {
  background: var(--c-alta-bg);
  color: var(--c-alta);
  border-color: var(--c-alta-border);
}
.priority-radio:checked + .priority-media {
  background: var(--c-media-bg);
  color: var(--c-media);
  border-color: var(--c-media-border);
}
.priority-radio:checked + .priority-baja  {
  background: var(--c-baja-bg);
  color: var(--c-baja);
  border-color: var(--c-baja-border);
}

/* ----- Field error ----- */
.field-error {
  font-size: 12px;
  color: var(--c-alta);
  min-height: 16px;
}

/* ----- Submit button ----- */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  background: var(--c-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -.01em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 4px;
}

.btn-submit:hover {
  background: #1a1a2e;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transform: translateY(-1px);
}

.btn-submit:active { transform: translateY(0); }

/* ----- Success message ----- */
.success-msg {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--c-success-bg);
  color: var(--c-success);
  border: 1px solid #9AE6B4;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  animation: slideDown .25s ease;
}

.success-msg.show { display: flex; }

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

/* ============================================================
   LIST PANEL
   ============================================================ */
.list-panel { }

.list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* ----- Export button ----- */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-export:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-soft);
}

/* ----- Empty state ----- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 32px;
  background: var(--c-surface);
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--radius-xl);
  color: var(--c-text-3);
}

.empty-icon {
  width: 72px;
  height: 72px;
  background: var(--c-surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--c-border-strong);
}

.empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-2);
  margin-bottom: 6px;
}

.empty-desc { font-size: 13px; }

/* ----- Cards list ----- */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ----- Individual card ----- */
.ref-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: cardIn .3s ease;
}

.ref-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

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

/* Card top row */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Platform badge */
.badge-platform {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--c-text);
  color: #fff;
}

/* Type badge */
.badge-tipo {
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--c-surface-2);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}

/* Priority badge */
.badge-prioridad {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-prioridad.alta  { background: var(--c-alta-bg);  color: var(--c-alta);  border: 1px solid var(--c-alta-border); }
.badge-prioridad.media { background: var(--c-media-bg); color: var(--c-media); border: 1px solid var(--c-media-border); }
.badge-prioridad.baja  { background: var(--c-baja-bg);  color: var(--c-baja);  border: 1px solid var(--c-baja-border); }

/* Card actions */
.card-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-soft); }
.btn-icon.btn-delete:hover { border-color: var(--c-alta); color: var(--c-alta); background: var(--c-alta-bg); }

/* Card link */
.card-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-link a {
  font-size: 13px;
  color: var(--c-accent);
  word-break: break-all;
  font-weight: 400;
}

.card-link a:hover { color: var(--c-accent-dark); }

/* Card comment */
.card-comment {
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.6;
  padding: 12px 14px;
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--c-border-strong);
  margin-bottom: 12px;
}

.card-comment.empty-comment {
  color: var(--c-text-3);
  font-style: italic;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.card-date {
  font-size: 11.5px;
  color: var(--c-text-3);
}

/* Copied tooltip */
.copy-tooltip {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--c-text);
  color: #fff;
  padding: 9px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

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

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  text-align: center;
}

.site-footer p {
  font-size: 13px;
  color: var(--c-text-3);
  line-height: 1.7;
}

.site-footer strong { color: var(--c-text-2); font-weight: 600; }

.footer-note { font-size: 12px; margin-top: 2px; }

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 540px) {

  .header-badge { display: none; }

  .hero { padding: 40px 0 36px; }

  .hero-title { font-size: 28px; }

  .form-panel { padding: 20px 16px; }

  .field-row { grid-template-columns: 1fr; }

  .priority-group { flex-wrap: wrap; }

  .priority-btn { padding: 7px 13px; }

  .list-header { flex-wrap: wrap; }

  .card-top { flex-wrap: wrap; }

  .card-actions { margin-left: auto; }

  .ref-card { padding: 16px; }
}
