:root{
  --bg:#071a2d;
  --bg2:#051427;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --fg:#ffffff;
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.55);
  --line:rgba(255,204,83,.38);
  --line2:rgba(255,204,83,.22);
  --accent:#FFCC53;
  --accent2:rgba(255,204,83,.16);
  --danger:#ff6b6b;
  --success:#44d19d;
  --shadow:0 14px 40px rgba(0,0,0,.35);
  --shadow2:0 10px 26px rgba(0,0,0,.25);
  --radius:16px;
  --radius2:12px;
  --focus:0 0 0 4px rgba(255,204,83,.18);
  --mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  --sans:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Arial,sans-serif;
  --surface:rgba(0,0,0,.12);
  --surface2:rgba(0,0,0,.18);
  --surface3:rgba(0,0,0,.22);
}

body.light{
  --bg:#f6f8fb;
  --bg2:#e9eef6;
  --card:rgba(0,0,0,.04);
  --card2:rgba(0,0,0,.06);
  --fg:#071a2d;
  --muted:rgba(7,26,45,.72);
  --muted2:rgba(7,26,45,.55);
  --line:rgba(7,26,45,.16);
  --line2:rgba(7,26,45,.10);
  --accent:#c4911a;
  --accent2:rgba(196,145,26,.14);
  --danger:#d64545;
  --success:#138a62;
  --shadow:0 14px 40px rgba(0,0,0,.12);
  --shadow2:0 10px 26px rgba(0,0,0,.10);
  --focus:0 0 0 4px rgba(196,145,26,.18);
  --surface:rgba(255,255,255,.70);
  --surface2:rgba(255,255,255,.85);
  --surface3:rgba(255,255,255,.92);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:var(--sans);
  color:var(--fg);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(255,204,83,.14), transparent 60%),
    radial-gradient(1000px 520px at 90% 20%, rgba(68,209,157,.10), transparent 55%),
    radial-gradient(900px 520px at 50% 120%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.wrap{
  max-width:1700px;
  margin:0 auto;
  padding:22px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar-right{
  margin-left:auto;
}

.row{
  display:grid;
  grid-template-columns:minmax(320px,.35fr) 1fr;
  gap:14px;
  align-items:start;
}

.card{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.045));
  border:1px solid var(--line2);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow2);
  overflow:hidden;
}

.card:before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(420px 220px at 15% 20%, rgba(255,204,83,.16), transparent 70%),
    radial-gradient(380px 220px at 85% 10%, rgba(68,209,157,.10), transparent 70%);
  opacity:.6;
  pointer-events:none;
}

.card > *{position:relative}

h1,h2{
  margin:0 0 12px 0;
  letter-spacing:.2px;
}
h1{font-size:22px}
h2{font-size:18px}

.small{
  font-size:12px;
  color:var(--muted2);
}

.mono{font-family:var(--mono)}

.badge,.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line2);
  background:var(--surface2);
  color:var(--muted);
  font-weight:800;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.pill:hover{text-decoration:none}

.inline{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

label{
  display:block;
  margin:10px 0 6px 0;
  color:var(--muted);
  font-weight:700;
  letter-spacing:.2px;
}

input,select,textarea,button{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line2);
  background:var(--surface2);
  color:var(--fg);
  outline:none;
  font-family:var(--sans);
  font-size:14px;
}

input,select,textarea{
  padding:12px 12px;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

textarea{
  resize:vertical;
  min-height:54px;
  font-family:var(--mono);
  line-height:1.35;
}

input:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:var(--focus);
}

select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.85) 50%),
    linear-gradient(135deg, rgba(255,255,255,.85) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:34px;
}

button{
  padding:12px 14px;
  cursor:pointer;
  font-weight:900;
  letter-spacing:.2px;
  background:linear-gradient(180deg, rgba(255,204,83,.22), rgba(255,204,83,.12));
  border-color:rgba(255,204,83,.35);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

button:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow);
  background:linear-gradient(180deg, rgba(255,204,83,.26), rgba(255,204,83,.14));
  border-color:rgba(255,204,83,.48);
}

button:active{
  transform:translateY(0);
  box-shadow:none;
}

button:focus{box-shadow:var(--focus)}

.err,.ok{
  margin-top:10px;
  font-weight:900;
  letter-spacing:.2px;
}

.err{color:var(--danger)}
.ok{color:var(--success)}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--line2);
  border-radius:14px;
  overflow:hidden;
  background:var(--surface);
}

.table th,.table td{
  padding:12px;
  border-bottom:1px solid rgba(255,204,83,.18);
  vertical-align:top;
}

.table th{
  text-align:left;
  color:var(--fg);
  font-weight:900;
  background:linear-gradient(180deg, var(--surface2), var(--surface));
  position:sticky;
  top:0;
  z-index:1;
}

.table tr:last-child td{border-bottom:none}

.table td textarea{
  background:var(--surface3);
  border-color:rgba(255,204,83,.22);
}

hr{
  border:none;
  height:1px;
  background:rgba(255,204,83,.18);
  margin:14px 0;
}

.headbar{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.searchbar{
  width:100%;
  max-width:820px;
  margin-left:auto;
}

.searchwrap{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
}

.search{
  width:1%;
  flex:1 1 auto;
  min-width:260px;
}

.btn-mini{
  width:auto;
  flex:0 0 auto;
  padding:10px 16px;
  border-radius:999px;
}

.pill-ghost{
  background:rgba(0,0,0,.10);
}

body.light .pill-ghost{
  background:rgba(0,0,0,.06);
}

.pill-primary{
  background:linear-gradient(180deg, rgba(255,204,83,.26), rgba(255,204,83,.14));
  border-color:rgba(255,204,83,.55);
  color:var(--fg);
  text-decoration:none;
}

.pill-primary:hover{
  text-decoration:none;
  box-shadow:var(--shadow2);
}

.meta{
  margin-top:8px;
  display:flex;
  justify-content:flex-end;
}

.table-meetings .th-actions{width:220px}
.table-meetings .td-actions{vertical-align:middle}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
}

.actions .pill,
.actions button{
  width:auto;
  min-width:96px;
  justify-content:center;
}

.btn-danger{
  width:auto;
  padding:10px 14px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(255,107,107,.22), rgba(255,107,107,.12));
  border-color:rgba(255,107,107,.40);
}

.btn-danger:hover{
  box-shadow:var(--shadow);
  border-color:rgba(255,107,107,.60);
}

.titleline{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--line2);
  background:var(--surface2);
  color:var(--muted);
  font-weight:900;
  font-size:12px;
}

.empty{
  padding:22px 12px;
}

.pager{
  margin-top:12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.pager-left{white-space:nowrap}

.pager-right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.pager-pages{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.pill-current{
  background:linear-gradient(180deg, rgba(255,204,83,.30), rgba(255,204,83,.16));
  border-color:rgba(255,204,83,.60);
  color:var(--fg);
  text-decoration:none;
}

.dots{
  color:var(--muted2);
  font-weight:900;
  padding:0 2px;
}

.is-disabled{
  opacity:.45;
  pointer-events:none;
}

.meeting-hero{
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
}

.meeting-title{
  margin:0 0 10px 0;
  font-size:22px;
  letter-spacing:.2px;
}

.meeting-meta{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:8px;
}

.meta-item{
  border:1px solid rgba(255,204,83,.18);
  background:var(--surface);
  border-radius:14px;
  padding:10px 12px;
}

.meta-label{
  font-size:11px;
  color:var(--muted2);
  font-weight:900;
  letter-spacing:.22px;
  text-transform:uppercase;
  margin-bottom:6px;
}

.meta-value{
  font-weight:900;
  color:var(--fg);
  word-break:break-word;
}

.meeting-row{
  grid-template-columns:1.05fr .95fr;
}

.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.btn-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.btn-row .pill{
  width:auto;
  justify-content:center;
}

.notes-box{
  border:1px solid rgba(255,204,83,.18);
  background:var(--surface);
  border-radius:14px;
  padding:12px;
  white-space:pre-wrap;
  font-family:var(--mono);
  color:rgba(255,255,255,.88);
  line-height:1.45;
  max-height:420px;
  overflow:auto;
}

body.light .notes-box{
  color:rgba(7,26,45,.88);
}

.danger-box{
  border:1px solid rgba(255,107,107,.28);
  background:rgba(255,107,107,.08);
  border-radius:14px;
  padding:12px;
}

.btn-cta{
  width:auto;
  min-width:180px;
  padding:12px 16px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(255,204,83,.30), rgba(255,204,83,.14));
  border-color:rgba(255,204,83,.60);
}

.user-menu{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.user-trigger{
  cursor:pointer;
}

.user-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:180px;
  background:linear-gradient(140deg, rgb(49 57 59), rgb(9 30 48));
  border:1px solid var(--line2);
  border-radius:14px;
  box-shadow:var(--shadow2);
  padding:6px;
  display:none;
  z-index:50;
}

body.light .user-dropdown{
  background:linear-gradient(140deg, rgba(255,255,255,.92), rgba(240,245,255,.92));
}

.user-dropdown a{
  display:block;
  padding:10px 12px;
  border-radius:10px;
  color:var(--fg);
  font-weight:800;
  text-decoration:none;
}

.user-dropdown a:hover{
  background:rgba(255,204,83,.16);
  text-decoration:none;
}

.user-dropdown.is-open{display:block}

.pref-row{
  grid-template-columns:1fr 1fr;
}

.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.auth-card{
  width:100%;
  max-width:420px;
  padding:18px;
}

.auth-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.meeting-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.meeting-actions .btn-cta{
  padding:10px 22px;
  font-size:14px;
  font-weight:600;
  border-radius:999px;
  background:linear-gradient(135deg, #d4af37, #ffcc53);
  color:#051b2e;
  border:none;
  box-shadow:0 6px 16px rgba(255,204,83,.35);
}

.meeting-actions .pill-ghost{
  padding:6px 14px;
  font-size:12px;
  font-weight:500;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color:#cfd8dc;
  border:1px solid rgba(255,204,83,.35);
  box-shadow:none;
}

body.light .meeting-actions .pill-ghost{
  background:linear-gradient(135deg, rgba(0,0,0,.04), rgba(0,0,0,.02));
  color:rgba(7,26,45,.75);
}

.meeting-actions .btn-danger{
  padding:6px 14px;
  font-size:12px;
  font-weight:500;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(255,0,0,.15), rgba(255,0,0,.05));
  color:#ffb4b4;
  border:1px solid rgba(255,120,120,.5);
  box-shadow:none;
}

body.light .meeting-actions .btn-danger{
  color:rgba(214,69,69,.95);
}

.share-row{
  margin-top:12px;
  display:flex;
  align-items:flex-end;
  gap:10px;
}

.share-left{
  flex:1;
  min-width:0;
}

.share-input{
  width:100%;
  margin-top:6px;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.table-wrap .table{
  min-width:720px;
  width:100%;
}

.table-meetings .td-actions{
  white-space:nowrap;
}

.table-meetings .actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.table-meetings .mono{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.table-meetings td.td-actions{
  padding-top:6px;
  padding-bottom:6px;
  vertical-align:middle;
}

.actions-inline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:auto;
}

.actions-inline form{
  margin:0;
}

.actions-inline .open-btn{
  padding:5px 12px;
  font-size:12px;
  line-height:1;
  height:28px;
}

.pref-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  align-items:start;
}

.pref-span{
  grid-column:1 / -1;
}

.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.btn{
  width:100%;
}

.grid-3{
  display:grid;
  gap:12px;
  grid-template-columns:1fr;
}
.theme-toggle{
  width:auto;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
}

.theme-track{
  display:flex;
  align-items:center;
  gap:10px;
  padding:4px;
  border-radius:20px;
  border:1px solid var(--line2);
  background:var(--surface2);
}

.theme-ico{
  width:25px;
  height:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  color:rgba(255,255,255,.7);
  opacity:.55;
  transition:opacity .2s ease, transform .2s ease, color .2s ease;
}
button.theme-toggle:focus,
button.theme-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.theme-thumb{
  width:25px;
  height:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  background:rgb(22, 20, 20);
  color:var(--fg);
  transition:transform .25s ease, background .25s ease, color .25s ease;
}

body.light .theme-thumb{
  transform:translateX(-38px);
  background:rgb(191, 241, 9);
  color:var(--fg);
}

body.light .theme-sun{
  opacity:1;
  color:var(--accent);
}

body:not(.light) .theme-ico{
  opacity:.35;
}

body:not(.light) .theme-thumb{
  transform:translateX(0);
}

body:not(.light) .theme-sun{
  opacity:.35;
}

body:not(.light) .theme-track .theme-ico{
  opacity:.35;
}

body.light .theme-track .theme-ico{
  opacity:.35;
}

body.light .theme-track .theme-sun{
  opacity:1;
}

@media(min-width:860px){
  .grid-3{grid-template-columns:2fr 1fr 1fr}
}

@media (max-width: 1100px){
  .meeting-meta{grid-template-columns:1fr 1fr}
}

@media (max-width: 900px){
  .wrap{padding:16px}
  .row{grid-template-columns:1fr}
  .topbar{flex-direction:column;align-items:flex-start}
  .searchbar{max-width:100%;margin-left:0}
  .table-meetings .th-actions{width:auto}
  .actions{justify-content:flex-start;flex-wrap:wrap}
  .meeting-hero{flex-direction:column}
  .btn-cta{width:100%}
  .meeting-meta{grid-template-columns:1fr}
  .meeting-row{grid-template-columns:1fr}
  .pref-row{grid-template-columns:1fr}
  .pref-grid{grid-template-columns:1fr}
  .two-col{grid-template-columns:1fr}
  .actions{justify-content:stretch}
  .actions .pill{width:100%;text-align:center}
}

@media (max-width: 820px){
  .table-wrap .table{min-width:760px}
}

@media (max-width: 560px){
  .topbar{flex-wrap:nowrap}
  .topbar-left{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
  }
  .topbar-right{
    flex:0 0 auto;
    margin-left:auto;
  }
}

.meeting-actions .pill-ghost:hover{
  background:linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
}

body.light .meeting-actions .pill-ghost:hover{
  background:linear-gradient(135deg, rgba(0,0,0,.08), rgba(0,0,0,.03));
}

.meeting-actions .btn-danger:hover{
  background:linear-gradient(135deg, rgba(255,0,0,.25), rgba(255,0,0,.1));
}

@media (max-width: 520px){
  .wrap{padding:12px}
  .card{padding:14px;border-radius:14px}
  h1{font-size:20px}
  h2{font-size:17px}
  input,select,textarea,button{border-radius:12px}
  .badge,.pill{padding:7px 10px}
  .table th,.table td{padding:10px}
  .searchwrap{flex-direction:column;align-items:stretch;gap:8px}
  .search{min-width:0;width:100%}
  .btn-mini{width:100%}
  .actions{flex-direction:column;align-items:stretch;gap:8px}
  .actions .pill,
  .actions button{width:100%}
  .auth-wrap{padding:12px}
  .auth-card{padding:14px}
}

@media (prefers-reduced-motion: reduce){
  *{transition:none !important;scroll-behavior:auto !important}
}
