/* Shen Assistant shared theme: polished, professional, calm, and high-quality. */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #172033;
  --muted: #647084;
  --line: #d9e2ec;
  --paper: #ffffff;
  --nav: #101827;
  --blue: #356a9f;
  --green: #2d8a7b;
  --orange: #c68642;
  --rose: #a85d72;
  --purple: #6d5fa7;
  --gold: #b9975b;
  --cyan: #2d8190;
  --forest: #3f7b5b;
  --pink: #a96482;
  --grayblue: #607089;
  --warm: #b0784d;
  --gray: #727987;
  --soft: #f7f9fc;
  --soft-blue: #eaf2fb;
  --soft-green: #e8f5f1;
  --soft-orange: #fbf1e6;
  --soft-rose: #f8edf1;
  --soft-purple: #f0eef8;
  --soft-gold: #f7f0e3;
  --soft-cyan: #e8f3f5;
  --soft-forest: #eaf3ed;
  --soft-pink: #f7eef2;
  --soft-grayblue: #eef2f6;
  --soft-warm: #f8efe8;
  --soft-gray: #f3f5f8;
  --brand-rose: #a85d72;
  --brand-gold: #b9975b;
  --brand-champagne: #f7f0e3;
  --brand-jade: #2d8a7b;
  --brand-mist: #eef2f6;
  --brand-cream: #f8fafc;
  --brand-peach: #f3e5da;
  --brand-pink: #ead8df;
  --brand-lavender: #e5e2f2;
  --brand-mint: #dcefe9;
  --brand-cocoa: #5f4a58;
  --radius-card: 14px;
  --shadow-card: 0 16px 38px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(180deg, #f9fbfd 0%, #f3f6fa 48%, #eef3f7 100%) !important;
  color: var(--ink) !important;
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif !important;
}

.app {
  background: transparent !important;
}

.side,
.sidebar {
  position: sticky !important;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, #101827 0%, #162235 58%, #1f2c3f 100%) !important;
  border-right: 4px solid #b9975b !important;
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 151, 91, 0.68) rgba(255, 255, 255, 0.08);
}

.side::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.side::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.side::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(185, 151, 91, 0.68);
  border-radius: 999px;
}

.brand,
.sidebar .brand {
  position: relative;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 9px;
  align-items: center;
}

.brand::before,
.sidebar .brand::before {
  content: "\2726";
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8e7 0%, #d9bf82 100%);
  color: #172033;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  grid-row: 1 / span 2;
  grid-column: 1;
  margin-right: 0;
}

.brand {
  color: #fff8e7 !important;
  letter-spacing: 0 !important;
}

.brand strong {
  display: block !important;
  grid-column: 2;
  color: #fff8e7 !important;
  letter-spacing: 0 !important;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub,
.sidebar .brand span,
.sidebar .brand small {
  display: block !important;
  grid-column: 2;
  color: #b9c4d1 !important;
  margin-top: 2px !important;
  line-height: 1.35;
  white-space: normal;
}

.nav a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px !important;
  color: #dbe4ee !important;
  transition: transform .18s ease, background .18s ease, border-color .18s ease !important;
}

.nav a::before {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9bf82;
  font-size: 13px;
  flex: 0 0 auto;
}

.nav a[href*="index"]::before { content: "\2600"; }
.nav a[href*="calendar"]::before { content: "\25A3"; }
.nav a[href*="tasks"]::before { content: "\2713"; }
.nav a[href*="activity"]::before { content: "\25B2"; }
.nav a[href*="members"]::before { content: "\2661"; }
.nav a[href*="academy"]::before { content: "\25C7"; }
.nav a[href*="garden"]::before { content: "\273F"; }
.nav a[href*="finance"]::before { content: "$"; }
.nav a[href*="alliance"]::before { content: "\25CE"; }
.nav a[href*="intelligence"]::before { content: "\2605"; }
.nav a[href*="mindmap"]::before { content: "\25A6"; }
.nav a[href*="voice"]::before { content: "\25CF"; }

.nav a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(217, 191, 130, 0.22);
  transform: translateX(2px);
}

.nav a.active {
  background: linear-gradient(135deg, #f7f0e3 0%, #d9bf82 100%) !important;
  color: #172033 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.nav a.active::before {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(23, 32, 51, 0.12);
  color: #172033;
}

.main,
.page-wrap {
  position: relative;
}

h1,
.hero-title {
  color: #172033 !important;
  letter-spacing: 0 !important;
}

h1::after,
.hero-title::after {
  content: "";
  display: block;
  width: 76px;
  height: 5px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9975b, #2d8a7b);
}

.sub,
.hero-sub {
  color: #647084 !important;
}

.card,
.panel,
.summary-card,
.menu-card,
.task,
.member,
.item,
.step,
.record,
.calendar-rhythm-card,
.day-card,
.news-card,
.decision-card {
  border: 1px solid rgba(217, 226, 236, 0.96) !important;
  border-radius: var(--radius-card) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: var(--shadow-card) !important;
}

.card,
.panel,
.summary-card,
.task,
.member,
.item,
.step {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.panel:hover,
.summary-card:hover,
.task:hover,
.member:hover,
.item:hover,
.step:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.11) !important;
  border-color: rgba(185, 151, 91, 0.42) !important;
}

.btn,
button,
.mode-btn.active,
.who-btn.active,
.today-btn,
.back-menu-link {
  border-radius: 999px !important;
}

.btn,
button.btn,
.button,
.today-btn:hover,
.mode-btn.active,
.who-btn.active {
  background: linear-gradient(135deg, #172033 0%, #356a9f 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 24px rgba(53, 106, 159, 0.16);
}

.button.secondary,
.btn.secondary,
button.secondary {
  background: #ffffff !important;
  border: 1px solid #d9e2ec !important;
  color: #356a9f !important;
  box-shadow: none;
}

input,
select,
textarea {
  border-color: #d9e2ec !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(53, 106, 159, 0.14);
  border-color: #356a9f !important;
}

.tag,
.badge,
.menu-badge {
  border-radius: 999px !important;
}

.hero-badge,
.back-menu-link,
.nav-bar,
.top-bar,
.upload-zone,
.note,
.rhythm-grid-toolbar {
  border-color: rgba(217, 226, 236, 0.96) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

.brand-band {
  background: linear-gradient(135deg, #172033 0%, #274765 56%, #2d8a7b 100%) !important;
  border: 1px solid rgba(217, 226, 236, 0.18) !important;
}

.hero,
.rhythm-window {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 251, 253, 0.96) 100%) !important;
}

.cockpit-panel {
  background:
    linear-gradient(180deg, rgba(16, 24, 39, .98), rgba(31, 44, 63, .98)) !important;
  border-color: rgba(217, 191, 130, .26) !important;
}

.month-grid,
.month-cell,
.month-header,
.week-day,
.day-view,
.agenda-item,
.cell-event {
  border-color: rgba(217, 226, 236, 0.88) !important;
}

.month-cell,
.week-day,
.day-view {
  background: rgba(255, 255, 255, 0.98) !important;
}

.month-header {
  background: #eef2f6 !important;
  color: #607089 !important;
}

.cell-event,
.event-card,
.agenda-item {
  border-radius: 10px !important;
}

@media (max-width: 860px) {
  .side,
  .sidebar {
    position: static !important;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0 !important;
    border-bottom: 4px solid #b9975b !important;
  }

  .nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px) !important;
  }
}
