:root{
  --bg:#f5f8fc;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#dfe7f1;
  --blue:#2b73e8;
  --blue-weak:#e7f0ff;
  --amber:#f5a623;
  --amber-weak:#fff4df;
  --red:#e14646;
  --red-weak:#ffe5e5;
  --green:#2e9e4d;
  --green-weak:#e2f6e8;
  --shadow:0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft:0 10px 22px rgba(15, 23, 42, 0.05);
  --radius:26px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(31,111,224,.08), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(245,166,35,.08), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

.hidden{display:none !important}

.page-bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 18% 18%, rgba(31,111,224,.05), transparent 22%),
    radial-gradient(circle at 82% 8%, rgba(225,70,70,.05), transparent 18%);
}

.page-shell{
  min-height:100%;
  padding:12px;
  display:flex;
  justify-content:center;
}

.app-shell{
  width:min(100%, 1080px);
}

.card{
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border:1px solid rgba(255,255,255,.84);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.auth-view,
.main-view{
  width:100%;
}

.auth-view{
  max-width:480px;
  margin:36px auto 0;
  padding:22px;
  display:grid;
  gap:18px;
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.logo-mark{
  width:58px;
  height:58px;
  border-radius:18px;
  overflow:hidden;
  flex:0 0 auto;
  box-shadow:0 12px 28px rgba(31,111,224,.18);
}
.logo-mark img{
  display:block;
  width:100%;
  height:100%;
}

.eyebrow{
  margin:0 0 2px;
  color:var(--muted);
  font-size:.76rem;
  letter-spacing:.09em;
  text-transform:uppercase;
}

h1,h2,h3,p{margin:0}

.hero-copy h2{
  font-size:1.55rem;
  line-height:1.12;
  margin-bottom:10px;
}
.hero-copy p{
  color:var(--muted);
  line-height:1.6;
}

.auth-form,
.event-form{
  display:grid;
  gap:14px;
}

label{
  display:grid;
  gap:8px;
}
label span{
  color:var(--muted);
  font-size:.92rem;
  font-weight:600;
}
input,
select,
textarea{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:18px;
  padding:14px 16px;
  font:inherit;
  outline:none;
  transition:border-color .2s, box-shadow .2s, transform .15s;
}
input:focus,
select:focus,
textarea:focus{
  border-color:rgba(31,111,224,.6);
  box-shadow:0 0 0 4px rgba(31,111,224,.08);
}
textarea{resize:vertical;min-height:88px}

.helper,
.subtle{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.5;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.icon-button,
.range-tab,
.user-chip,
.status-chip,
.composer-plus,
.composer-calendar,
.mic-fab,
.nav-item,
.voice-btn,
.more-card,
.link-button{
  border:0;
  cursor:pointer;
  font:inherit;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, opacity .15s ease;
}
.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.icon-button:hover,
.range-tab:hover,
.user-chip:hover,
.status-chip:hover,
.composer-plus:hover,
.mic-fab:hover,
.nav-item:hover,
.voice-btn:hover,
.more-card:hover,
.link-button:hover{
  transform:translateY(-1px);
}

.primary-btn{
  background:linear-gradient(145deg, var(--blue), #2a7cff);
  color:#fff;
  font-weight:800;
  padding:14px 18px;
  border-radius:18px;
  box-shadow:0 14px 24px rgba(31,111,224,.18);
}
.secondary-btn{
  background:#edf3fb;
  color:#234;
  font-weight:700;
  padding:14px 18px;
  border-radius:18px;
}
.danger-btn{
  background:var(--red-weak);
  color:#ae2626;
  font-weight:700;
  padding:14px 18px;
  border-radius:18px;
}

.main-view{
  max-width:980px;
  margin:0 auto;
  padding-bottom:118px;
  position:relative;
}

.top-bar{
  padding:16px 16px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:6px;
}

.icon-button{
  width:42px;
  height:42px;
  border-radius:14px;
  background:transparent;
  color:#344054;
  display:grid;
  place-items:center;
  position:relative;
}
.icon-button.bell{
  background:transparent;
  border:0;
  width:38px;
  height:38px;
  border-radius:999px;
  color:#3b4250;
  font-size:1.05rem;
}
.badge{
  position:absolute;
  top:-5px;
  right:-4px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:var(--red);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  display:grid;
  place-items:center;
}

.brand-title{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
  min-width:0;
}
.calendar-mark{
  width:46px;
  height:46px;
  border-radius:14px;
  background:#e8f1ff;
  color:var(--blue);
  display:grid;
  place-items:center;
  font-size:1.2rem;
  flex:0 0 auto;
}
.brand-title h1{
  font-size:1.08rem;
  line-height:1.1;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.avatar-slot,
.avatar{
  width:44px;
  height:44px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  color:#fff;
  font-size:.8rem;
  font-weight:800;
  overflow:hidden;
  flex:0 0 auto;
  background:#cfd8e3;
  border:2px solid #fff;
  box-shadow:0 10px 22px rgba(15,23,42,.12);
}
.chip-avatar{
  width:24px;
  height:24px;
  font-size:.65rem;
  border-width:1px;
}
.avatar.photo,
.avatar-slot{
  background-size:cover;
  background-position:center;
}
.avatar.large{
  width:78px;
  height:78px;
}
.avatar.empty{
  background:#e8edf4;
  color:#344054;
}
.avatar.tiny{
  width:22px;
  height:22px;
  font-size:.62rem;
  margin-right:6px;
}

.metrics{
  margin-top:14px;
  padding:14px 10px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:0;
}
.metric{
  padding:6px 6px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  text-align:center;
}
.metric + .metric{
  border-left:1px solid var(--line);
}
.metric-value{
  display:block;
  font-size:1.6rem;
  line-height:1;
}
.metric-blue{color:var(--blue)}
.metric-amber{color:var(--amber)}
.metric-green{color:var(--green)}
.metric span:last-child{
  display:block;
  color:var(--muted);
  font-size:.9rem;
  margin-top:0;
}

.range-picker{
  margin-top:14px;
  padding:14px 14px 12px;
}
.range-tabs{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
}
.range-tab{
  border-radius:18px;
  padding:13px 10px;
  font-weight:800;
  color:#394150;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.range-tab i{
  font-size:.95rem;
}
.range-tab.active{
  background:linear-gradient(145deg, var(--blue), #2f80ff);
  color:#fff;
  box-shadow:0 10px 20px rgba(31,111,224,.18);
}
.swipe-hint{
  margin-top:12px;
  text-align:center;
  color:var(--muted);
  font-size:.88rem;
}

.filters{
  margin-top:14px;
  padding:12px 14px 14px;
  display:grid;
  gap:12px;
}
.filters-row{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  overflow:auto;
  padding-bottom:2px;
}
.user-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 10px 6px 6px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:#1f2937;
  white-space:nowrap;
  box-shadow:var(--shadow-soft);
  font-size:.78rem;
}
.user-chip .avatar{
  box-shadow:none;
}
.user-chip.active{
  background:#eaf2ff;
  border-color:rgba(31,111,224,.22);
  color:var(--blue);
}
.status-row{
  display:flex;
  justify-content:center;
}
.status-chip{
  border-radius:999px;
  padding:10px 16px;
  background:#fff6e8;
  color:#b06600;
  font-weight:800;
  border:1px solid rgba(245,166,35,.2);
}
.status-chip.active{
  background:#ffe8e8;
  color:var(--red);
  border-color:rgba(225,70,70,.18);
}

.content{
  margin-top:14px;
  padding:14px 14px 16px;
}
.content-head{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:0;
}
.content-head h2{
  margin-top:2px;
  font-size:1.62rem;
  line-height:1.1;
}
.content-count{
  color:var(--blue);
  font-weight:700;
  font-size:.92rem;
}

.empty-state{
  margin-top:18px;
  padding:20px 16px 18px;
  border-radius:30px;
  text-align:center;
  border:1px solid #e1e8f2;
  background:linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
}
.empty-illustration{
  width:min(170px, 58%);
  max-width:170px;
  display:block;
  margin:0 auto 8px;
  filter: drop-shadow(0 14px 24px rgba(31,111,224,.08));
}
.empty-state strong{
  display:block;
  font-size:1.04rem;
  margin-bottom:4px;
}
.empty-state p{
  color:var(--muted);
  line-height:1.55;
  max-width:420px;
  margin:0 auto;
}
.empty-note{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:10px;
  padding:10px 14px;
  border-radius:16px;
  background:#eef4ff;
  color:#4862aa;
  font-size:.92rem;
  font-weight:600;
}

.event-list,
.event-list-stack{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.event-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow-soft);
}
.event-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-size:1.2rem;
  flex:0 0 auto;
}
.event-icon.blue{background:#eaf2ff;color:var(--blue)}
.event-icon.amber{background:#fff4df;color:var(--amber)}
.event-icon.red{background:#ffe8e8;color:var(--red)}
.event-icon i{font-size:1.15rem}
.event-body{
  min-width:0;
}
.event-topline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.event-topline strong{
  font-size:1rem;
  line-height:1.35;
}
.event-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  margin-top:8px;
  color:var(--muted);
  font-size:.9rem;
}
.event-meta span{
  display:inline-flex;
  align-items:center;
}
.event-more{
  width:34px;
  height:34px;
  border-radius:999px;
  background:#f6f8fb;
  color:#64748b;
  display:grid;
  place-items:center;
}

.status-pill{
  padding:7px 10px;
  border-radius:999px;
  font-size:.76rem;
  font-weight:800;
  text-transform:capitalize;
  background:#eef2f7;
  color:#334155;
  white-space:nowrap;
}
.status-pill.pending{background:#fff3e0;color:#af6b00}
.status-pill.completed{background:#e8f6ea;color:#1f7d36}
.status-pill.cancelled{background:#fbe4e4;color:#c43b3b}

.more-card{
  margin-top:10px;
  width:100%;
  padding:13px 16px;
  border-radius:18px;
  background:#f7fafc;
  color:#475569;
  border:1px dashed var(--line);
  font-weight:700;
}

.calendar-group{
  display:grid;
  gap:10px;
  padding:14px 0;
}
.calendar-group + .calendar-group{
  border-top:1px solid var(--line);
}
.calendar-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.calendar-head h3{
  font-size:1.06rem;
}
.calendar-head span{
  color:var(--muted);
  font-size:.9rem;
}

.link-button{
  margin-top:16px;
  width:100%;
  background:transparent;
  color:var(--blue);
  font-weight:800;
  padding:10px 0 4px;
}

.composer{
  margin-top:14px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:12px;
  border-radius:999px;
  width:min(72%, 560px);
}
.composer-plus,
.composer-calendar{
  width:40px;
  height:40px;
  border-radius:999px;
  background:#eaf2ff;
  color:var(--blue);
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-weight:900;
}
.composer-text{
  flex:1;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.96rem;
}

.mic-fab{
  position:fixed;
  right:16px;
  bottom:98px;
  width:72px;
  height:72px;
  border-radius:999px;
  background:linear-gradient(145deg, var(--blue), #2f80ff);
  color:#fff;
  font-size:1.9rem;
  display:grid;
  place-items:center;
  box-shadow:0 20px 36px rgba(31,111,224,.28);
  z-index:30;
}

.bottom-nav{
  position:fixed;
  left:50%;
  bottom:12px;
  transform:translateX(-50%);
  width:min(100%, 960px);
  padding:10px 10px 8px;
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:8px;
  z-index:25;
}
.nav-item{
  background:transparent;
  color:#667085;
  padding:10px 6px;
  border-radius:18px;
  display:grid;
  place-items:center;
  gap:4px;
}
.nav-item span i{
  font-size:1rem;
}
.nav-item strong{
  font-size:.72rem;
  font-weight:700;
}
.nav-item.center{
  background:linear-gradient(145deg, var(--blue), #2f80ff);
  color:#fff;
  transform:translateY(-12px);
  box-shadow:0 14px 24px rgba(31,111,224,.24);
}
.nav-item.active{
  color:var(--blue);
}

.modal{
  position:fixed;
  inset:0;
  z-index:50;
  display:grid;
  place-items:center;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.38);
}
.modal-card{
  position:relative;
  width:min(680px, calc(100% - 20px));
  max-height:86vh;
  overflow:auto;
  padding:18px;
  z-index:1;
}
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.modal-head h3{
  font-size:1.46rem;
}
.voice-card{
  display:flex;
  gap:14px;
  padding:14px;
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:22px;
  margin-bottom:14px;
}
.voice-btn{
  width:58px;
  height:58px;
  border-radius:999px;
  background:linear-gradient(145deg, var(--blue), #2f80ff);
  color:#fff;
  font-size:1.6rem;
  flex:0 0 auto;
}
.voice-card p{
  color:var(--muted);
  line-height:1.5;
  margin-top:4px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.checkline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:4px 0;
  color:#344054;
}
.checkline input{
  width:18px;
  height:18px;
  margin:0;
}

.reminder-box{
  border:1px solid var(--line);
  background:#fbfdff;
  border-radius:22px;
  padding:14px;
  display:grid;
  gap:12px;
}
.reminder-box p{
  color:var(--muted);
  font-size:.92rem;
  margin-top:4px;
}
.reminder-inline{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.form-actions{
  display:flex;
  gap:12px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.parse-preview{
  border:1px solid var(--line);
  border-radius:18px;
  background:#f8fbff;
  padding:12px 14px;
}
.preview-grid{
  display:grid;
  gap:6px;
  margin:10px 0;
  color:var(--muted);
  font-size:.92rem;
}

.detail-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin:16px 0;
}
.detail-grid > div{
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  padding:12px;
}
.detail-grid span{
  display:block;
  color:var(--muted);
  font-size:.82rem;
  margin-bottom:4px;
}
.detail-notes{
  color:#334155;
  line-height:1.65;
}
.detail-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.users-grid{
  display:grid;
  gap:14px;
}
.users-panel{
  border:1px solid var(--line);
  background:#fbfdff;
  border-radius:24px;
  padding:16px;
}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.profile-list{
  display:grid;
  gap:10px;
}
.profile-card{
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:14px;
  box-shadow:var(--shadow-soft);
}
.profile-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.profile-avatar{
  width:78px;
  height:78px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#f1f5fb;
  overflow:hidden;
}
.profile-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.small-pill{
  padding:7px 10px;
  border-radius:999px;
  background:#edf3fb;
  color:#2d4f8c;
  font-size:.82rem;
  font-weight:700;
}

.toast{
  position:fixed;
  left:50%;
  bottom:110px;
  transform:translateX(-50%) translateY(16px);
  background:#111827;
  color:#fff;
  border-radius:999px;
  padding:12px 16px;
  box-shadow:var(--shadow);
  opacity:0;
  pointer-events:none;
  transition:opacity .25s, transform .25s;
  z-index:60;
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

@media (max-width: 760px){
  .page-shell{padding:10px}
  .main-view{padding-bottom:136px}
  .top-bar{
    gap:10px;
  }
  .brand-title h1{font-size:1rem}
  .metrics{grid-template-columns:repeat(3, minmax(0, 1fr))}
  .metric{flex-direction:column;gap:2px;padding:7px 2px}
  .metric + .metric{border-left:1px solid var(--line)}
  .range-tabs{grid-template-columns:repeat(3, minmax(0, 1fr))}
  .range-tab{padding:10px 6px;font-size:.86rem;gap:6px}
  .range-tab span{white-space:nowrap}
  .content-head{
    flex-direction:column;
  }
  .content-head h2{font-size:1.7rem}
  .event-card{
    grid-template-columns:auto 1fr;
  }
  .event-more{
    grid-column:2;
    justify-self:end;
    margin-top:-4px;
  }
  .form-grid,
  .reminder-inline,
  .detail-grid{
    grid-template-columns:1fr;
  }
  .bottom-nav{
    grid-template-columns:repeat(5, minmax(0, 1fr));
  }
  .nav-item.center{
    transform:translateY(-10px);
  }
  .mic-fab{
    right:12px;
    bottom:102px;
    width:70px;
    height:70px;
  }
  .auth-view{
    margin-top:12px;
  }
  .user-chip{font-size:.8rem;padding:7px 10px 7px 7px}
  .avatar{width:24px;height:24px;font-size:.65rem}
  .empty-illustration{width:min(150px, 60%)}
  .composer{width:min(74%, 520px)}
}
