body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #ecfeff 100%);
  color: #0f172a;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #cbd5e1;
  background: #ffffffcc;
  backdrop-filter: blur(5px);
}

.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.nav a {
  text-decoration: none;
  color: #075985;
  font-weight: 600;
}

.content {
  padding: 1.2rem 1.5rem 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

.narrow {
  max-width: 580px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0.8rem;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.7rem;
}

.span2 {
  grid-column: 1 / -1;
}

.kpi {
  font-size: 1.6rem;
  margin: 0.3rem 0 0;
  font-weight: 700;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

input, select, textarea {
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
}

textarea {
  min-height: 78px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.row {
  display: flex;
  gap: 0.6rem;
}

.between {
  justify-content: space-between;
  align-items: center;
}

.btn {
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn.ghost {
  background: #e2e8f0;
  color: #0f172a;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
}

th, td {
  text-align: left;
  padding: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}

.muted {
  color: #64748b;
}

.error {
  color: #b91c1c;
  font-weight: 600;
}

.ok {
  color: #166534;
  font-weight: 600;
}

.linkbtn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: #075985;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

.warn {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.5rem;
}

.distribution-preview input[type="text"],
.distribution-preview textarea {
  width: 100%;
  box-sizing: border-box;
}

.distribution-preview .muted {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.distribution-preview .actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.distribution-preview .action-form {
  display: flex;
}

.distribution-preview .actions-row .btn {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.distribution-preview .action-form .btn {
  flex: 1;
}

.btn.disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.iconlink {
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
}

.iconlink:hover {
  opacity: 0.8;
}

.distribution-preview .actions-row > .btn:only-child {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .grid4 { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .distribution-preview .actions-row {
    grid-template-columns: 1fr;
  }
}

.marketing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.2rem 1.2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.1rem;
}

.marketing-hero {
  background: linear-gradient(145deg, #0f172a, #0b4a6f);
  color: #f8fafc;
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.25);
}

.marketing-hero h1 {
  margin: 0.3rem 0 0.6rem;
  font-size: 2rem;
  line-height: 1.15;
}

.marketing-hero p {
  color: #dbeafe;
}

.marketing-hero ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: #e0f2fe;
}

.eyebrow {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  color: #7dd3fc;
}

.marketing-form {
  align-self: start;
}

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