@import "tailwindcss";

:root {
  --background: #f4f8fb;
  --foreground: #122333;
  --muted: #64788a;
  --line: #d7e4ec;
  --panel: #ffffff;
  --navy: #082b4d;
  --blue: #105d9f;
  --blue-2: #0d77bd;
  --sky: #e6f3fb;
  --ice: #f7fbfd;
  --gold: #d99a21;
  --success: #118066;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

#customRows {
  display: grid;
  gap: 10px;
}

.site-shell,
.panel-shell,
.login-screen {
  min-height: 100vh;
}

.portal-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-strip {
  align-items: center;
  background: var(--navy);
  color: white;
  display: flex;
  font-size: 0.86rem;
  justify-content: space-between;
  padding: 8px clamp(18px, 5vw, 70px);
}

.header-strip a,
.footer a,
.article-card a {
  color: #77c8ff;
  font-weight: 800;
}

.masthead {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 70px);
}

.brand {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: flex;
  gap: 12px;
  min-width: 260px;
  padding: 0;
  text-align: left;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  letter-spacing: 0;
  width: 62px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--navy);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 5px;
}

.portal-nav {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 12px clamp(18px, 5vw, 70px);
}

.portal-nav a {
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
}

.control-button,
.primary-button,
.secondary-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.control-button,
.primary-button {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
}

.secondary-button {
  background: white;
  border: 1px solid var(--line);
  color: var(--navy);
}

.full {
  width: 100%;
}

.news-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 330px;
  padding: 28px clamp(18px, 5vw, 70px);
}

.lead-story {
  background:
    linear-gradient(rgba(8, 43, 77, 0.78), rgba(8, 43, 77, 0.78)),
    linear-gradient(135deg, #0d77bd, #082b4d);
  border-radius: 8px;
  color: white;
  min-height: 390px;
  padding: clamp(26px, 5vw, 58px);
}

.lead-story span,
.article-card span,
.result-card span,
.client-card span,
.eyebrow {
  color: var(--blue-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.lead-story span {
  color: #bce4ff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.lead-story h1,
.panel-top h1,
.login-card h1 {
  font-size: clamp(2.35rem, 5vw, 4.9rem);
  line-height: 0.98;
  margin-bottom: 20px;
  max-width: 940px;
}

.lead-story p {
  color: #d7ecf8;
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 760px;
}

.ad-stack {
  display: grid;
  gap: 12px;
}

.ad-slot {
  align-items: center;
  background: var(--sky);
  border: 1px dashed #8abbd8;
  border-radius: 8px;
  color: var(--navy);
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 86px;
  padding: 18px;
  text-align: center;
}

.search-section,
.portal-grid,
.supplier-band,
.panel-workspace {
  padding: clamp(34px, 6vw, 72px) clamp(18px, 5vw, 70px);
}

.search-section {
  background: white;
  border-block: 1px solid var(--line);
}

.search-section h2,
.portal-grid h2,
.supplier-band h2,
.content-editor h2 {
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 3.15rem);
  line-height: 1.03;
  margin-bottom: 18px;
}

.search-box {
  background: var(--ice);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 22px 0;
  padding: 14px;
}

.search-box span,
.field {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.search-box input,
.field input,
.field select,
.field textarea,
.custom-fields input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--foreground);
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.field textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.results-grid,
.portal-grid,
.admin-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-title {
  grid-column: 1 / -1;
  max-width: 820px;
}

.result-card,
.article-card,
.client-card,
.content-editor,
.login-card,
.approval-row,
.custom-fields,
.visibility-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(8, 43, 77, 0.07);
}

.result-card,
.article-card,
.client-card {
  min-height: 210px;
  padding: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 0;
}

.article-card img {
  aspect-ratio: 5 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.article-card div {
  display: grid;
  gap: 10px;
  padding: 0 20px 20px;
}

.result-card h3,
.article-card h3,
.client-card h3 {
  color: var(--navy);
  font-size: 1.22rem;
  line-height: 1.18;
  margin-bottom: 0;
}

.result-card p,
.article-card p,
.client-card p,
.supplier-band p,
.approval-row span {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.result-card strong,
.client-card strong {
  color: var(--blue);
  display: block;
  margin-top: 18px;
}

.supplier-band {
  align-items: center;
  background: var(--sky);
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.supplier-band > div {
  max-width: 780px;
}

.footer {
  align-items: center;
  background: var(--navy);
  color: white;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 70px);
}

.footer span {
  color: #c1d7e4;
}

.login-screen {
  align-items: center;
  background:
    linear-gradient(rgba(8, 43, 77, 0.84), rgba(8, 43, 77, 0.84)),
    linear-gradient(135deg, var(--blue), var(--navy));
  display: grid;
  justify-items: center;
  padding: 24px;
}

.ghost-link {
  background: transparent;
  border: 0;
  color: white;
  font-weight: 900;
  left: 24px;
  position: absolute;
  top: 24px;
}

.login-card {
  display: grid;
  gap: 14px;
  max-width: 460px;
  padding: 28px;
  width: 100%;
}

.login-card h1 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3rem);
}

.login-status {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.panel-shell {
  background: var(--background);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.panel-menu {
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100vh;
  padding: 20px;
  position: sticky;
  top: 0;
}

.panel-menu a {
  border-radius: 8px;
  color: #d8edf8;
  font-weight: 900;
  padding: 12px;
}

.panel-menu a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.panel-brand {
  margin-bottom: 20px;
}

.panel-brand strong {
  color: white;
}

.panel-brand small {
  color: #bdd8e8;
}

.panel-top {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-top h1 {
  color: var(--navy);
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.content-editor {
  margin-top: 22px;
  padding: 24px;
}

.content-editor > div > p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 8px;
  max-width: 760px;
}

.editor-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-editor {
  margin-bottom: 28px;
}

.account-grid {
  margin-top: 18px;
}

.account-actions {
  background: var(--ice);
}

.moderation-editor {
  display: grid;
  gap: 16px;
}

.moderation-list {
  display: grid;
  gap: 12px;
}

.moderation-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.moderation-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.moderation-card h3 {
  color: var(--navy);
  margin-top: 4px;
}

.moderation-card p {
  color: var(--muted);
  margin-top: 4px;
}

.moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.visibility-box {
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
  padding: 14px;
}

.visibility-box label {
  align-items: center;
  color: var(--navy);
  display: flex;
  font-weight: 900;
  gap: 8px;
}

.custom-fields {
  box-shadow: none;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.custom-field-row,
.new-field-row {
  align-items: center;
  display: grid;
  gap: 10px;
}

.custom-field-row {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1fr) 96px 96px;
}

.new-field-row {
  background: var(--ice);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1fr) 170px;
  padding: 12px;
}

.custom-fields-head,
.field-preview {
  display: grid;
  gap: 6px;
}

.custom-fields-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.custom-fields-head strong,
.field-preview strong {
  color: var(--navy);
}

.custom-fields-head span,
.field-preview span {
  color: var(--muted);
}

.mini-check {
  align-items: center;
  color: var(--navy);
  display: flex;
  font-size: 0.84rem;
  font-weight: 900;
  gap: 6px;
}

.remove-button {
  background: white;
  border: 1px solid #f0b8b8;
  border-radius: 8px;
  color: #a13636;
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 38px;
}

.muted-row {
  opacity: 0.56;
}

.field-preview {
  background: #f9fcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.custom-fields span {
  color: var(--muted);
}

.approval-row {
  align-items: center;
  box-shadow: none;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 16px;
}

.approval-row strong,
.approval-row span {
  display: block;
}

@media (max-width: 1080px) {
  .news-hero,
  .results-grid,
  .portal-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-story {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .masthead,
  .supplier-band,
  .panel-top,
  .approval-row,
  .moderation-card {
    align-items: stretch;
    flex-direction: column;
  }

  .moderation-actions {
    justify-content: stretch;
  }

  .news-hero,
  .results-grid,
  .portal-grid,
  .admin-grid,
  .editor-grid,
  .panel-shell {
    grid-template-columns: 1fr;
  }

  .panel-menu {
    min-height: auto;
    position: static;
  }

  .custom-field-row,
  .new-field-row {
    grid-template-columns: 1fr;
  }

  .brand {
    min-width: 0;
  }
}
