/* =========================================
   Biblioteca de Prompts – Contador 4.0
   (Restaurado Notion-like, header estático, responsive)
   ========================================= */

/* ---------- Variables ---------- */
:root{
  --naranja: #E86C2A;
  --azul: #0A2342;
  --gris-claro: #F8F9FA;
  --gris-medio: #E0E0E0;
  --texto: #222;
  --blanco: #fff;
  --shadow: rgba(10,10,10,0.06);
}

/* ---------- Reset / base ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family: "Lato", sans-serif;
  margin:0;
  background: var(--gris-claro);
  color:var(--texto);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
/* ===============================
   🌿 Header refinado final
=============================== */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0.8rem 1.8rem;
  background: #ffffffee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.site-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: #1b1b1b;
  font-size: 1.4rem;
  margin: 0 0 0 12px;
}

.site-title span {
  color: #e86c2a;
}

/* 🔸 Botones del header */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary,
.btn-add {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Ver o editar en Google Sheets */
.btn-secondary {
  background: #fff;
  border: 2px solid #e86c2a;
  color: #e86c2a;
}

.btn-secondary:hover {
  background: #e86c2a;
  color: #fff;
  box-shadow: 0 3px 8px rgba(232, 108, 42, 0.3);
  transform: translateY(-1px);
}

/* Nuevo Prompt */
.btn-add {
  background: #e86c2a;
  color: #fff;
  border: none;
}

.btn-add:hover {
  background: #cf5d22;
  box-shadow: 0 3px 8px rgba(232, 108, 42, 0.3);
  transform: translateY(-1px);
}

/* 🔹 Responsive móvil */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 1rem;
  }

  .site-logo {
    height: 38px;
  }

  .site-title {
    font-size: 1.1rem;
    text-align: center;
  }

  .header-buttons {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .btn-add,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}





 




  

/* ========== MAIN (space below header) ========== */
.app-container{
  max-width:1100px;
  margin: 110px auto 40px; /* leave space for fixed header */
  padding: 0 18px 36px;
}

/* ========== Controls (search + export) ========== */
.controls{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom: 18px;
}

.search-wrap{ flex:1 1 420px; }
#searchInput{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--gris-medio);
  background:#fff;
  font-size:0.95rem;
}

/* actions */
.actions-wrap{ display:flex; gap:10px; align-items:center; }

/* ========== Prompt list: Notion-like grid ========== */
.prompt-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:20px;
}

/* Card */
.prompt-item{
  background:var(--blanco);
  border-radius:12px;
  padding:18px;
  border:1px solid #f0f0f0;
  box-shadow: 0 10px 22px var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  cursor:pointer;
  min-height:72px;
  display:flex;
  align-items:center;
}

.prompt-item:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(10,10,10,0.12);
  border-color: rgba(232,108,42,0.12);
}

.prompt-item.fixed{
  border-left: 4px solid var(--naranja);
}

.prompt-item h3{
  margin:0;
  font-size:1.03rem;
  font-weight:700;
  color:var(--azul);
  font-family:"Poppins", sans-serif;
}

/* ========== Modal & overlay ========== */
.modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  display:none;
  z-index:1190;
}

.modal{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%) scale(.98);
  width:92%;
  max-width:760px;
  max-height:86vh;
  background:var(--blanco);
  border-radius:12px;
  box-shadow: 0 24px 48px rgba(12,20,30,0.18);
  overflow:hidden;
  display:none;
  z-index:1200;
  transition: transform .22s ease, opacity .22s ease;
}

.modal.active{ display:block; transform:translate(-50%,-50%) scale(1); }
.modal-overlay.active{ display:block; }

.modal-content{
  padding:22px;
  max-height:86vh;
  overflow:auto;
  position:relative;
}

.close-btn{
  position:absolute;
  right:12px;
  top:12px;
  border:none;
  background:transparent;
  font-size:22px;
  cursor:pointer;
  color:var(--azul);
}

/* form styles inside modal */
.modal-content h2{
  margin:0 0 10px 0;
  font-family:"Poppins", sans-serif;
  font-weight:900;
  color:var(--azul);
  font-size:1.1rem;
}

.modal-content label{
  display:block;
  margin-top:12px;
  color:var(--azul);
  font-weight:600;
  font-size:0.9rem;
}

.modal-content input,
.modal-content textarea,
.modal-content select{
  width:100%;
  margin-top:8px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--gris-medio);
  font-size:0.95rem;
  font-family:inherit;
}

.modal-content textarea{ min-height:110px; resize:vertical; }

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

/* ========== Footer ========== */
.app-footer{
  margin: 40px auto 24px;
  padding:18px 12px;
  background:var(--blanco);
  border-top:1px solid #ececec;
  text-align:center;
  color:#6b6b6b;
  font-size:0.95rem;
}
.footer-icon{ width:44px; height:auto; display:block; margin:0 auto 10px; }

/* ========== Responsive ========== */
@media (max-width:900px){
  .app-container{ margin: 120px auto 40px; }
  .site-logo{ height:48px; }
}
@media (max-width:600px){
  .site-logo{ height:42px; margin-right:6px; }
  .site-title{ font-size:0.95rem; }
  .app-container{ margin: 110px 12px 28px; }
  .prompt-list{ grid-template-columns: 1fr; }
  .modal{ width:96%; max-width:520px; }
  #searchInput{ font-size:0.95rem; padding:10px 12px; }
}
/* ===========================
   🔧 Ajuste responsivo del logo
=========================== */
.site-logo {
  height: 52px;
  transition: all 0.3s ease;
}

/* En pantallas pequeñas, reducir tamaño */
@media (max-width: 600px) {
  .site-logo {
    height: 40px;
  }
}
/* ===============================
   🔹 Header optimizado con 2 botones
=============================== */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.site-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #333;
  font-size: 1.2rem;
  margin-left: 10px;
}

.site-title span {
  color: #E86C2A;
}

/* --- Botones del header --- */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-add,
.btn-secondary {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Botón “Nuevo Prompt” */
.btn-add {
  background: #E86C2A;
  color: #fff;
  border: none;
}

.btn-add:hover {
  background: #cf5d22;
  transform: translateY(-1px);
}

/* Botón “Ver o editar en Google Sheets” */
.btn-secondary {
  background: transparent;
  border: 2px solid #E86C2A;
  color: #E86C2A;
}

.btn-secondary:hover {
  background: #E86C2A;
  color: #fff;
}

/* 🔹 Móvil */
@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .site-logo {
    height: 34px;
  }

  .site-title {
    font-size: 1rem;
    text-align: center;
  }

  .header-buttons {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .btn-add,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
/* ===============================
   🔹 HEADER MODERNO FIJO
=============================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.site-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #222;
  font-size: 1.4rem;
}

.site-title span {
  color: #E86C2A;
}

/* --- Botones del header --- */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-add,
.btn-secondary {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Botón “Nuevo Prompt” */
.btn-add {
  background: #E86C2A;
  color: #fff;
  border: none;
}

.btn-add:hover {
  background: #cf5d22;
  transform: translateY(-1px);
}

/* Botón “Ver o editar en Google Sheets” */
.btn-secondary {
  background: transparent;
  border: 2px solid #E86C2A;
  color: #E86C2A;
}

.btn-secondary:hover {
  background: #E86C2A;
  color: #fff;
}

/* 🔹 Móvil */
@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    gap: 8px;
  }

  .site-title {
    font-size: 1.1rem;
    text-align: center;
  }

  .header-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-add,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
