:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0e1b2d;
  --surface-soft: #13243a;
  --ink: #ecf6ff;
  --muted: #9ab0c5;
  --border: #22374f;
  --purple: #168bff;
  --purple-dark: #0867cb;
  --purple-light: #102c49;
  --orange: #ff9b64;
  --green: #31d6c2;
  --shadow: 0 16px 45px rgba(0, 0, 0, .24);
  --shadow-soft: 0 7px 22px rgba(0, 0, 0, .2);
}

html,
body {
  background: #07111f;
  color: var(--ink);
}

body {
  background:
    radial-gradient(ellipse at 88% -12%, rgba(0, 174, 255, .17), transparent 34%),
    radial-gradient(ellipse at 12% 42%, rgba(18, 210, 190, .07), transparent 34%),
    var(--bg);
}

.sidebar {
  background: linear-gradient(180deg, #0c1a2b, #091522);
  border-color: var(--border);
  box-shadow: 8px 0 30px rgba(0, 0, 0, .16);
}

.brand,
.brand em,
.workspace-switcher strong,
.profile strong,
.breadcrumb strong,
.welcome-row h1,
.section-header h1,
.card h2,
.post-cell strong,
.upcoming-item strong {
  color: var(--ink);
}

.workspace-switcher,
.topbar,
.settings-menu,
.payment-method {
  background: rgba(14, 27, 45, .94);
  border-color: var(--border);
}

.topbar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025);
}

.nav-item {
  color: #a4b7ca;
}

.nav-item:hover,
.nav-item.active {
  color: #56c6ff;
  background: linear-gradient(90deg, #102b47, #10243a);
  box-shadow: inset 3px 0 #16a5ff;
}

.nav-label,
.eyebrow {
  color: #83a3bd;
}

.avatar-purple,
.avatar-orange {
  background: #123451;
  color: #54d9df;
}

.button {
  min-height: 40px;
  border-radius: 11px;
  font-size: 13px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.button-primary {
  color: #04111f;
  background: linear-gradient(115deg, #27c6f4, #31dfc1);
  box-shadow: 0 8px 22px rgba(22, 178, 224, .2);
}

.button-secondary,
.button-ghost {
  color: #d8efff;
  background: #13263c;
  border: 1px solid #2d4b67;
  text-decoration: none;
}

.button-ghost {
  color: #62e1da;
}

.stat-card,
.card,
.settings-menu,
.trial-lock-card,
.auth-panel {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(17, 34, 55, .98), rgba(12, 25, 42, .98));
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.stat-card:hover,
.card:hover {
  box-shadow: var(--shadow);
}

.stat-head,
td,
th,
.muted,
.breadcrumb,
.workspace-switcher small,
.profile small,
.upcoming-item small,
.post-cell small {
  color: var(--muted);
}

.stat-card > strong {
  color: #f0f8ff;
}

.stats-grid .stat-card:nth-child(1) .stat-head::before,
.stats-grid .stat-card:nth-child(2) .stat-head::before {
  color: #68e4da;
}

.table-card,
.recent-card,
.contacts-card,
.social-profiles-card {
  overflow: hidden;
}

th,
td,
.profile,
.upcoming-item {
  border-color: var(--border);
}

.calendar,
.calendar-day,
.calendar-toolbar select,
.content-toolbar select,
.card-heading select,
.date-select {
  color: var(--ink);
  background: #0c1a2b;
  border-color: var(--border);
}

.calendar-day.muted-day {
  background: #0a1726;
}

.calendar-weekday,
.day-number {
  color: #a9bed1;
}

.day-number.today {
  color: #051421;
  background: #31d6c2;
}

.calendar-event {
  color: #d7f4ff;
  background: #123657;
  border-left: 2px solid #23b7f0;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.custom-event {
  border-left-color: #31d6c2;
  background: #103632;
}

.platform-icon.custom-platform {
  color: #06201e;
  background: linear-gradient(135deg, #55ead5, #20a9d7);
}

.content-toolbar .search-box,
.search-box,
.contact-form input,
.contact-form textarea,
.social-profile-form input,
.modal textarea,
.modal input,
.modal select,
#auth-form input {
  color: var(--ink);
  background: #091827;
  border-color: #29435c;
}

.contact-form,
.contacts-card,
.social-profiles-card {
  padding: 24px;
}

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(0, 1.45fr);
  gap: 22px;
  align-items: start;
}

.contact-form,
.social-profile-form {
  display: grid;
  gap: 15px;
}

.contact-form h2 {
  margin: 0;
}

.contact-form label,
.social-profile-form label,
.modal label,
#auth-form label {
  display: grid;
  gap: 7px;
  color: #d4e6f5;
}

.contact-form input,
.contact-form textarea,
.social-profile-form input,
.modal textarea,
.modal input,
.modal select,
#auth-form input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #29435c;
  border-radius: 9px;
  outline: none;
}

.contact-form textarea,
.modal textarea {
  min-height: 92px;
  resize: vertical;
}

.social-profile-form {
  grid-template-columns: 1fr 1.3fr auto;
  align-items: end;
  margin-top: 22px;
}

.social-planning-note {
  margin: 16px 0;
}

.social-profiles-list,
.contacts-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.contact-card,
.social-profile-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 22, 37, .72);
}

.contact-card-heading,
.social-profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-card-heading > div:nth-child(2),
.social-profile-item > div {
  min-width: 0;
  flex: 1;
}

.contact-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 14px;
}

.contact-card small {
  color: var(--muted);
}

.contact-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #28617a;
  border-radius: 12px;
  color: #7ce8dc;
  background: #103246;
  font-weight: 800;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
}

.contact-details a,
.social-profile-item a {
  color: #61ceff;
  overflow-wrap: anywhere;
}

.contact-notes {
  margin: 13px 0 0;
  color: #b4c7d9;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.social-profile-item > div {
  display: grid;
  gap: 5px;
}

.social-profile-item strong {
  color: var(--ink);
}

.social-profiles-empty {
  padding: 10px 0;
}

.empty-state {
  color: var(--ink);
  background: #0c1a2b;
  border-color: var(--border);
}

.empty-state h2 {
  color: var(--ink);
}

:where(button, a, input, textarea, select):focus-visible {
  outline: 3px solid #45d7e5;
  outline-offset: 3px;
}

::placeholder {
  color: #7890a6;
  opacity: 1;
}

.modal,
.modal-header,
.modal-footer {
  color: var(--ink);
  background: #0e1b2d;
  border-color: var(--border);
}

.status {
  color: #a7c1d7;
  background: #18324c;
}

.integration-placeholder {
  padding: 16px;
  border: 1px dashed #2b4962;
  border-radius: 10px;
  background: rgba(5, 18, 31, .4);
}

.publish-modal {
  display: grid;
  gap: 14px;
}

.publish-modal textarea {
  min-height: 130px;
  resize: vertical;
  color: var(--ink);
  background: #091727;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  line-height: 1.5;
}

.publish-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.publish-modal .modal-footer .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.publish-note {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 760px) {
  .contacts-layout {
    grid-template-columns: 1fr;
  }

  .social-profile-form {
    grid-template-columns: 1fr;
  }

  .contact-form,
  .contacts-card,
  .social-profiles-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
