/* Minimal, rápido y legible. */
:root{
  --bg: #0b0b0c;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --txt: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
:root[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(10,10,12,0.06);
  --panel2: rgba(10,10,12,0.08);
  --txt: rgba(10,10,12,0.92);
  --muted: rgba(10,10,12,0.62);
  --border: rgba(10,10,12,0.10);
  --shadow: 0 10px 25px rgba(0,0,0,0.10);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--sans);
  background: radial-gradient(1200px 800px at 15% -10%, rgba(120,120,255,0.18), transparent 60%),
              radial-gradient(1200px 800px at 85% 0%, rgba(0,255,200,0.12), transparent 55%),
              var(--bg);
  color: var(--txt);
  -webkit-text-size-adjust: 100%;
}
a{color:inherit; text-decoration:none}
code{font-family: var(--mono); font-size: 0.92em; padding: 2px 6px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border);}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
}
.brand{display:flex; gap: 10px; align-items:center}
.dot{
  width: 12px; height:12px; border-radius: 999px;
  background: color-mix(in oklab, #7c3aed 70%, #22c55e);
  box-shadow: 0 0 0 6px rgba(124,58,237,0.18);
}
.title{font-weight: 760; letter-spacing: 0.2px}
.subtitle{font-size: 12px; color: var(--muted); margin-top: 2px}

.actions{display:flex; gap: 8px; align-items:center; flex-wrap: wrap; justify-content:flex-end}
.search{
  display:flex; align-items:center; gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: min(520px, 55vw);
}
.search input{
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--txt);
  font-size: 14px;
}
.btn{
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--txt);
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  touch-action: manipulation; /* reduce zoom raro en móvil */
}
.btn:active{transform: translateY(1px)}
.btn:focus{outline: 2px solid color-mix(in oklab, #60a5fa 55%, transparent); outline-offset: 2px}

.grid{
  display:grid;
  grid-template-columns: 320px 1.2fr 360px;
  gap: 14px;
  padding: 14px;
  max-width: 1500px;
  margin: 0 auto;
}
.panel{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  min-height: 120px;
}
.panel h2{
  margin: 0 0 10px 0;
  font-size: 14px;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  color: var(--muted);
}
.panelHeader{
  display:flex; align-items:flex-end; justify-content:space-between; gap: 10px;
  margin-bottom: 10px;
}
.meta{font-size: 12px; color: var(--muted)}
.hint{margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.4}

.linksGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.linkCard{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 80%, transparent);
  transition: transform .06s ease;
  touch-action: manipulation;
}
.linkCard:hover{transform: translateY(-1px)}
.linkLeft{display:flex; align-items:center; gap: 10px; min-width: 0}
.linkIcon{font-size: 18px; width: 22px; text-align:center}
.linkText{min-width: 0}
.linkName{font-weight: 650; font-size: 14px; white-space: nowrap; overflow:hidden; text-overflow: ellipsis}
.linkDesc{font-size: 12px; color: var(--muted); white-space: nowrap; overflow:hidden; text-overflow: ellipsis}
.linkGo{font-size: 12px; color: var(--muted)}

.feedsContainer{display:flex; flex-direction:column; gap: 12px}
.feedBlock{
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 85%, transparent);
  border-radius: 16px;
  padding: 12px;
}
.feedTitle{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.feedTitle a{
  font-weight: 700;
  font-size: 15px;
}
.feedTitle .badge{
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
}
.feedItems{display:flex; flex-direction:column; gap: 8px}
.item{
  display:flex; gap: 10px; align-items:flex-start; justify-content:space-between;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.item:hover{border-color: var(--border); background: color-mix(in oklab, var(--panel2) 75%, transparent)}
.item a{font-size: 14px; line-height: 1.25; font-weight: 600}
.item .when{font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: 10px}
.item .src{display:none}

.widget{border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in oklab, var(--panel) 85%, transparent); box-shadow: var(--shadow); padding: 12px}
.widgetHeader{display:flex; align-items:flex-end; justify-content:space-between; gap: 10px; margin-bottom: 8px}
.widgetHeader h2{margin:0; font-size: 14px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.25px}
.weatherBox{display:flex; flex-direction:column; gap: 8px}
.weatherMain{display:flex; align-items:baseline; justify-content:space-between; gap: 10px}
.weatherTemp{font-size: 42px; font-weight: 800; letter-spacing: -1px}
.weatherDetails{display:grid; grid-template-columns: 1fr 1fr; gap: 8px}
.kv{padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel)}
.kv .k{font-size: 12px; color: var(--muted)}
.kv .v{font-size: 14px; font-weight: 700; margin-top: 4px}

.todoForm input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--txt);
  outline: none;
  touch-action: manipulation;
}
.todoList{list-style:none; padding:0; margin: 10px 0 0 0; display:flex; flex-direction:column; gap: 8px}
.todoItem{
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.todoLeft{display:flex; align-items:center; gap: 10px; min-width: 0}
.todoText{font-weight: 650; font-size: 14px; min-width: 0; overflow:hidden; text-overflow: ellipsis; white-space: nowrap}
.todoBtn{border:none; background: transparent; color: var(--muted); cursor:pointer; font-size: 16px; padding: 6px; border-radius: 10px; touch-action: manipulation;}
.todoBtn:hover{background: var(--panel2); color: var(--txt)}
.todoDone .todoText{text-decoration: line-through; opacity: 0.6}

.notes textarea{
  width:100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--txt);
  outline: none;
  font-family: var(--sans);
  line-height: 1.35;
}

.skeleton{color: var(--muted); font-size: 14px}

@media (max-width: 1100px){
  .grid{grid-template-columns: 1fr; }
  .search{min-width: min(720px, 80vw)}
}
@media (max-width: 560px){
  .actions{gap: 6px}
  .search{min-width: 0; width: 100%}
}


/* Calendar */
.calHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 6px 10px 6px;
}
.calBtn{
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--txt);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  touch-action: manipulation;
}
.calBtn:active{transform: translateY(1px)}
.calMonth{
  font-weight: 800;
  letter-spacing: -0.2px;
}
.calGrid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calDow{
  font-size: 11px;
  color: var(--muted);
  text-align:center;
  padding: 4px 0;
  user-select:none;
}
.calCell{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  padding: 8px 8px;
  min-height: 38px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  font-weight: 750;
  font-size: 13px;
}
.calCell.muted{
  opacity: 0.45;
}
.calCell.today{
  outline: 2px solid color-mix(in oklab, #60a5fa 55%, transparent);
  outline-offset: 1px;
}
