:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #657084;
  --line: #dbe2ee;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #b42318;
  --accent-3: #7c3aed;
  --warn: #b7791f;
  --ok: #18794e;
  --shadow: 0 18px 55px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: url("/fundofeedmaximo.jpg") center/cover no-repeat;
}

.login.without-login-copy {
  grid-template-columns: 1fr;
}

.login-copy {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 64px;
}

.login-form-wrap {
  display: grid;
  align-items: center;
  padding: 64px;
  background: rgba(247, 248, 251, 0.92);
}

.login-form {
  background: white;
  border: 1px solid rgba(219, 226, 238, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  position: relative;
}

.side {
  background: #152033;
  color: white;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.mobile-backdrop,
.menu-toggle {
  display: none;
}

.brandmark {
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.brandmark-logo {
  max-width: 230px;
  max-height: 60px;
  width: auto;
  height: auto;
  display: block;
}

.brandmark-title {
  display: block;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.2;
  word-break: break-word;
}

.login-logo {
  max-width: 230px;
  max-height: 60px;
  width: auto;
  height: auto;
  margin: 0;
  display: block;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 6px;
}

.nav button.active,
.nav button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.main {
  padding: 30px 36px 48px;
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0;
}

.subtle {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.05);
}

.panel {
  padding: 22px;
  overflow-x: auto;
}

.card {
  padding: 18px;
}

.panel h2,
.card h3 {
  margin: 0 0 14px;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row.wrap {
  flex-wrap: wrap;
}

.space {
  justify-content: space-between;
}

.stack {
  display: grid;
  gap: 14px;
}

.btn {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  font-weight: 750;
}

.btn.secondary {
  background: #e8eef8;
  color: #243047;
}

.btn.danger {
  background: var(--accent-2);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #ecfdf5;
  color: var(--ok);
}

.pill.warn {
  background: #fffbeb;
  color: var(--warn);
}

.pill.neutral {
  background: #eef2ff;
  color: var(--accent-3);
}

.metric {
  border-left: 4px solid var(--accent);
}

.metric strong {
  display: block;
  font-size: 34px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.destination {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.checkrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.checkrow input {
  width: auto;
  min-height: auto;
}

.error {
  color: var(--accent-2);
  font-weight: 700;
}

.success {
  color: var(--ok);
  font-weight: 700;
}

.preview-media {
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #111827;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e6edf7;
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width 0.15s ease;
}

.hidden {
  display: none !important;
}

.compact-summary {
  padding: 14px 18px;
}

.compact-pills {
  gap: 10px;
}

.agenda-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-overview {
  padding-top: 16px;
  padding-bottom: 16px;
}

.dashboard-metrics .metric strong {
  font-size: 28px;
}

.brand-account-section h2 {
  margin-bottom: 4px;
}

.account-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-card-visual {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 16px;
  background: #fbfcff;
}

.account-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #e2e8f0;
}

.account-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-3);
}

.account-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-card-metrics div {
  display: grid;
  gap: 4px;
}

.account-card-metrics strong {
  font-size: 20px;
}

.composer-layout {
  gap: 18px;
}

.bulk-picker {
  position: relative;
  overflow: hidden;
}

.bulk-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fcfdff;
}

.bulk-item .destination {
  background: white;
}

@media (max-width: 1100px) {
  .cols-4,
  .cols-3,
  .cols-2,
  .agenda-filters,
  .account-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login {
    grid-template-columns: 1fr;
  }

  .login-copy {
    min-height: 180px;
    padding: 40px 24px 0;
  }

  .login-form-wrap {
    padding: 24px;
  }

  .login.without-login-copy .login-form-wrap {
    min-height: 100vh;
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .login-copy {
    display: none;
  }

  .login,
  .login.without-login-copy {
    grid-template-columns: 1fr;
  }

  .login-form-wrap,
  .login.without-login-copy .login-form-wrap {
    min-height: 100vh;
    padding: 24px 16px;
    align-items: center;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  .shell.nav-open .side {
    transform: translateX(0);
  }

  .mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 15;
  }

  .shell.nav-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: #e8eef8;
    color: #243047;
    font-weight: 700;
  }

  .main {
    padding: 18px 16px 32px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .cols-4,
  .cols-3,
  .cols-2,
  .agenda-filters,
  .account-card-grid,
  .account-card-metrics {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-head {
    display: none;
  }

  .calendar-day {
    min-height: auto;
  }

  .table {
    min-width: 720px;
  }
}

@media (max-width: 640px) {
  .login-copy,
  .login-form-wrap,
  .login-form,
  .panel,
  .card,
  .bulk-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brandmark-logo,
  .login-logo {
    max-width: 180px;
    max-height: 48px;
  }

  .topbar h1 {
    font-size: 24px;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-head {
  padding: 10px 12px;
  border-radius: 6px;
  background: #eef2ff;
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  align-content: start;
  gap: 10px;
}

.calendar-day.muted {
  background: #f8fafc;
}

.calendar-date {
  font-size: 14px;
  font-weight: 800;
}

.calendar-items {
  display: grid;
  gap: 8px;
}

.calendar-item {
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
  border-left: 4px solid #94a3b8;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.calendar-item strong {
  font-size: 12px;
}

.calendar-item.published {
  border-left-color: var(--ok);
}

.calendar-item.scheduled,
.calendar-item.partial {
  border-left-color: var(--accent-3);
}

.calendar-item.processing,
.calendar-item.blocked,
.calendar-item.failed {
  border-left-color: var(--warn);
}
