:root{
  --pink:#FAA4B5;
  --fawn:#F8B77C;
  --maize:#FFF183;
  --sky:#70C1E1;
  --olivine:#82BA88;
  --ink:#253143;
  --muted:#6E7784;
  --paper:#FAF8F4;
  --white:#FFFDFC;
  --shadow:0 12px 30px rgba(37,49,67,.08);
  --radius-xl:24px;
  --radius-lg:18px;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at top left, rgba(250,164,181,.12), transparent 28%),
    radial-gradient(circle at top right, rgba(112,193,225,.10), transparent 24%),
    linear-gradient(180deg,#fbfaf8 0%, #f4f0e9 100%);
  color:var(--ink);
}

.app-shell{
  max-width:1180px;
  margin:0 auto;
  padding:8px 16px 16px;
}

.top-row{
  display:grid;
  grid-template-columns:1fr 220px;
  gap:16px;
  margin-bottom:16px;
}

.header-card,
.weather-card,
.stat-card,
.block,
.inner-card,
.routine-card,
.calendar-placeholder{
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
}

.header-card{
  background:linear-gradient(180deg, rgba(255,253,252,.98), rgba(255,249,244,.96));
  padding:14px 20px;
  border:1px solid rgba(248,183,124,.18);
  min-height:190px;
}

.header-main{
  display:grid;
  grid-template-columns:1fr 210px;
  gap:16px;
  align-items:stretch;
  height:100%;
}

.header-left{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:100%;
}

.eyebrow{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#E36B1A;
  font-weight:800;
  margin-bottom:4px;
}

h1{
  margin:0;
  font-size:34px;
  line-height:1.05;
}

.subtitle{
  margin:6px 0 14px;
  color:var(--muted);
}

.avatars-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.member-pill{
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid rgba(37,49,67,.07);
  padding:6px 10px 6px 6px;
  border-radius:999px;
  font-weight:600;
  box-shadow:0 4px 10px rgba(37,49,67,.04);
}

.member-pill img{
  width:26px;
  height:26px;
  border-radius:50%;
  object-fit:cover;
}

.time-widget{
  height:100%;
  min-height:100%;
  border-radius:22px;
  padding:16px 18px;
  text-align:center;
  background:linear-gradient(180deg, rgba(232,241,248,.98), rgba(243,247,251,.94));
  border:1px solid rgba(112,193,225,.18);
  box-shadow:0 10px 20px rgba(37,49,67,.06);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-self:stretch;
}

.time-hour{
  font-size:42px;
  font-weight:800;
  line-height:1;
  letter-spacing:.02em;
  color:#1f3c5b;
}

.time-day{
  margin-top:8px;
  font-size:18px;
  font-weight:700;
  color:#5f7384;
  text-transform:capitalize;
}

.time-date{
  margin-top:4px;
  font-size:15px;
  color:#8091a0;
}

.weather-card{
  background:linear-gradient(180deg, rgba(112,193,225,.28), rgba(112,193,225,.16));
  padding:14px;
  border:1px solid rgba(112,193,225,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .25s ease, transform .18s ease;
}

.weather-card.weather-sun{
  background:linear-gradient(180deg, rgba(255,241,131,.48), rgba(248,183,124,.28));
}

.weather-card.weather-cloud{
  background:linear-gradient(180deg, rgba(112,193,225,.28), rgba(112,193,225,.14));
}

.weather-card.weather-rain{
  background:linear-gradient(180deg, rgba(112,193,225,.36), rgba(130,186,136,.18));
}

.weather-card.weather-storm{
  background:linear-gradient(180deg, rgba(112,193,225,.42), rgba(37,49,67,.16));
}

.weather-box{
  min-height:140px;
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
  color:#234;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
  border-radius:22px;
  padding:14px;
  width:100%;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}

.weather-icon{
  width:56px;
  height:56px;
  border-radius:50%;
  background:rgba(255,255,255,.7);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
}

.weather-temp{
  font-size:30px;
  font-weight:800;
  line-height:1;
}

.weather-city{
  font-size:15px;
  font-weight:700;
}

.weather-desc{
  font-size:13px;
  font-weight:700;
  color:#436176;
}

.weather-minmax{
  font-size:13px;
  color:#325469;
}

.weather-updated{
  font-size:11px;
  color:#5f7384;
  margin-top:2px;
}

.status-strip{
  background:var(--white);
  border-radius:999px;
  padding:8px 16px;
  margin-bottom:14px;
  border-left:4px solid #22b15a;
  box-shadow:0 4px 12px rgba(37,49,67,.05);
  font-weight:600;
}

.stats-row{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:14px;
}

.stat-card{
  background:var(--white);
  padding:14px 16px;
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid rgba(37,49,67,.06);
}

.stat-card span{
  font-size:14px;
  color:var(--muted);
}

.stat-card strong{
  font-size:24px;
  line-height:1.1;
  margin-top:4px;
}

.v7-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.row-2cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:start;
}

.row-2cols > .block{
  min-height:100%;
}

.block{
  padding:14px;
}

.block-orange{
  background:linear-gradient(180deg, rgba(248,183,124,.18), rgba(248,183,124,.12));
}

.block-green{
  background:linear-gradient(180deg, rgba(130,186,136,.16), rgba(130,186,136,.10));
  padding-bottom:10px;
}

.block-yellow{
  background:linear-gradient(180deg, rgba(255,241,131,.26), rgba(255,241,131,.16));
}

.block-blue{
  background:linear-gradient(180deg, rgba(112,193,225,.18), rgba(112,193,225,.12));
}

.block-head h2{
  margin:0 0 2px;
  font-size:18px;
}

.block-head p{
  margin:0 0 12px;
  color:var(--muted);
  font-size:14px;
}

.inner-card,
.routine-card,
.calendar-placeholder,
.calendar-premium{
  background:rgba(255,253,252,.9);
  padding:12px;
  border:1px solid rgba(37,49,67,.05);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
}

input,
select,
button{
  font:inherit;
}

input,
select{
  width:100%;
  background:#fffdfa;
  border:1px solid rgba(37,49,67,.10);
  border-radius:14px;
  padding:10px 12px;
  color:var(--ink);
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:8px;
  margin-top:8px;
}

.groceries-row{
  grid-template-columns:1fr auto;
}

.primary-btn{
  background:#DB7D2E;
  color:white;
  border:none;
  border-radius:14px;
  padding:10px 18px;
  font-weight:700;
  cursor:pointer;
  transition:transform .12s ease, filter .15s ease;
}

.primary-btn:hover{
  filter:brightness(.98);
}

.primary-btn:active{
  transform:scale(.98);
}

.task-list,
.grocery-list{
  margin-top:12px;
  display:grid;
  gap:10px;
  min-height:220px;
  align-content:start;
}

.task-item,
.grocery-item{
  display:grid;
  grid-template-columns:34px 1fr auto;
  gap:10px;
  align-items:center;
  background:#fffdfb;
  border:1px solid rgba(37,49,67,.07);
  border-radius:16px;
  padding:8px;
  transition:transform .12s ease, box-shadow .12s ease, opacity .2s ease;
}

.task-item:hover,
.grocery-item:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(37,49,67,.06);
}

.tag-round{
  width:34px;
  height:34px;
  border-radius:12px;
  background:rgba(130,186,136,.18);
}

.task-meta{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  font-size:11px;
  font-weight:700;
}

.chip{
  padding:3px 8px;
  border-radius:999px;
  background:#f3f4f6;
  color:#46505d;
}

.chip-think{
  background:rgba(248,183,124,.18);
  color:#ab5519;
}

.chip-todo{
  background:rgba(112,193,225,.18);
  color:#28627d;
}

.delete-btn{
  width:32px;
  height:32px;
  border-radius:12px;
  border:1px solid rgba(250,164,181,.35);
  background:rgba(250,164,181,.12);
  color:#cf5671;
  cursor:pointer;
}

.item-main{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.item-title.done-text{
  text-decoration:line-through;
  opacity:.55;
}

.item-toggle{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(37,49,67,.08);
  background:#fffdfa;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.item-toggle.is-done{
  background:rgba(130,186,136,.18);
  border-color:rgba(130,186,136,.4);
}

.empty-note{
  color:#6E7784;
  margin:0;
}

.routine-card{
  margin-bottom:12px;
  padding:10px 10px 8px !important;
}

.block-green .routine-card:last-child{
  margin-bottom:0;
}

.routine-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:6px !important;
}

.routine-user{
  display:flex;
  align-items:center;
  gap:10px;
}

.routine-user img{
  width:30px;
  height:30px;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 4px 8px rgba(37,49,67,.08);
}

.routine-user small{
  display:block;
  color:var(--muted);
}

.routine-progress-tag{
  border-radius:999px;
  padding:4px 10px;
  background:rgba(248,183,124,.18);
  color:#9a4d10;
  font-size:12px;
  font-weight:800;
}

.progress-track{
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(37,49,67,.08);
  overflow:hidden;
  margin-bottom:8px;
}

.progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--sky), var(--olivine));
  transition:width .25s ease;
}

.routine-icons{
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:10px !important;
}

.routine-btn{
  background:linear-gradient(180deg,#ffffff 0%, #fffaf3 100%) !important;
  border:1px solid rgba(37,49,67,.08) !important;
  border-radius:20px !important;
  padding:8px 5px;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:110px !important;
  box-shadow:0 4px 12px rgba(37,49,67,.05);
}

.routine-btn:hover{
  transform:translateY(-1px);
}

.routine-btn:active{
  transform:scale(.97);
}

.routine-btn img{
  width:66px !important;
  height:66px !important;
  object-fit:contain;
  display:block;
  background:transparent !important;
}

.routine-btn span{
  font-size:11px !important;
  line-height:1.15;
  font-weight:700;
  text-align:center;
  color:#6b4a28 !important;
}

.routine-btn.is-done{
  background:linear-gradient(180deg,#ffffff 0%, #f4fff5 100%) !important;
  border-color:rgba(130,186,136,.45) !important;
}

.bravo{
  display:none;
  margin-top:8px;
  color:#1f7a3c;
  font-weight:800;
  text-align:right;
}

.bravo.show{
  display:block;
}

.calendar-premium{
  display:grid;
  gap:12px;
}

.calendar-section-premium{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(37,49,67,.06);
  border-radius:18px;
  padding:10px;
  display:grid;
  gap:8px;
}

.calendar-section-title{
  font-weight:800;
  font-size:14px;
  color:#2e4f68;
}

.calendar-empty-premium{
  margin:0;
  color:#6E7784;
  font-size:13px;
}

.calendar-event-premium{
  display:grid;
  grid-template-columns:10px 36px 1fr;
  gap:10px;
  align-items:center;
  background:linear-gradient(180deg,#fffdfb 0%, #fffaf6 100%);
  border:1px solid rgba(37,49,67,.07);
  border-radius:16px;
  padding:8px 10px;
  box-shadow:0 4px 10px rgba(37,49,67,.04);
}

.calendar-event-accent{
  width:10px;
  height:44px;
  border-radius:999px;
}

.calendar-event-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 4px 8px rgba(37,49,67,.08);
  border:2px solid #fff;
}

.calendar-event-avatar-placeholder{
  width:36px;
  height:36px;
}

.calendar-event-main{
  display:grid;
  gap:2px;
}

.calendar-event-topline{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.calendar-event-time{
  font-size:12px;
  font-weight:800;
  color:#6E7784;
}

.calendar-event-day{
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(112,193,225,.12);
  color:#2e6580;
  font-weight:700;
}

.calendar-event-title{
  font-weight:800;
  line-height:1.15;
  color:#253143;
}

.calendar-event-owner{
  font-size:12px;
  color:#5d6773;
}

@media (max-width: 1100px){
  .top-row{
    grid-template-columns:1fr;
  }

  .stats-row{
    grid-template-columns:repeat(2,1fr);
  }

  .row-2cols{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .app-shell{
    padding:12px;
  }

  .stats-row{
    grid-template-columns:1fr;
  }

  .form-row,
  .groceries-row{
    grid-template-columns:1fr;
  }

  .header-main{
    grid-template-columns:1fr;
  }

  .routine-icons{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }

  .time-widget{
    width:100%;
  }

  .time-hour{
    font-size:30px;
  }

  .time-day{
    font-size:16px;
  }

  .time-date{
    font-size:14px;
  }
}
.item-toggle {
  transition: all .15s ease;
}

.item-toggle:hover {
  transform: scale(1.05);
}

.item-toggle.is-done {
  background: rgba(130,186,136,.25);
  box-shadow: 0 0 0 2px rgba(130,186,136,.2);
}
.routine-btn.is-done {
  transform: scale(0.98);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.08);
}
/* ===== V7.8 agenda premium ===== */

.calendar-section-premium:first-child{
  border:2px solid rgba(240,138,57,.24);
  background:linear-gradient(180deg, rgba(255,252,248,.95), rgba(255,246,238,.88));
}

.calendar-section-premium:first-child .calendar-section-title{
  color:#b35a1d;
}

.calendar-event-today{
  border-color:rgba(240,138,57,.10);
}

.calendar-event-next{
  border-color:rgba(9,150,212,.28);
  box-shadow:0 8px 18px rgba(9,150,212,.10);
}

.calendar-event-live{
  border-color:rgba(219,125,46,.28);
  box-shadow:0 8px 20px rgba(219,125,46,.12);
  background:linear-gradient(180deg,#fffdfb 0%, #fff6ee 100%);
}

.calendar-badge-now,
.calendar-badge-next{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.03em;
}

.calendar-badge-now{
  background:#DB7D2E;
  color:#fff;
}

.calendar-badge-next{
  background:rgba(9,150,212,.14);
  color:#1f5e7c;
}

.calendar-event-title{
  font-size:15px;
}

.calendar-section-title{
  font-size:15px;
}
.routine-reset-actions {
  display: flex;
  justify-content: center;
  margin: 12px auto 0;
  width: fit-content;
  gap: 12px;
}

.secondary-btn {
  background: #ffffff;
  border: 1px solid rgba(37,49,67,0.08);
  border-radius: 14px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #253143;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(37,49,67,0.06);
  transition: all 0.15s ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(37,49,67,0.10);
  background: #f9fafb;
}

.secondary-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(37,49,67,0.08);
}
.secondary-btn {
  background: #253143;
  color: white;
  border: none;
}