/* ================================================================
   LifeOS — style.css
   Aesthetic: Dark OS / Terminal-luxe / Geometric
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --bg:        #8f8989;
  --bg2:       #111118;
  --bg3:       #18181f;
  --bg4:       #22222c;
  --border:    #2a2a38;
  --border2:   #353545;

  --text:      #ffffff;
  --text2:     #ffffff;
  --text3:     #5454f1;

  --accent:    #000000;
  --accent2:   #3ecfb2;
  --accent3:   #f7a05a;
  --accent4:   #e96f9a;

  --accent-glow:  0 0 20px rgba(106, 242, 247, 0.35);
  --accent2-glow: 0 0 20px rgba(13, 19, 18, 0.25);

  --sidebar-w: 220px;
  --topbar-h:  58px;
  --radius:    10px;
  --radius-lg: 16px;

  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --transition: .18s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ================================================================
   LAYOUT SHELL
================================================================ */
.os-shell {
  display: flex;
  min-height: 100vh;
}

/* ================================================================
   SIDEBAR
================================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  font-size: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
  line-height: 1;
}
.logo-text {
  font-family: var(--font-display);
  
  font-size: 1.2rem;
  letter-spacing: .02em;
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: .875rem;
  fon
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover {
  color: var(--text);
  background: var(--bg3);
}
.nav-item.active {
  color: var(--accent);
  background: rgba(124,106,247,.12);
  border: 1px solid rgba(124,106,247,.2);
}
.nav-icon {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  transition: transform var(--transition);
}
.nav-item:hover .nav-icon { transform: scale(1.2); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px var(--accent)); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--text3);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}
.sidebar-version {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text3);
}

/* ── Sidebar overlay + mobile off-canvas behavior ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 90; /* below .sidebar (100), above .main-content */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .menu-toggle {
    display: inline-flex;
  }
  .main-content {
    margin-left: 0;
  }
}

/* ================================================================
   MAIN CONTENT
================================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none;
  color: var(--text2);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--bg3); color: var(--text); }
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text3);
  font-family: var(--font-mono);
}
.breadcrumb-current { color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-datetime {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text2);
}
.notif-btn {
  position: relative;
  color: var(--text2);
  font-size: 1.1rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all var(--transition);
}
.notif-btn:hover { color: var(--accent); background: rgba(124,106,247,.1); }
.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--accent4);
  color: #fff;
  font-size: .6rem;
  
  border-radius: 99px;
  padding: 1px 4px;
  font-family: var(--font-mono);
}

/* ── Content Body ── */
.content-body {
  flex: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  width: 100%;
}

/* ================================================================
   DASHBOARD — HERO
================================================================ */
.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  
  color: var(--text);
  line-height: 1.1;
}
.hero-desc {
  font-size: .9rem;
  color: var(--text2);
  margin-top: 6px;
}
.hero-desc strong { color: var(--accent); }
.hero-quote {
  max-width: 320px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  position: relative;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 0;
  position: absolute;
  top: 24px; left: 10px;
  opacity: .3;
}
.hero-quote p {
  font-size: .82rem;
  color: var(--text2);
  font-style: italic;
  line-height: 1.5;
  padding-left: 10px;
}

/* ================================================================
   STATS ROW
================================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color var(--transition), transform var(--transition);
  cursor: default;
}
.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}
.stat-label {
  font-size: .72rem;
  font-family: var(--font-mono);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.3em;
 
  color: var(--text);

  margin-bottom: 12px;
 
}
.stat-value small { font-size: 1rem; color: var(--text2); }
.stat-bar {
  height: 3px;
  background: var(--bg4);
  border-radius: 99px;
  overflow: hidden;
}
.stat-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px var(--accent);
}
.stat-fill.accent2 { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
.stat-fill.accent3 { background: var(--accent3); box-shadow: 0 0 8px var(--accent3); }
.stat-fill.accent4 { background: var(--accent4); box-shadow: 0 0 8px var(--accent4); }

/* ================================================================
   DASH COLUMNS
================================================================ */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* ── Panel ── */
.dash-panel {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
 
  color: var(--text);
}
.panel-link {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent);
  transition: opacity var(--transition);
}
.panel-link:hover { opacity: .7; }

/* Quick Add Task */
.task-quick-add {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.task-quick-add input {
  flex: 1;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .85rem;
  padding: 9px 14px;
  outline: none;
  transition: border-color var(--transition);
}
.task-quick-add input:focus { border-color: var(--accent); }
.task-quick-add input::placeholder { color: var(--text3); }
.task-quick-add button {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: .95rem;
  transition: opacity var(--transition), transform var(--transition);
}
.task-quick-add button:hover { opacity: .85; transform: scale(1.05); }

/* Task List */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-empty {
  color: var(--text3);
  font-size: .82rem;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
  animation: slideIn .2s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.task-item:hover { border-color: var(--border2); }
.task-checkbox {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.task-checkbox:hover { border-color: var(--accent); }
.task-checkbox.done { background: var(--accent); border-color: var(--accent); }
.task-checkbox.done::after { content: '✓'; color: #fff; font-size: .65rem;t: 700; }
.task-text {
  flex: 1;
  font-size: .85rem;
  color: var(--text);
  transition: all var(--transition);
}
.task-item.done .task-text { text-decoration: line-through; color: var(--text3); }
.task-delete {
  color: var(--text3);
  font-size: .8rem;
  opacity: 0;
  transition: all var(--transition);
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--accent4); }

/* ================================================================
   WIDGETS
================================================================ */
.dash-widgets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.widget {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color var(--transition);
}
.widget:hover { border-color: var(--border2); }
.widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.widget-icon { color: var(--accent); font-size: 1rem; }
.widget-title {
  font-family: var(--font-display);
  
  font-size: .9rem;
  color: var(--text);
}

/* Focus widget */
.widget-focus textarea {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .82rem;
  font-family: var(--font-body);
  padding: 10px 12px;
  resize: none;
  height: 70px;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.5;
}
.widget-focus textarea:focus { border-color: var(--accent); }
.widget-focus textarea::placeholder { color: var(--text3); }
.widget-save-btn {
  margin-top: 8px;
  background: rgba(124,106,247,.15);
  border: 1px solid rgba(124,106,247,.3);
  color: var(--accent);
  font-size: .75rem;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: 6px;
  transition: all var(--transition);
}
.widget-save-btn:hover { background: rgba(124,106,247,.25); }

/* Week Bars */
.week-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 60px;
}
.week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.week-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height .5s cubic-bezier(.4,0,.2,1);
  opacity: .7;
}
.week-bar.today { opacity: 1; box-shadow: 0 0 10px var(--accent); }
.week-day {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--text3);
}
.week-day.today { color: var(--accent); }

/* Notifications */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  font-size: .78rem;
  padding: 8px 12px;
  border-radius: 7px;
  border-left: 3px solid;
  line-height: 1.4;
}
.notif-item.info { background: rgba(62,207,178,.08); border-color: var(--accent2); color: var(--text2); }
.notif-item.warn { background: rgba(247,160,90,.08); border-color: var(--accent3); color: var(--text2); }
.notif-item.tip  { background: rgba(124,106,247,.08); border-color: var(--accent);  color: var(--text2); }
.notif-item.error{ background: rgba(233,111,154,.08); border-color: var(--accent4); color: var(--text2); }

/* ================================================================
   PAGES — shared page styles
================================================================ */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  
  color: var(--text);
}
.page-subtitle {
  font-size: .85rem;
  color: var(--text2);
  margin-top: 5px;
}

/* ── Card ── */
.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border2); }
.card-title {
  font-family: var(--font-display);
  
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title-icon { color: var(--accent); }

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: .75rem; font-family: var(--font-mono); color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
.form-input, .form-select, .form-textarea {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .85rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-body);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg3); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .84rem;
  
  font-family: var(--font-body);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,106,247,.3);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(124,106,247,.06); }
.btn-danger {
  background: rgba(233,111,154,.15);
  border: 1px solid rgba(233,111,154,.3);
  color: var(--accent4);
}
.btn-danger:hover { background: rgba(233,111,154,.25); }
.btn-sm { padding: 6px 14px; font-size: .78rem; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .68rem;
  font-family: var(--font-mono);
 
  letter-spacing: .04em;
}
.badge-accent  { background: rgba(124,106,247,.2); color: var(--accent); border: 1px solid rgba(124,106,247,.3); }
.badge-accent2 { background: rgba(62,207,178,.2);  color: var(--accent2); border: 1px solid rgba(62,207,178,.3); }
.badge-accent3 { background: rgba(247,160,90,.2);  color: var(--accent3); border: 1px solid rgba(247,160,90,.3); }
.badge-accent4 { background: rgba(233,111,154,.2); color: var(--accent4); border: 1px solid rgba(233,111,154,.3); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text3);
}
.empty-state-icon { font-size: 2rem; margin-bottom: 10px; }
.empty-state-text { font-size: .85rem; }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: var(--bg4);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .6s ease;
}

/* ── Tag ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .72rem;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
}

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg3);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .84rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), var(--accent-glow);
  z-index: 9999;
  animation: toastIn .25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page entrance animation ── */
.content-body > * {
  animation: fadeUp .35s ease backwards;
}
.content-body > *:nth-child(1) { animation-delay: .05s; }
.content-body > *:nth-child(2) { animation-delay: .1s;  }
.content-body > *:nth-child(3) { animation-delay: .15s; }
.content-body > *:nth-child(4) { animation-delay: .2s;  }

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

/* ── Background mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 70% 10%, rgba(124,106,247,.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(62,207,178,.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.os-shell { position: relative; }