*{box-sizing:border-box}
:root{
  --bg: #0b1220;
  --panel: #0f1b31;
  --ink: #e9f1ff;
  --muted: #9fb0cc;
  --accent: #3dd9ff;
  --accent2: #50e3c2;
  --danger:#ff6b6b;
  --festival:#2ecc71;
  --govt:#f5a524;
  --event:#3b82f6;
  --task:#a855f7;
  --appointment:#22c55e;
  --card:#101a2e;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
html,body{height:100%;}
body{
  margin:0; background: radial-gradient(1000px 500px at 80% 0%, #0d2a3f 0%, #0b1220 55%), var(--bg);
  color:var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Noto Sans, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
}
a{color:var(--accent)}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 18px; background:#0b172b; position:sticky; top:0; z-index:4; border-bottom:1px solid #14223e;
}
.brand{display:flex; gap:12px; align-items:center}
.logo{width:40px; height:40px; border-radius:10px}
.brand-text h1{font-size:20px; margin:0}
.brand-text .tagline{color:var(--muted)}

.actions{display:flex; align-items:center; gap:14px}
.lang-switch select{background:#112142; border:1px solid #20355f; color:var(--ink); padding:6px 10px; border-radius:10px}

.rall{display:flex; align-items:center; gap:8px; text-decoration:none; background:#0e2949; padding:6px 10px; border-radius:12px; border:1px solid #274a7b}
.rall .dots{display:grid; grid-template-columns:repeat(3,6px); gap:3px}
.rall .dots span{display:block; width:6px; height:6px; background:var(--accent); border-radius:2px}
.rall .rall-text{color:var(--ink); font-weight:700}

.layout{display:grid; grid-template-columns:300px 1fr; gap:16px; padding:16px; min-height:calc(100vh - 120px)}
.sidebar{background:var(--panel); border:1px solid #162648; padding:14px; border-radius:16px; box-shadow:var(--shadow); position:sticky; top:72px; height:fit-content}

.month-mini{user-select:none}
.month-mini .header{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.month-mini .grid{display:grid; grid-template-columns:repeat(7,1fr); gap:4px}
.month-mini .cell{padding:6px 0; text-align:center; border-radius:8px; color:var(--ink); border:1px solid #1c315a; background:#0c1a33}
.month-mini .cell.muted{color:#6c82ab; opacity:.7}
.month-mini .cell.today{outline:2px solid var(--accent)}
.month-mini .dow{color:#9fb0cc; font-size:12px; border:none; background:transparent}

.legend{margin-top:14px; display:grid; gap:6px; background:#0c1730; padding:10px; border-radius:12px; border:1px solid #1f3561}
.legend .dot{display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:8px}
.dot-event{background:var(--event)}
.dot-task{background:var(--task)}
.dot-appointment{background:var(--appointment)}
.dot-festival{background:var(--festival)}
.dot-govt{background:var(--govt)}

.primary{background:linear-gradient(180deg,var(--accent),#2aa1ff); color:#021024; border:none; font-weight:800; padding:10px 14px; border-radius:12px; cursor:pointer; box-shadow:var(--shadow); margin-top:12px}
.ghost{background:#0f2444; color:var(--ink); border:1px solid #203a68; padding:8px 10px; border-radius:10px; cursor:pointer}
.searchBox{margin-top:12px}
.searchBox input{width:100%; padding:10px 12px; border-radius:12px; border:1px solid #25426f; background:#0a1a31; color:var(--ink)}

.calendar{background:var(--panel); border:1px solid #162648; border-radius:16px; padding:12px; box-shadow:var(--shadow)}
.controls{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.current-label{font-weight:700; padding:0 10px}
.view-switch .tab{margin-left:8px; padding:8px 12px; border-radius:10px; border:1px solid #264271; background:#0e2447; color:var(--ink); cursor:pointer}
.view-switch .tab.active{background:linear-gradient(180deg,#1c3d74,#0e2549); border-color:#31558d}

.calendar-root{min-height:600px}
.grid{display:grid; gap:6px}
.month-grid{grid-template-columns:repeat(7,1fr)}
.week-grid{grid-template-columns:repeat(7,1fr)}
.day-grid{grid-template-columns:1fr}
.year-grid{grid-template-columns:repeat(4,1fr)}

.cell-box{background:#0c1730; border:1px solid #1f3561; border-radius:12px; padding:8px; min-height:90px; position:relative}
.cell-box .date-badge{position:absolute; top:6px; right:8px; font-size:12px; color:#9fb0cc}
.cell-box.today{outline:2px solid var(--accent)}

.pill{display:inline-block; font-size:12px; padding:2px 6px; border-radius:8px; margin:2px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
.pill.event{background:rgba(59,130,246,.2); border:1px solid #244e9a}
.pill.task{background:rgba(168,85,247,.2); border:1px solid #5b2a9a}
.pill.appointment{background:rgba(34,197,94,.2); border:1px solid #2c7a46}
.pill.festival{background:rgba(46,204,113,.18); border:1px solid #2ecc71}
.pill.govt{background:rgba(245,165,36,.18); border:1px solid #f5a524}

.footer{padding:12px; text-align:center; color:var(--muted)}

dialog{border:none; border-radius:16px; padding:0; background:#0c1730; color:var(--ink); box-shadow:var(--shadow); width:min(520px,92vw)}
dialog::backdrop{background:rgba(0,0,0,.5)}
#editorForm{padding:16px; display:grid; gap:10px}
#editorForm label{display:grid; gap:6px}
#editorForm input, #editorForm select, #editorForm textarea{background:#10203e; border:1px solid #22406f; padding:8px 10px; border-radius:10px; color:var(--ink)}
#editorForm .row2{display:grid; grid-template-columns:1fr 1fr; gap:8px}
#editorForm menu{display:flex; justify-content:flex-end; gap:10px; margin-top:8px}

.toast{position:fixed; bottom:18px; right:18px; background:#08223e; border:1px solid #24518d; padding:10px 12px; border-radius:10px; box-shadow:var(--shadow)}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:relative; top:auto}
}
/* Month view weekday header */
.dow-row { margin-bottom: 6px; }
.dow-head {
  text-align: center;
  color: var(--muted);
  padding: 6px 0;
  font-weight: 600;
  border-radius: 8px;
  background: #0c1730;
  border: 1px solid #1f3561;
}
/* Today highlight inside Year view mini calendars */
.year-grid .month-mini .cell.today{
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: #2a4f86;
  box-shadow: 0 0 0 2px rgba(61,217,255,.15) inset;
}
/* Brand strip above footer (like Rawna.RSearch) */
.brand-bottom{
  margin: 8px 12px 0;
  padding: 10px 16px;
  border: 1px solid #162648;
  border-radius: 16px;
  background: linear-gradient(180deg,#0c1730 0%, #0b162d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.brand-bottom__logo{
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand-bottom__name{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--ink);
}
@media (max-width: 640px){
  .brand-bottom{ padding: 18px 12px; }
  .brand-bottom__logo{ width: 32px; height: 32px; }
  .brand-bottom__name{ font-size: 16px; }
}
/* Footer link without underline */
.footer a{
  text-decoration: none;
  border-bottom: 0;
}
.footer a:hover,
.footer a:focus{
  text-decoration: none;   /* hover पर भी underline न आए */
}
