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

:root{
  --bg: #0a0c0b;
  --bg-panel: #14181a;
  --bg-panel-2: #1b2022;
  --line: #2a3133;
  --green: #22b04c;
  --green-dim: #16311f;
  --red: #d13438;
  --blue: #2f7fe0;
  --silver: #c7cdd1;
  --text: #eef1f0;
  --text-dim: #8b959a;
  --text-faint: #5c6668;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(34,176,76,0.08), transparent 60%),
    var(--bg);
  color:var(--text);
  font-family:'Inter', sans-serif;
  min-height:100vh;
  padding:28px 20px 60px;
}
a{color:var(--green);}
.wrap{max-width:1180px; margin:0 auto;}

/* ---------- Header ---------- */
header{
  display:flex;
  align-items:center;
  gap:18px;
  padding-bottom:22px;
  border-bottom:1px solid var(--line);
  margin-bottom:22px;
  flex-wrap:wrap;
}
.logo-img{
  width:64px; height:64px; object-fit:contain;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  flex-shrink:0;
}
.brand{flex:1; min-width:200px;}
.brand h1{
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  font-size:26px;
  letter-spacing:0.5px;
  line-height:1;
}
.brand h1 .accent{color:var(--green);}
.brand .stripes{display:flex; gap:6px; margin-top:8px; width:180px;}
.brand .stripes span{height:4px; flex:1; border-radius:2px;}
.brand .stripes .s-red{background:var(--red);}
.brand .stripes .s-blue{background:var(--blue);}
.brand .tag{color:var(--text-dim); font-size:13px; margin-top:8px;}

.nav{display:flex; align-items:center; gap:14px;}
.nav a.navbtn, .nav button{
  width:36px; height:36px;
  border-radius:6px;
  border:1px solid var(--line);
  background:var(--bg-panel);
  color:var(--text);
  font-size:16px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  transition:border-color .15s, background .15s;
}
.nav a.navbtn:hover, .nav button:hover{border-color:var(--green); background:var(--bg-panel-2);}
.nav .month-label{
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  font-size:19px;
  min-width:170px;
  text-align:center;
  text-transform:capitalize;
}
.nav .today-btn, .nav a.today-btn{
  width:auto; padding:0 14px; font-size:12px; font-family:'Rajdhani',sans-serif;
  font-weight:700; letter-spacing:0.4px; text-transform:uppercase;
}
.admin-link{
  font-size:12px; color:var(--text-faint); text-decoration:none;
  border:1px solid var(--line); border-radius:6px; padding:8px 12px;
  font-family:'Rajdhani',sans-serif; font-weight:600; letter-spacing:0.3px;
}
.admin-link:hover{color:var(--text); border-color:var(--green);}

/* ---------- Registration notice ---------- */
.registro-banner{
  background:var(--green-dim);
  border:1px solid var(--green);
  border-radius:8px;
  padding:12px 16px;
  font-size:13.5px;
  margin-bottom:22px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.registro-banner .icon{color:var(--green); font-size:16px; flex-shrink:0;}
.registro-banner a{color:var(--green); font-weight:600;}
.registro-note{
  font-size:12px; color:var(--text-dim); margin-top:8px;
  border-top:1px dashed var(--line); padding-top:8px;
}
.registro-note a{color:var(--blue);}

/* ---------- Layout ---------- */
.grid-layout{
  display:grid;
  grid-template-columns:1.7fr 1fr;
  gap:22px;
  align-items:start;
}
@media (max-width:820px){
  .grid-layout{grid-template-columns:1fr;}
}

.panel{
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}

/* ---------- Calendar ---------- */
.cal-weekdays{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  border-bottom:1px solid var(--line);
}
.cal-weekdays div{
  text-align:center;
  font-size:11px;
  letter-spacing:0.6px;
  color:var(--text-faint);
  padding:10px 0;
  font-family:'Rajdhani',sans-serif;
  font-weight:600;
}
.cal-days{
  display:grid;
  grid-template-columns:repeat(7,1fr);
}
.day-cell{
  min-height:84px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:8px;
  position:relative;
  text-decoration:none;
  color:var(--text);
  display:block;
  transition:background .12s;
}
.day-cell:nth-child(7n){border-right:none;}
.day-cell:hover{background:var(--bg-panel-2);}
.day-cell.outside{color:var(--text-faint); opacity:0.35;}
.day-cell.today{background:rgba(34,176,76,0.08);}
.day-cell.today .day-num{color:var(--green); font-weight:700;}
.day-cell.selected{outline:1.5px solid var(--green); outline-offset:-1.5px;}
.day-num{font-size:13px; font-weight:500;}
.day-dots{display:flex; gap:3px; margin-top:8px; flex-wrap:wrap;}
.dot{width:6px; height:6px; border-radius:50%; display:inline-block;}
.dot.cumpleanos{background:var(--green);}
.dot.evento{background:var(--blue);}
.dot.otro{background:var(--red);}

/* ---------- Sidebar / lists ---------- */
.sidebar-section{padding:18px 18px 6px;}
.sidebar-title{
  font-family:'Rajdhani',sans-serif;
  font-weight:700;
  font-size:14px;
  letter-spacing:0.4px;
  color:var(--text-dim);
  margin-bottom:12px;
}
.upcoming-list{padding:0 18px 18px; display:flex; flex-direction:column; gap:8px; max-height:420px; overflow-y:auto;}
.upcoming-item{
  background:var(--bg-panel-2);
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  display:flex; gap:10px;
}
.upcoming-item .type-bar{width:4px; align-self:stretch; border-radius:2px; flex-shrink:0;}
.upcoming-item .type-bar.cumpleanos{background:var(--green);}
.upcoming-item .type-bar.evento{background:var(--blue);}
.upcoming-item .type-bar.otro{background:var(--red);}
.upcoming-item .info{flex:1; min-width:0;}
.upcoming-item .info .t{font-size:13.5px; font-weight:500;}
.upcoming-item .info .d{font-size:11.5px; color:var(--text-dim); margin-top:2px;}
.upcoming-item .info .n{font-size:12px; color:var(--text-dim); margin-top:6px; line-height:1.4;}
.empty-note{color:var(--text-faint); font-size:13px; padding:6px 18px 18px;}
.divider{height:1px; background:var(--line); margin:0 18px;}

/* ---------- Day detail panel (public) ---------- */
.day-detail{padding:18px;}
.day-detail h2{
  font-family:'Rajdhani',sans-serif; font-weight:700; font-size:17px;
  text-transform:capitalize; margin-bottom:12px;
}
.day-detail .empty-note{padding:0;}

/* ---------- Admin ---------- */
.login-wrap{
  max-width:360px; margin:80px auto 0;
  background:var(--bg-panel); border:1px solid var(--line); border-radius:10px;
  padding:28px;
}
.login-wrap h2{font-family:'Rajdhani',sans-serif; font-weight:700; margin-bottom:18px; text-align:center;}
.field{margin-bottom:14px;}
.field label{display:block; font-size:11.5px; color:var(--text-dim); margin-bottom:6px; letter-spacing:0.3px;}
.field input[type=text], .field input[type=date], .field input[type=password], .field textarea{
  width:100%;
  background:var(--bg-panel-2);
  border:1px solid var(--line);
  border-radius:6px;
  padding:9px 10px;
  color:var(--text);
  font-family:'Inter',sans-serif;
  font-size:13.5px;
}
.field textarea{resize:vertical; min-height:64px;}
.field input:focus, .field textarea:focus{outline:none; border-color:var(--green);}
.type-choice{display:flex; gap:8px;}
.type-choice label{
  flex:1;
  display:flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 4px;
  font-size:12px;
  cursor:pointer;
  color:var(--text-dim);
}
.type-choice input{display:none;}
.type-choice .sw{width:8px; height:8px; border-radius:50%;}
.type-choice .sw.cumpleanos{background:var(--green);}
.type-choice .sw.evento{background:var(--blue);}
.type-choice .sw.otro{background:var(--red);}
.type-choice input:checked + span{color:var(--text);}
.type-choice label:has(input:checked){border-color:var(--green); background:var(--green-dim);}
.btn{
  background:var(--green); border:none; color:#06170c;
  font-family:'Rajdhani',sans-serif; font-weight:700; font-size:14px; letter-spacing:0.4px;
  padding:11px 16px; border-radius:6px; cursor:pointer; text-decoration:none;
  display:inline-block; text-align:center;
}
.btn:hover{filter:brightness(1.1);}
.btn.full{width:100%;}
.btn.secondary{background:transparent; border:1px solid var(--line); color:var(--text-dim);}
.btn.danger{background:var(--red); color:#fff;}
.msg{font-size:13px; padding:10px 14px; border-radius:6px; margin-bottom:16px;}
.msg.ok{background:var(--green-dim); border:1px solid var(--green); color:var(--text);}
.msg.err{background:#3a1414; border:1px solid var(--red); color:var(--text);}

.admin-table{width:100%; border-collapse:collapse; font-size:13.5px;}
.admin-table th{
  text-align:left; font-family:'Rajdhani',sans-serif; font-weight:600; color:var(--text-dim);
  font-size:11.5px; letter-spacing:0.4px; padding:10px 12px; border-bottom:1px solid var(--line);
}
.admin-table td{padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top;}
.admin-table tr:last-child td{border-bottom:none;}
.admin-table .note-cell{color:var(--text-dim); font-size:12.5px; max-width:260px;}
.admin-table .actions{white-space:nowrap;}
.admin-table .actions a{font-size:12px; margin-right:10px; text-decoration:none;}
.admin-table .actions a.del{color:var(--red);}
.badge{
  display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px;
  font-family:'Rajdhani',sans-serif; font-weight:600;
}
.badge.cumpleanos{background:var(--green-dim); color:var(--green);}
.badge.evento{background:rgba(47,127,224,0.15); color:var(--blue);}
.badge.otro{background:rgba(209,52,56,0.15); color:var(--red);}

.top-actions{display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; flex-wrap:wrap; gap:10px;}

::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-thumb{background:var(--line); border-radius:4px;}
