:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fb;
  color: #202734;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.shell { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }
.masthead { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; color: white; background: #4f52ca; border-radius: 10px; font-size: 19px; }
.panel { background: #fff; border: 1px solid #e7e9ef; border-radius: 22px; box-shadow: 0 20px 60px rgb(33 42 70 / .07); }
.auth-panel { max-width: 490px; margin: clamp(48px, 10vh, 110px) auto 0; padding: clamp(28px, 5vw, 44px); }
.home-panel { margin: 72px 0 0; padding: 44px; }
.eyebrow { margin: 0 0 8px; color: #585bc2; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.045em; line-height: 1.14; }
.muted { margin: 16px 0 28px; color: #667085; line-height: 1.6; }
form { display: grid; gap: 11px; }
label { font-size: 14px; font-weight: 650; }
input { width: 100%; padding: 13px 14px; border: 1px solid #cbd1dd; border-radius: 10px; background: #fff; color: #202734; font: inherit; outline: none; }
input:focus { border-color: #565ad3; box-shadow: 0 0 0 4px rgb(86 90 211 / .12); }
textarea, select { width: 100%; padding: 13px 14px; border: 1px solid #cbd1dd; border-radius: 10px; background: #fff; color: #202734; font: inherit; outline: none; }
textarea { resize: vertical; line-height: 1.5; }
textarea:focus, select:focus { border-color: #565ad3; box-shadow: 0 0 0 4px rgb(86 90 211 / .12); }
button { min-height: 44px; margin-top: 8px; padding: 10px 17px; border: 0; border-radius: 10px; background: #4f52ca; color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: #3d42b3; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #eceef4; color: #25304a; }
.message { min-height: 22px; margin: 16px 0 0; color: #9f2b37; font-size: 14px; }
.subtle-link { margin: 24px 0 0; font-size: 14px; }
a { color: #4f52ca; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin: 64px 0 28px; }
.page-heading .muted { margin-bottom: 0; }
.button-link { display: inline-grid; place-items: center; min-height: 44px; padding: 10px 17px; background: #4f52ca; color: #fff; border-radius: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.channel-card { display: flex; align-items: center; gap: 15px; min-height: 90px; padding: 20px; border: 1px solid #e7e9ef; border-radius: 16px; background: #fff; color: inherit; text-decoration: none; }
.channel-card:hover { border-color: #b8bbeb; }
.channel-card span:nth-child(2) { display: grid; gap: 3px; flex: 1; }
.channel-card small { color: #667085; }
.channel-dot { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.empty-state { grid-column: 1 / -1; padding: 36px; }
.empty-state h2 { margin: 0; }
.channel-form { padding: 28px; gap: 24px; }
.field-row { display: grid; grid-template-columns: minmax(0,2fr) minmax(130px,1fr) 110px; gap: 16px; }
.form-field { display: grid; gap: 8px; min-width: 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid #e7e9ef; overflow-x: auto; }
.tab-button { min-height: 42px; margin: 0; border-radius: 9px 9px 0 0; background: transparent; color: #667085; white-space: nowrap; }
.tab-button:hover { background: #eff0fb; color: #34388f; }
.tab-button.active { color: #4347aa; background: #eff0fb; }
.tab-panel { display: grid; gap: 20px; }
.tab-panel[hidden] { display: none; }
.tab-panel .muted { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; border-top: 1px solid #e7e9ef; padding-top: 12px; }
.form-actions[hidden] { display: none; }
.logo-panel { margin-top: 18px; padding: 28px; }
.logo-panel h2 { margin: 0; }
.logo-row { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #e7e9ef; padding: 18px 0; }
.logo-row img { width: 80px; height: 80px; object-fit: contain; border: 1px solid #e7e9ef; border-radius: 10px; background: #fff; }
.logo-row div { flex: 1; min-width: 0; }
.logo-row p { margin: 4px 0; color: #667085; font-size: 13px; }
.logo-upload { max-width: 520px; padding-top: 24px; }
.idea-form, .post-form { padding: 28px; max-width: 760px; }
.field-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list-stack { display: grid; gap: 14px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; }
.list-item h2 { margin: 0; font-size: 18px; }
.list-item .muted { margin: 9px 0 0; white-space: pre-wrap; }
.list-item form { min-width: 215px; }
.post-link { color: inherit; text-decoration: none; }
.post-link span:first-child { display: grid; gap: 5px; }
.post-link small { color: #667085; }
.form-error { margin: -8px 0 20px; padding: 14px 16px; border: 1px solid #e7a7ad; border-radius: 10px; background: #fff4f5; color: #8c1c2b; }
.settings-form { max-width: 240px; margin: 28px 0; }
.dashboard-heading { margin-bottom: 22px; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary-link { background: #e8eaf8; color: #34388f; }
.dashboard-filter { display: flex; align-items: end; gap: 10px; margin: 0 0 22px; }
.dashboard-filter label { align-self: center; }
.dashboard-filter select { max-width: 270px; }
.dashboard-filter button { margin: 0; }
.dashboard-alert { padding: 18px 22px; margin: 20px 0; border: 1px solid #dbb15c; border-radius: 14px; background: #fff7e5; color: #67491d; }
.dashboard-alert p { margin: 8px 0 0; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-card, .dashboard-settings { padding: 25px; }
.dashboard-card h2, .dashboard-settings h2 { margin: 0; font-size: 22px; }
.dashboard-card h3 { margin: 28px 0 8px; font-size: 16px; }
.dashboard-card p { line-height: 1.5; }
.dashboard-card small { color: #667085; }
.dashboard-problem { padding: 12px 0; border-bottom: 1px solid #e7e9ef; }
.dashboard-problem p { margin: 4px 0; font-size: 13px; }
.dashboard-settings { margin-top: 18px; }
.dashboard-settings form { width: fit-content; margin: 16px 0; }
.dashboard-settings .settings-form { width: 240px; }
.dashboard-settings form button { margin: 0; }
.notification-settings label { display: flex; align-items: center; gap: 9px; }
.notification-settings input[type="checkbox"] { width: 18px; height: 18px; }
.label-settings { min-width: min(100%, 310px); }
.post-preview-text { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.form-notice { margin: 16px 0; padding: 14px 16px; border: 1px solid #9cc9a8; border-radius: 10px; background: #eaf7ed; color: #245332; }
.image-preview { position: relative; display: inline-block; max-width: min(100%, 540px); line-height: 0; }
.image-preview img { display: block; width: 100%; max-height: 560px; object-fit: contain; border-radius: 12px; }
.image-preview-label { position: absolute; padding: 7px 10px; border-radius: 5px; background: rgb(10 16 25 / .88); color: #fff; font-size: clamp(11px, 2vw, 15px); font-weight: 700; line-height: 1.2; }
.image-preview-label.top_left { top: 3%; left: 3%; }
.image-preview-label.top_right { top: 3%; right: 3%; }
.image-preview-label.bottom_left { bottom: 3%; left: 3%; }
.image-preview-label.bottom_right { bottom: 3%; right: 3%; }
.media-panel { max-width: 760px; padding: 28px; margin-top: 18px; }
.media-panel h2 { margin-top: 0; }
.media-item img, .media-item video { display: block; width: min(100%, 540px); max-height: 560px; object-fit: contain; border-radius: 12px; background: #131a25; }
.media-item form { width: fit-content; margin-top: 15px; }
.post-delete { width: fit-content; margin-top: 20px; }
.platform-choice { display: flex; align-items: center; gap: 9px; }
.platform-choice input[type="checkbox"] { width: 18px; height: 18px; }
.calendar-filters { padding: 18px; }
.calendar-filter-row { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; align-items: end; gap: 12px; }
.calendar-filter-row label { display: grid; gap: 7px; }
.calendar-filter-row button { margin: 0; }
.calendar-toolbar, .calendar-toolbar > div { display: flex; align-items: center; gap: 18px; }
.calendar-toolbar { justify-content: space-between; margin: 25px 0 15px; }
.calendar-toolbar strong { font-size: 20px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #e1e5ed; border-radius: 16px; overflow: hidden; }
.calendar-weekday { padding: 11px; text-align: center; font-weight: 700; background: #eef0f7; }
.calendar-day { min-height: 135px; padding: 9px; border-top: 1px solid #e1e5ed; border-right: 1px solid #e1e5ed; background: #fff; min-width: 0; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-today { background: #f5f5ff; }
.calendar-drop-target { outline: 3px solid #4f52ca; outline-offset: -4px; }
.calendar-day-button { min-height: 30px; margin: 0 0 7px; padding: 3px 7px; background: transparent; color: inherit; font-size: 13px; }
.calendar-day-button:hover { color: #4f52ca; background: #ededfc; }
.calendar-items { display: grid; gap: 5px; }
.calendar-entry { display: grid; gap: 2px; padding: 7px 8px; border-left: 4px solid #cbd1dd; border-radius: 5px; color: inherit; background: #f2f4f8; text-decoration: none; font-size: 12px; overflow-wrap: anywhere; }
.calendar-entry small { color: #59647b; font-size: 10px; }
.calendar-entry .channel-dot { width: 9px; height: 9px; margin-right: 4px; vertical-align: baseline; }
.calendar-entry[draggable="true"] { cursor: grab; }
.calendar-dialog { width: min(90vw, 380px); padding: 24px; border: 1px solid #d5d9e3; border-radius: 16px; color: inherit; background: #fff; }
.calendar-dialog::backdrop { background: rgb(15 20 33 / .52); }
:root[data-theme-effective="dark"] .calendar-grid, :root[data-theme-effective="dark"] .calendar-day { border-color: #30394a; }
:root[data-theme-effective="dark"] .calendar-weekday { background: #252d3b; }
:root[data-theme-effective="dark"] .calendar-day { background: #1a2230; }
:root[data-theme-effective="dark"] .calendar-today { background: #2a3050; }
:root[data-theme-effective="dark"] .calendar-entry { background: #283244; color: #edf0f7; }
:root[data-theme-effective="dark"] .calendar-entry small { color: #b2bbcc; }
:root[data-theme-effective="dark"] .calendar-dialog { background: #1a2230; border-color: #30394a; color: #edf0f7; }
:root[data-theme-effective="dark"] { color-scheme: dark; background: #10151f; color: #edf0f7; }
:root[data-theme-effective="dark"] .panel { background: #1a2230; border-color: #30394a; box-shadow: 0 24px 70px rgb(0 0 0 / .22); }
:root[data-theme-effective="dark"] .muted { color: #a7b0c0; }
:root[data-theme-effective="dark"] .eyebrow, :root[data-theme-effective="dark"] a { color: #a9acff; }
:root[data-theme-effective="dark"] .button-link { color: #fff; }
:root[data-theme-effective="dark"] input, :root[data-theme-effective="dark"] textarea, :root[data-theme-effective="dark"] select { color: #edf0f7; background: #131a25; border-color: #4b566b; }
:root[data-theme-effective="dark"] .channel-card { background: #1a2230; border-color: #30394a; }
:root[data-theme-effective="dark"] .channel-card small { color: #a7b0c0; }
:root[data-theme-effective="dark"] .tabs, :root[data-theme-effective="dark"] .form-actions { border-color: #30394a; }
:root[data-theme-effective="dark"] .logo-row, :root[data-theme-effective="dark"] .logo-row img { border-color: #30394a; }
:root[data-theme-effective="dark"] .logo-row p { color: #a7b0c0; }
:root[data-theme-effective="dark"] .post-link { color: #edf0f7; }
:root[data-theme-effective="dark"] .post-link small { color: #a7b0c0; }
:root[data-theme-effective="dark"] .tab-button { color: #a7b0c0; }
:root[data-theme-effective="dark"] .tab-button:hover, :root[data-theme-effective="dark"] .tab-button.active { color: #c9caff; background: #2a3050; }
:root[data-theme-effective="dark"] .form-error { border-color: #894a55; background: #3a222b; color: #ffc6cb; }
:root[data-theme-effective="dark"] .form-notice { border-color: #4b8058; background: #1c3928; color: #b9e9c4; }
:root[data-theme-effective="dark"] button.secondary { color: #e7eaf4; background: #30394a; }
:root[data-theme-effective="dark"] .message { color: #ff9ea6; }
:root[data-theme-effective="dark"] .secondary-link { color: #d9dbff; background: #303653; }
:root[data-theme-effective="dark"] .dashboard-alert { color: #ffe1a8; background: #45361e; border-color: #7b6335; }
:root[data-theme-effective="dark"] .dashboard-card small { color: #a7b0c0; }
:root[data-theme-effective="dark"] .dashboard-problem { border-color: #30394a; }
@media (max-width: 600px) {
  .shell { padding: 22px 16px 48px; }
  .auth-panel { margin-top: 48px; }
  .home-panel { margin-top: 48px; padding: 28px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-top: 44px; }
  .field-row { grid-template-columns: 1fr; }
  .channel-form { padding: 20px; }
  .field-row-two { grid-template-columns: 1fr; }
  .idea-form, .post-form { padding: 20px; }
  .list-item { align-items: stretch; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-filter { align-items: stretch; flex-direction: column; }
  .dashboard-filter label { align-self: start; }
  .calendar-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-toolbar, .calendar-toolbar > div { flex-wrap: wrap; gap: 12px; }
  .calendar-grid { overflow-x: auto; }
  .calendar-weekday, .calendar-day { min-width: 120px; }
}
.analytics-table-wrap{overflow-x:auto}
.analytics-table-wrap table{width:100%;border-collapse:collapse;text-align:left}
.analytics-table-wrap th,.analytics-table-wrap td{padding:.7rem;border-bottom:1px solid var(--border, #d8dde4);vertical-align:top}
