  /* ===== Variables ===== */
  :root {
    --bg: #faf3e0;
    --panel: #fffefb;
    --text: #3b2b1a;
    --muted: #7c6b5a;
    --gold: #d4af37;
    --vino: #9a0f19;
    --gold-dark: #9a7920;
    --line: #e8dcc3;
    --hover: #fff7de;
  }

  /* ===== Global ===== */
  * { box-sizing: border-box; }
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    font-family: "Poppins", "Segoe UI", sans-serif;
    margin: 0;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--bg) url('https://www.transparenttextures.com/patterns/cream-paper.png');
    background-size: 400px;
    opacity: 0.9;
    z-index: -1;
  }

  /* ===== Topbar ===== */
  #topbar {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: linear-gradient(90deg, #fffefb 0%, #fff4d9 50%, #fffefb 100%);
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 8px 24px rgba(212,175,55,.25);
    position: relative;
  }
  #topbar::before {
    content:"";
    position:absolute;
    left:0; right:0; bottom:0;
    height:10px;
    background: repeating-linear-gradient(
      90deg,
      var(--gold) 0 20px,
      transparent 20px 30px,
      var(--gold) 30px 40px
    );
    opacity:.3;
  }

  /* ===== Marca (logo + título) ===== */
  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  .brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
  }
  .brand-title {
    margin: 0;
    font-family: "Cinzel Decorative", serif;
    font-weight: 700;
    color: var(--vino);
    letter-spacing: .5px;
    text-shadow: 0 0 4px rgba(212,175,55,.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ===== Botones ===== */
  .btn {
    padding: 10px 18px;
    border-radius: 30px;
    border: 2px solid var(--gold);
    background: var(--vino);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
  }
  .btn:hover {
    background: var(--gold);
    color: #1f1200;
    transform: translateY(-2px);
  }
  .btn.danger { background: #b00020; border-color: #e2a2a2; }
  .btn.danger:hover { background: #e33; }

  /* ===== Calendario ===== */
  .fc-container {
    background: var(--panel);
    border-radius: 16px;
    border: 4px double var(--gold);
    box-shadow: 0 15px 30px rgba(212,175,55,.3);
    max-width: 1100px;
    width: 95%;
    margin: 30px auto;
    padding: 26px;
  }
  .fc { font-size:15px; color: var(--text); width: 100% !important; overflow-x: hidden !important; }
  .fc-toolbar-title {
    font-family:"Cinzel Decorative", serif;
    font-size:24px !important;
    color:var(--gold-dark) !important;
    text-shadow: 0 0 4px rgba(212,175,55,.3);
  }
  .fc .fc-button {
    background: var(--vino) !important;
    border: 1px solid var(--gold) !important;
    color: #fff !important;
    font-weight:600 !important;
    border-radius: 30px !important;
  }
  .fc .fc-button:hover {
    background: var(--gold) !important;
    color: #1f1200 !important;
  }
  .fc-header-toolbar {
    display: flex;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px;
  }

  /* ===== Modal ===== */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  .modal {
    background: var(--panel);
    border: 3px double var(--gold);
    border-radius: 18px;
    width: 440px;
    padding: 28px 30px;
    box-shadow: 0 18px 40px rgba(212,175,55,.3);
    animation: fadeIn 0.3s ease;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
  }
  

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, var(--panel) 85%, rgba(255,255,255,0));
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .modal-header h3 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 20px;
    font-family: "Cinzel Decorative", serif;
    color: var(--vino);
    text-shadow: 0 0 3px rgba(212,175,55,0.2);
  }
  .modal-header button {
    background: var(--vino);
    border: 2px solid var(--gold);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-header button:hover {
    background: var(--gold);
    color: #1f1200;
    animation: brilloDorado 1.4s linear infinite;
  }
  @keyframes brilloDorado {
    0%,100% { box-shadow: 0 0 0px var(--gold); }
    50% { box-shadow: 0 0 14px var(--gold); }
  }

  .form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
  label { font-weight: 600; color: var(--gold-dark); }
  input, textarea, select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
  }
  input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.18);
  }

  @keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

  /* ===== Responsive ===== */
  @media (max-width: 600px) {
    #topbar {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
    }
    .brand { justify-content: center; gap: 8px; }
    .brand-logo { width: 38px; height: 38px; }
    .brand-title { font-size: 20px; }
    #btnNuevo {
      width: 90%;
      padding: 12px;
      border-radius: 14px;
      font-weight: 700;
    }
    .fc-container {
      width: 94%;
      margin: 14px auto;
      padding: 14px;
    }
    .modal {
      width: calc(100vw - 20px);
      padding: 22px 18px;
      border-radius: 20px;
    }
    input, textarea, select { font-size: 16px; padding: 12px; border-radius: 12px; }
    .actions { flex-direction: column; gap: 10px; }
    .actions .btn { width: 100%; padding: 12px; font-size: 16px; border-radius: 14px; }
  }

  .fc-container {
    min-height: 550px; 
  }
  @media (max-width: 600px) {
    .fc-container {
      min-height: 650px;
    }
    #calendar {
      min-height: 600px !important;
    }
  }
    input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    width: 60px;
    height: 36px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background-color: transparent;
    cursor: pointer;
    overflow: hidden;
  }
  input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
  }
  input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 8px;
  }

  .icon-estrella-xl {
  width: 96px !important;     
  height: 96px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.swal-star-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.swal-ring {
  --hole: 65%;
  --hole-edge: calc(var(--hole) + 2%);
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.25), rgba(255,255,255,0) 60%),
    conic-gradient(from 0deg, #d4af37, #b7891c, #d4af37);
  mask: radial-gradient(circle, transparent var(--hole), #000 var(--hole-edge));
  filter: drop-shadow(0 0 8px rgba(212,175,55,.35));
  animation: giroAnillo 2.5s linear infinite;
}

.swal-star {
  width: 100%;
  height: 100%;
  fill: #d4af37;
  filter: drop-shadow(0 0 10px rgba(212,175,55,.45));
  transform-origin: 50% 50%;
  animation: giroEstrella 1.3s linear infinite;
}

@keyframes giroEstrella {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes giroAnillo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
