:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #20273a;
  background: #f5f7fb;
  font-size: 15px;
  --line: #e4e8f1;
  --muted: #59657a;
  --primary: #3b4fcb;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, .button {
  border: 1px solid var(--line); border-radius: .55rem; background: #fff;
  color: inherit; padding: .58rem .86rem; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: #edf1ff; }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--primary); color: white; border-color: var(--primary); font-weight: 650; }
.primary:hover { background: #3041ac; }
.loading { margin: 3rem; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
aside { padding: 24px 16px; background: #151d35; color: #edeeff; display: flex; flex-direction: column; gap: 32px; }
.brand { display: flex; align-items: center; gap: .65rem; font-size: 1.13rem; }
.brand span { background: #475ee3; color: white; border-radius: .6rem; padding: .55rem .53rem; font-size: .82rem; font-weight: 750; }
nav { display: grid; gap: .4rem; }
nav button, .profile button { text-align: left; color: inherit; border: 0; background: transparent; }
nav button:hover, nav button[aria-current], .profile button:hover { background: #303e6b; }
.profile { margin-top: auto; display: flex; flex-direction: column; gap: .35rem; }
.profile strong, .profile small { margin-left: .8rem; overflow-wrap: anywhere; }
.profile small { color: #b9c3e1; }
.workspace { padding: clamp(20px, 4vw, 48px); margin: auto; margin-top: 0; width: 100%; max-width: 1560px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 0 0 .45rem; letter-spacing: -.035em; }
h2 { margin: 0 0 .45rem; font-size: 1.14rem; }
h3 { margin: 1.45rem 0 .65rem; }
p { margin: .35rem 0 .7rem; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card, .panel, .login-card { background: white; border: 1px solid var(--line); border-radius: .85rem; box-shadow: 0 2px 12px #19254a08; }
.card, .panel { padding: clamp(.9rem, 2vw, 1.3rem); }
.card strong { display: block; font-size: 1.75rem; margin-top: .45rem; }
.panel { margin-bottom: 1rem; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .72rem .72rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f5f7fc; color: #4e5b73; font-size: .83rem; white-space: nowrap; }
td small { white-space: nowrap; }
.empty { text-align: center; padding: 1.5rem; }
.badge { display: inline-block; padding: .22rem .5rem; border-radius: .38rem; background: #edf1f8; white-space: nowrap; font-size: .76rem; font-weight: 650; }
.badge[data-label=Facebook], .badge[data-label=Owner] { color: #2444a8; background: #e9efff; }
.badge[data-label=Instagram] { color: #923572; background: #fdebf7; }
.badge[data-label=YouTube], .badge[data-label=Pinterest], .badge[data-label=Disabled] { color: #9f313e; background: #feecef; }
.badge[data-label=Reddit] { color: #9b471c; background: #fff0df; }
.badge[data-label=Synced], .badge[data-label=Active] { background: #e2f5eb; color: #185c42; }
.positive { color: #126447; font-weight: 650; }
.negative { color: #a42a3b; font-weight: 650; }
.filters, .columns { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.filters { margin-bottom: 1rem; }
.filters input { flex: 1 1 220px; }
.link { color: #3245ba; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; max-width: 24rem; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding-top: .8rem; }
label { display: grid; gap: .4rem; font-weight: 550; }
input, select, textarea { border: 1px solid #ccd4e5; padding: .6rem .7rem; border-radius: .5rem; min-width: 0; color: #20273a; background: white; }
input:focus, select:focus, textarea:focus { outline: 2px solid #6678e6; outline-offset: 1px; }
form:not(.filters) { display: grid; gap: .7rem; margin-bottom: .65rem; }
form.columns { display: flex; }
form.columns button { align-self: end; }
form .feedback:empty { display: none; }
.feedback { color: #7b2b39; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 25% 10%, #e4eaff, #f5f7fb 66%); }
.login-card { padding: 2rem; width: min(100%, 440px); }
.login-card h1 { margin-top: 1.5rem; }
.wide { width: 100%; text-align: center; display: block; }
.google { margin-top: .85rem; }
dialog { border: 1px solid var(--line); border-radius: .9rem; padding: 1.35rem; width: min(92vw, 660px); max-height: 88vh; color: inherit; }
dialog::backdrop { background: #111a36a8; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: .8rem; }
dialog a { color: #3245ba; overflow-wrap: anywhere; }
.access-list li { margin-bottom: .4rem; }
@media (max-width: 850px) { .shell { grid-template-columns: 172px minmax(0,1fr); } .cards { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 570px) {
  .shell { display: block; }
  aside { gap: .65rem; padding: .8rem; }
  nav, .profile { display: flex; flex-wrap: wrap; align-items: center; }
  .profile strong, .profile small { margin: 0; }
  .workspace { padding: 1rem; }
  .top { align-items: start; }
  .top button { flex: none; }
}
.top-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: end; }
