/* ==========================================================================
   Janecitap Shop · Professional Kawaii Pastel
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Quicksand:wght@500;600;700&display=swap');

:root {
  --pink-100: #ffe0ef;
  --pink-200: #ffbed8;
  --pink-300: #ff93c0;
  --pink-400: #ff6aaa;
  --pink-500: #f03d90;
  --pink-600: #d4276e;
  --pink-700: #a81855;
  --lav-100:  #ede8ff;
  --lav-300:  #c9beff;
  --lav-500:  #9b8de8;
  --cream:    #fff8f5;
  --blush:    #ffd6e8;

  --bg:      #fef2f8;
  --surface: rgba(255,255,255,.88);
  --text:    #2e1020;
  --text-2:  #6b3050;
  --muted:   #a06080;
  --border:  rgba(230,160,195,.45);

  --ok-bg:    #d8f5e8; --ok-text:  #155e38;
  --err-bg:   #ffe0e8; --err-text: #8b1530;

  --shadow-sm: 0 2px 12px rgba(200,100,150,.14);
  --shadow:    0 6px 28px rgba(200,100,150,.18);
  --shadow-lg: 0 14px 50px rgba(200,100,150,.24);

  --r: 20px; --r-sm: 12px; --r-lg: 28px;
}

:root.dark {
  --bg:      #1a0812;
  --surface: rgba(255,255,255,.065);
  --text:    #ffedf6;  --text-2:  #f0b8d4;
  --muted:   rgba(255,190,220,.60);
  --border:  rgba(255,130,185,.18);
  --shadow-sm: 0 2px 14px rgba(0,0,0,.40);
  --shadow:    0 6px 32px rgba(0,0,0,.48);
  --shadow-lg: 0 16px 60px rgba(0,0,0,.56);
  --ok-bg: rgba(150,255,200,.10); --ok-text: #6fe4aa;
  --err-bg: rgba(255,150,180,.10); --err-text: #ffaac0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ─── FONDO + LOGO DIFUMINADO ─── */
body {
  font-family: 'Quicksand', 'Nunito', system-ui, sans-serif;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 600px at 15% 0%,   rgba(255,180,220,.32), transparent 55%),
    radial-gradient(ellipse 800px 600px at 90% 100%, rgba(200,180,255,.26), transparent 55%),
    radial-gradient(ellipse 600px 500px at 50% 50%,  rgba(255,230,240,.18), transparent 60%);
}

/* Logo Janecitap como marca de agua centrada */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('/assets/melody-bg.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 780px auto;
  opacity: .08;
  filter: blur(1.5px) saturate(.6);
  animation: floatLogo 4s ease-in-out infinite;
}

/* Capa decorativa: corazones y moñitos en patrón */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23e8559a' opacity='0.11'%3E%3Cpath d='M20 36c0-5 4.5-9 9-9s7 3.5 7 3.5S38 27 42.5 27c4.5 0 9 4 9 9 0 9-16.5 19-16.5 19S20 45 20 36z'/%3E%3Cpath d='M80 18c-6-6-15-4-13 3s13 7 13 7 11-0 13-7 7-9 1-3z M77 28l6 0 -1 12 -4 0z M73 40l14 0 0 3 -14 0z'/%3E%3Cpath d='M100 88c0-3.5 3-6.5 6.5-6.5s5 2.5 5 2.5 1.5-2.5 5-2.5 6.5 3 6.5 6.5c0 6.5-11.5 13-11.5 13S100 94.5 100 88z'/%3E%3Ccircle cx='28' cy='105' r='4.5'/%3E%3Ccircle cx='23' cy='100' r='3'/%3E%3Ccircle cx='33' cy='100' r='3'/%3E%3Ccircle cx='23' cy='110' r='3'/%3E%3Ccircle cx='33' cy='110' r='3'/%3E%3Ccircle cx='28' cy='105' r='2.5' fill='%23fff' opacity='0.6'/%3E%3Cpath d='M58 88c0-2 2-4 4-4s3 1.5 3 1.5 1-1.5 3-1.5 4 2 4 4c0 4-7 8-7 8s-7-4-7-8z' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 140px;
  background-repeat: repeat;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
.page { padding: 30px 0 60px; }

/* ═══ HEADER ═══ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,248,253,.86);
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 18px rgba(210,120,170,.10);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.06rem;
  text-decoration: none !important;
}
.brand .logo-img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,150,195,.55);
  box-shadow: 0 3px 12px rgba(240,80,150,.22);
}
.brand b {
  background: linear-gradient(120deg, var(--pink-600), var(--pink-400), var(--lav-500));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 6px 13px; border-radius: 50px;
  font-weight: 700; font-size: .84rem; color: var(--text-2);
  border: 1px solid transparent; transition: all .18s;
}
.nav-link:hover { background: var(--pink-100); border-color: var(--pink-200); color: var(--pink-600); text-decoration: none; }
.nav-link.active { background: var(--blush); border-color: var(--pink-300); color: var(--pink-700); }

.theme-toggle {
  padding: 6px 10px; border-radius: 50px; cursor: pointer;
  background: rgba(255,240,248,.8); border: 1px solid var(--border);
  font-size: .9rem; transition: all .18s; color: var(--text);
}
.theme-toggle:hover { background: var(--blush); border-color: var(--pink-300); transform: scale(1.06); }

/* ═══ LAYOUT ═══ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

/* ═══ CARDS ═══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow .22s;
  animation: fadeUp .45s ease both;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3) { animation-delay: .16s; }

.card::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,230,.20), transparent 65%);
  pointer-events: none;
}

.card h1 {
  font-family: 'Nunito', sans-serif; font-weight: 900;
  font-size: 1.65rem; line-height: 1.25; margin-bottom: 6px;
  background: linear-gradient(120deg, var(--pink-600), var(--pink-400), var(--lav-500));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.card h2 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.helper { color: var(--muted); margin-bottom: 18px; font-size: .88rem; line-height: 1.55; }

/* ═══ INPUTS ═══ */
.form { display: grid; gap: 11px; }
.field-label { display: block; font-weight: 800; font-size: .77rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }

.input, select, textarea {
  width: 100%; padding: 11px 15px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: rgba(255,248,252,.85); color: var(--text);
  font-family: inherit; font-size: .9rem; font-weight: 600; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input::placeholder { color: var(--muted); font-weight: 500; }
.input:focus, select:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(240,61,144,.13); background: #fff; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23d4276e' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}

.icon-input { position: relative; }
.icon-input .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: .95rem; pointer-events: none; }
.icon-input .input { padding-left: 38px; }

/* ═══ BOTONES ═══ */
.btn {
  border: 0; border-radius: 50px; padding: 12px 22px;
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: .92rem;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s, filter .16s, box-shadow .16s;
}
.btn:active { transform: translateY(2px) scale(.98); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  box-shadow: 0 6px 22px rgba(212,39,110,.28);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
  transform: skewX(-18deg); transition: left .55s;
}
.btn-primary:hover::after { left: 170%; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212,39,110,.34); }

.btn-ghost { background: var(--pink-100); color: var(--pink-700); border: 1px solid var(--pink-300); }
.btn-ghost:hover { background: var(--blush); transform: translateY(-1px); }

/* ═══ MENSAJES ═══ */
.msg { border-radius: var(--r-sm); padding: 10px 14px; font-weight: 700; font-size: .86rem; display: flex; align-items: center; gap: 8px; }
.msg.ok  { background: var(--ok-bg);  color: var(--ok-text);  border: 1px solid rgba(80,180,120,.22); }
.msg.ok::before  { content: '✓'; font-size: 1rem; }
.msg.err { background: var(--err-bg); color: var(--err-text); border: 1px solid rgba(220,80,110,.18); }
.msg.err::before { content: '✕'; font-size: 1rem; }

/* ═══ TABLAS ═══ */
table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--r-sm); border: 1px solid var(--border); overflow: hidden; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .87rem; }
th { text-align: left; color: var(--muted); font-weight: 800; font-size: .76rem; letter-spacing: .5px; text-transform: uppercase; background: rgba(255,240,248,.6); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,220,240,.15); }

/* ═══ BADGES ═══ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 50px; font-size: .74rem; font-weight: 800; background: var(--blush); color: var(--pink-700); border: 1px solid var(--pink-200); }

/* ═══ CÓDIGO ═══ */
.code-box { background: rgba(255,240,250,.9); border: 1.5px dashed var(--pink-300); border-radius: var(--r-sm); padding: 16px 20px; font-family: 'Courier New', monospace; font-weight: 700; font-size: 1.5rem; text-align: center; letter-spacing: 6px; color: var(--pink-700); }

/* ═══ LOGIN ═══ */
.login-wrap { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 16px; }

.login-logo { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 10px 28px rgba(240,80,150,.28)); animation: floatLogo 4s ease-in-out infinite; }
@keyframes floatLogo { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.login-card {
  width: 100%; max-width: 400px;
  background: rgba(255,252,255,.92);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(230,160,200,.40);
  border-radius: 30px; padding: 36px 30px;
  box-shadow: 0 20px 60px rgba(210,100,150,.20), 0 0 0 1px rgba(255,255,255,.5) inset;
  text-align: center;
}
.login-card h1 { font-size: 1.85rem; margin-bottom: 5px; }
.login-card .helper { margin-bottom: 20px; }
.login-card .form { text-align: left; }
.login-card .btn-primary { width: 100%; padding: 13px; font-size: .96rem; border-radius: 16px; }
.login-deco { font-size: 1rem; margin-bottom: 10px; opacity: .40; letter-spacing: 10px; color: var(--pink-500); }

.login-info { width: 100%; max-width: 400px; background: linear-gradient(135deg, rgba(255,210,232,.72), rgba(220,210,255,.62)); border: 1px solid rgba(225,170,210,.40); border-radius: 22px; padding: 20px 24px; text-align: center; backdrop-filter: blur(12px); }
.login-info h2 { font-family: 'Nunito',sans-serif; font-weight: 800; font-size: .95rem; margin-bottom: 6px; color: var(--pink-700); }
.login-info p { font-size: .82rem; color: var(--text-2); line-height: 1.55; }

/* ═══ APP SELECTOR ═══ */
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-opt {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px;
  border-radius: 14px; border: 1px solid var(--border);
  background: rgba(255,248,252,.7); font-weight: 700; font-size: .86rem;
  color: var(--text-2); transition: all .18s; cursor: pointer;
}
.app-opt:hover { background: var(--pink-100); border-color: var(--pink-300); color: var(--pink-600); }
.app-opt.selected { background: var(--blush); border-color: var(--pink-400); color: var(--pink-700); box-shadow: 0 2px 10px rgba(240,80,150,.14); }
.app-opt .app-icon { font-size: 1.2rem; }

/* Info card panel */
.info-card { background: linear-gradient(135deg, rgba(255,210,232,.60), rgba(220,210,255,.55)); border: 1px solid rgba(225,175,215,.40); backdrop-filter: blur(10px); }
.info-card h2 { background: linear-gradient(120deg, var(--pink-700), var(--lav-500)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ═══ FOOTER ═══ */
.site-footer { border-top: 1px solid var(--border); background: rgba(255,248,253,.78); backdrop-filter: blur(12px); position: relative; z-index: 1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-size: .78rem; color: var(--muted); font-weight: 600; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: rgba(255,230,245,.3); }
::-webkit-scrollbar-thumb { background: var(--pink-300); border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink-400); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

/* ═══ DARK MODE ═══ */
:root.dark .site-header { background: rgba(26,8,18,.88); }
:root.dark .card { background: rgba(255,255,255,.055); }
:root.dark .login-card { background: rgba(35,12,26,.90); box-shadow: 0 20px 60px rgba(0,0,0,.50); }
:root.dark .login-info { background: linear-gradient(135deg,rgba(255,150,190,.10),rgba(180,160,255,.10)); }
:root.dark .input, :root.dark select { background: rgba(255,255,255,.07); border-color: rgba(255,130,180,.20); }
:root.dark .app-opt { background: rgba(255,255,255,.05); }
:root.dark .app-opt.selected { background: rgba(255,100,160,.18); border-color: var(--pink-400); }
:root.dark .info-card { background: linear-gradient(135deg,rgba(255,130,180,.10),rgba(160,140,255,.10)); }
:root.dark .badge { background: rgba(255,100,160,.15); color: #ffb8d8; border-color: rgba(255,100,160,.25); }
:root.dark th { background: rgba(255,255,255,.04); }
:root.dark tbody tr:hover { background: rgba(255,255,255,.04); }
:root.dark .site-footer { background: rgba(26,8,18,.75); }
:root.dark body::before { opacity: .055; filter: blur(2px) saturate(.45); }

@media (max-width: 480px) {
  .login-logo { width: 100px; height: 100px; }
  .login-card { padding: 26px 20px; border-radius: 24px; }
  .card h1 { font-size: 1.4rem; }
}
