/* OBN Meetings — modern finish for the bright pages (home, sign-in, dashboard).
   Loaded last. Soft depth, the brand gradient used sparingly, and gentle
   entrance motion. Everything moving respects "reduce motion". */

:root {
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --brand-grad: linear-gradient(135deg, #f7941d, #e8344a 45%, #a42fd1);
  --blue-grad: linear-gradient(135deg, #5b7cff, #3651d4);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05), 0 4px 14px -6px rgba(17, 24, 39, .10);
  --shadow-md: 0 2px 6px rgba(17, 24, 39, .05), 0 16px 40px -18px rgba(17, 24, 39, .28);
}

html, body {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(164, 47, 209, .07), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(247, 148, 29, .07), transparent 60%),
    #f5f6f9;
  background-attachment: fixed;
}

/* Header: frosted and sticky. */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .75); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom-color: rgba(17, 24, 39, .06); }
.profile { background: var(--brand-grad); box-shadow: 0 6px 16px -8px rgba(232, 52, 74, .9); transition: transform .2s var(--spring); }
.profile:hover { transform: scale(1.06); }

/* Buttons */
.btn { border-radius: 12px; transition: transform .12s var(--ease), box-shadow .2s, background .2s, filter .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--blue-grad); box-shadow: 0 8px 20px -10px rgba(54, 81, 212, .9); }
.btn.primary:hover { background: var(--blue-grad); filter: brightness(1.07); }
.btn.ghost { box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: #fff; border-color: #cfd5de; }

/* Home: the four big actions rise in one after another and lift on hover. */
.action { animation: rise .55s var(--ease) both; }
.action:nth-child(2) { animation-delay: .06s; }
.action:nth-child(3) { animation-delay: .12s; }
.action:nth-child(4) { animation-delay: .18s; }
.tile {
  position: relative; overflow: hidden; border-radius: 28px;
  background: var(--blue-grad);
  box-shadow: 0 14px 30px -14px rgba(54, 81, 212, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), filter .2s;
}
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .28), transparent 45%); pointer-events: none; }
.tile:hover { background: var(--blue-grad); transform: translateY(-4px) scale(1.03); box-shadow: 0 22px 40px -16px rgba(54, 81, 212, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tile:active { transform: scale(.96); }
.tile.orange { background: var(--brand-grad); box-shadow: 0 14px 30px -14px rgba(232, 52, 74, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tile.orange:hover { background: var(--brand-grad); box-shadow: 0 22px 40px -16px rgba(232, 52, 74, 1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tile svg { transition: transform .3s var(--spring); }
.tile:hover svg { transform: scale(1.08) rotate(-4deg); }
.action > span { font-weight: 600; color: #4b5563; }

.agenda { border: 0; border-radius: 22px; box-shadow: var(--shadow-md); animation: rise .6s var(--ease) .1s both; }
.clock { position: relative; overflow: hidden; }
.clock::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .12) 50%, transparent 60%); transform: translateX(-100%); animation: sweep 6s ease-in-out 1.2s 1; pointer-events: none; }
.clock .time { text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.meeting-row { transition: background .2s; }
.meeting-row:hover { background: #fafbfd; }
.meeting-row .when.live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #16a34a; vertical-align: 1px; animation: live 1.6s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 100% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); } }

/* Menus and modals: fade and scale in. */
.menu { border: 0; border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(17, 24, 39, .4), 0 0 0 1px rgba(17, 24, 39, .06); animation: menuIn .18s var(--ease); }
.overlay { background: rgba(17, 24, 39, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.overlay:not(.hidden) .modal { animation: dialogIn .34s var(--spring); }
.modal { border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(17, 24, 39, .55); }
.toast { border-radius: 999px !important; animation: toastIn .3s var(--spring); }
input, select, textarea { transition: border-color .2s, box-shadow .2s; }
.modal input:focus, .modal select:focus, .modal textarea:focus, .auth-card input:focus, .dash-main input:focus, .dash-main select:focus, .dash-main textarea:focus { outline: none; border-color: #5b7cff; box-shadow: 0 0 0 4px rgba(91, 124, 255, .18); }

/* Sign-in */
.auth-card { border: 0; border-radius: 24px; box-shadow: var(--shadow-md); animation: rise .55s var(--ease) both; position: relative; overflow: hidden; }
.auth-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-grad); }
.auth-card .sso-btn { box-shadow: var(--shadow-sm); }

/* Dashboard */
.dash-nav button { position: relative; transition: background .2s, color .2s, transform .15s var(--ease); }
.dash-nav button:hover { transform: translateX(2px); }
.dash-nav button.sel { background: #fff; color: #3651d4; box-shadow: var(--shadow-sm); }
.dash-nav button.sel::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand-grad); animation: grow .3s var(--ease); }
.dash-main > section:not(.hidden) { animation: rise .35s var(--ease); }
.card, .an-tile { border: 0 !important; box-shadow: var(--shadow-sm); border-radius: 18px !important; }
.an-tile { transition: transform .2s var(--ease), box-shadow .2s; }
.an-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.an-tile-v { background: linear-gradient(135deg, #1d2129, #3651d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rows > li { border: 0 !important; box-shadow: var(--shadow-sm); border-radius: 16px !important; transition: transform .2s var(--ease), box-shadow .2s; animation: rise .4s var(--ease) both; }
.rows > li:nth-child(2) { animation-delay: .03s; } .rows > li:nth-child(3) { animation-delay: .06s; } .rows > li:nth-child(4) { animation-delay: .09s; } .rows > li:nth-child(n+5) { animation-delay: .12s; }
.rows > li:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.tag { border-radius: 999px !important; }
.tag.live { animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 50% { filter: brightness(1.15); } }
.nav-badge { animation: popIn .35s var(--spring); }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes menuIn { from { opacity: 0; scale: .97; translate: 0 -6px; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes sweep { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Rows with many actions: the buttons go on their own line under the title. */
.rows > li:has(.acts > :nth-child(4)) .acts { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; margin-top: 6px; }
.rows > li:has(.acts > :nth-child(4)) { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------------- dark mode
   Follows the phone/computer setting, or the moon button in the header (remembered). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1014;
  --surface: #191a20;
  --line: #2a2c35;
  --text: #eceef3;
  --muted: #9aa0ad;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -8px rgba(0, 0, 0, .6);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 44px -18px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"], :root[data-theme="dark"] body {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(164, 47, 209, .14), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(247, 148, 29, .08), transparent 60%),
    #0f1014;
}
:root[data-theme="dark"] .nav { background: rgba(15, 16, 20, .72); border-bottom-color: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .btn.ghost { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .btn.ghost:hover { background: #22242c; border-color: #3a3d48; }
:root[data-theme="dark"] .dash-nav button.sel, :root[data-theme="dark"] .dash-nav button:hover { background: var(--surface); color: #8ea4ff; }
:root[data-theme="dark"] .meeting-row:hover { background: #1e2027; }
:root[data-theme="dark"] .an-tile-v { background: linear-gradient(135deg, #ffffff, #8ea4ff); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="dark"] .tag.live { background: rgba(232, 52, 74, .18); color: #ff8b98; }
:root[data-theme="dark"] .seg-mini button.sel { background: rgba(91, 124, 255, .18); color: #a9b8ff; }
:root[data-theme="dark"] .chart .grid { stroke: #2a2c35; }
:root[data-theme="dark"] .twostep-banner { background: rgba(247, 201, 72, .12); border-color: rgba(247, 201, 72, .35); }
:root[data-theme="dark"] .auth-ok { background: rgba(22, 163, 74, .15); color: #7ee2a2; }
:root[data-theme="dark"] .toast { background: #eceef3; color: #111; }
:root[data-theme="dark"] .overlay { background: rgba(0, 0, 0, .5); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #13141a; color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] .menu, :root[data-theme="dark"] .modal { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .an-table th, :root[data-theme="dark"] .an-table td { border-color: var(--line); }

.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .3s var(--spring); }
.theme-btn:hover { transform: rotate(-18deg) scale(1.06); }
.theme-btn svg { width: 18px; height: 18px; }

/* Personal home */
.clock .greet { font-size: 15px; font-weight: 600; opacity: .9; margin-bottom: 6px; animation: rise .6s var(--ease) .15s both; }
.next-up { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; font-weight: 600; animation: rise .5s var(--ease) .3s both; max-width: 100%; }
.next-up #next-up-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nu-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ecbff; flex: none; }
.next-up.soon .nu-dot { background: #4ade80; animation: live 1.6s ease-out infinite; }
.nu-start { flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff; color: #1d2a6b; font-weight: 700; cursor: pointer; transition: transform .15s var(--ease); }
.nu-start:hover { transform: scale(1.05); }
.recent { grid-column: 1 / -1; animation: rise .6s var(--ease) .2s both; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 12px; }
.recent-head h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recent-head a { color: #3651d4; font-weight: 600; font-size: 14px; text-decoration: none; }
.recent-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .recent-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rec-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; min-width: 0; }
.rec-pic { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: linear-gradient(135deg, #24306b, #4b2a6e) center / cover; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.rec-pic::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%231d2a6b'/%3E%3C/svg%3E") 55% 50% / 20px no-repeat; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s var(--spring); }
.rec-card:hover .rec-pic { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rec-card:hover .rec-pic::before { opacity: 1; transform: none; }
.rec-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 600; }
.rec-card b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.rec-card small { color: var(--muted); font-size: 12.5px; }

/* Quick search (Ctrl+K) */
.cmdk-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .2s, color .2s; }
.cmdk-btn:hover { color: var(--text); border-color: #c2c9d4; }
.cmdk-btn svg { width: 16px; height: 16px; }
.cmdk-btn kbd, .cmdk-input kbd { font: 600 11px/1 inherit; padding: 4px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 640px) { .cmdk-btn span, .cmdk-btn kbd { display: none; } .cmdk-btn { width: 36px; padding: 0; justify-content: center; } }
.cmdk { position: fixed; inset: 0; z-index: 150; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(17, 24, 39, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .15s ease; }
.cmdk.hidden { display: none; }
.cmdk-panel { width: min(620px, 100%); border-radius: 20px; background: var(--surface); box-shadow: 0 40px 100px -30px rgba(17, 24, 39, .6), 0 0 0 1px rgba(17, 24, 39, .06); overflow: hidden; animation: dialogIn .25s var(--spring); }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input svg { width: 20px; height: 20px; flex: none; }
.cmdk-input input { flex: 1; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: none; font: inherit; font-size: 17px; color: var(--text); padding: 4px 0; }
.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.cmdk-item.sel { background: color-mix(in srgb, #5b7cff 12%, transparent); }
.cmdk-item b { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.cmdk-item small { color: var(--muted); font-size: 12.5px; }
.cmdk-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--blue-grad); }
.cmdk-ic.meeting { background: var(--brand-grad); }
.cmdk-ic.recording { background: linear-gradient(135deg, #22c55e, #0e7a4b); }
.cmdk-empty { padding: 18px; text-align: center; color: var(--muted); }

/* Empty lists */
li.empty-art, .empty-art.empty-row { display: flex !important; flex-direction: column; align-items: center; gap: 10px; padding: 36px 20px 30px; text-align: center; color: var(--muted); box-shadow: none !important; background: color-mix(in srgb, var(--surface) 60%, transparent) !important; border: 2px dashed var(--line) !important; }
.empty-art svg { width: 84px; height: 84px; animation: float 4s ease-in-out infinite; }
.empty-art p { margin: 0; max-width: 420px; font-size: 15px; }
@keyframes float { 50% { transform: translateY(-6px); } }

:root[data-theme="dark"] .action > span { color: #c9ced8; }
:root[data-theme="dark"] .meeting-row .kind, :root[data-theme="dark"] .tag { filter: brightness(1.6) saturate(1.2); }
#notes > .empty-art { list-style: none; border-radius: 16px; }

/* ---------------------------------------------------------------- Dashboard: the clean Studio look
   Filled fields and soft buttons instead of outlines; main actions in the OBN gradient. */
body:has(.dash) {
  --d-field: #f1f2f6; --d-field-hover: #e9ebf1; --d-btn: #f1f2f6; --d-btn-hover: #e6e8ee; --d-text: #1d2129;
  --obn-grad: linear-gradient(135deg, #f0563f 0%, #e8344a 45%, #a23bd6 100%);
}
:root[data-theme="dark"] body:has(.dash) { --d-field: rgba(255, 255, 255, .06); --d-field-hover: rgba(255, 255, 255, .09); --d-btn: rgba(255, 255, 255, .08); --d-btn-hover: rgba(255, 255, 255, .14); --d-text: #eef0f5; }
.dash-main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),
.dash-main select, .dash-main textarea, .modal input:not([type=checkbox]):not([type=radio]), .modal select, .modal textarea {
  border: 1px solid transparent !important; background-color: var(--d-field, #f1f2f6) !important; border-radius: 10px !important; color: var(--d-text, inherit);
  box-shadow: none !important; transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.dash-main input:hover, .dash-main select:hover, .dash-main textarea:hover { background-color: var(--d-field-hover) !important; }
.dash-main input:focus, .dash-main select:focus, .dash-main textarea:focus, .modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: none !important; border-color: rgba(162, 59, 214, .5) !important; box-shadow: 0 0 0 3px rgba(232, 52, 74, .16) !important;
}
body:has(.dash) .btn.ghost, body:has(.dash) .cmdk-btn, body:has(.dash) .theme-btn {
  border-color: transparent !important; background: var(--d-btn) !important; box-shadow: none !important; color: var(--d-text);
}
body:has(.dash) .btn.ghost:hover, body:has(.dash) .cmdk-btn:hover, body:has(.dash) .theme-btn:hover { background: var(--d-btn-hover) !important; }
body:has(.dash) .btn.primary { background: var(--obn-grad) !important; border-color: transparent !important; color: #fff; box-shadow: 0 10px 22px -12px rgba(232, 52, 74, .9) !important; }
body:has(.dash) .btn.primary:hover { filter: brightness(1.06); }
body:has(.dash) .btn.danger, body:has(.dash) .btn.small.danger { border-color: transparent !important; background: rgba(232, 52, 74, .1) !important; color: #e8344a; }
body:has(.dash) .btn { transition: background .15s, transform .15s, filter .15s; }
body:has(.dash) .btn:active { transform: scale(.97); }
/* Cards: soft, no outline (light: a faint shadow; dark: a slightly lighter panel). */
.dash-main .card, .dash-main .an-tile, .dash-main .meeting-row, .dash-main .item { border: 0 !important; }
:root[data-theme="dark"] .dash-main .card, :root[data-theme="dark"] .dash-main .an-tile { background: rgba(255, 255, 255, .035) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important; }
.dash-main input[type=checkbox], .dash-main input[type=radio] { accent-color: #e8344a; }
/* Side menu: the chosen page in OBN colours. */
.dash-nav button.sel { color: var(--d-text) !important; box-shadow: inset 3px 0 0 #e8344a !important; }
.dash-nav button.sel svg.ic { color: #e8344a; opacity: 1; }
.dash-main h1 { letter-spacing: -.015em; }
