/* =============================
   STYLE — Planeja+ (elegante e responsivo)
   ============================= */
:root{
  --bg:#0f1115;
  --card:#161a22;
  --muted:#a9b0be;
  --text:#e9edf5;
  --line:#242b3a;
  --accent:#7c5cff;
  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% 10%, rgba(124,92,255,.18), transparent 60%),
              radial-gradient(1000px 600px at 80% 30%, rgba(46,204,113,.10), transparent 60%),
              var(--bg);
  color:var(--text);
}
a{color:inherit; text-decoration:none}
.container{max-width:1200px; margin:0 auto; padding:22px}

.topbar{
  display:flex; gap:14px; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
.brand{
  display:flex; flex-direction:column; line-height:1.1;
}
.brand .title{font-size:18px; font-weight:700}
.brand .sub{font-size:12px; color:var(--muted)}

.card{
  background: rgba(22,26,34,.92);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card-header{
  padding:14px 16px;
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.controls{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
select, input, button{
  background:#0e121a;
  border:1px solid var(--line);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
button{
  cursor:pointer;
}
button.primary{
  border-color: rgba(124,92,255,.45);
  background: rgba(124,92,255,.15);
}
.pill{
  font-size:12px; color:var(--muted);
  padding:7px 10px; border:1px solid var(--line);
  border-radius:999px;
}

.legend{
  display:flex; gap:10px; flex-wrap:wrap; padding:12px 16px;
  border-bottom:1px solid var(--line);
}
.legend .item{display:flex; gap:8px; align-items:center; font-size:12px; color:var(--muted)}
.dot{width:12px; height:12px; border-radius:3px; border:1px solid rgba(255,255,255,.12)}

.grid-wrap{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}
.year-grid{
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  width:100%;
}
.year-grid th, .year-grid td{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  text-align:center;
  padding:0;
}
.year-grid thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(14,18,26,.95);
  font-size:12px;
  color:var(--muted);
  height:34px;
}
.year-grid .sticky-month{
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(14,18,26,.95);
  text-align:left;
  padding:10px 12px;
  font-size:13px;
  color:var(--text);
  min-width:130px;
}
.cell{
  width: 26px;
  height: 26px;
  cursor:pointer;
  transition: transform .05s ease, filter .1s ease;
}
.cell:hover{filter: brightness(1.12)}
.cell:active{transform: scale(.96)}
.cell.disabled{
  cursor:not-allowed;
  opacity:.7;
}
.footer-note{
  padding:12px 16px;
  font-size:12px;
  color:var(--muted);
}

@media (max-width:720px){
  .container{padding:14px}
  .brand .title{font-size:16px}
  .year-grid{min-width: 860px}
  .year-grid .sticky-month{min-width:110px}
}
