:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #59627a;
  --primary: #0b5cab;
  --accent: #0a8f74;
  --secondary: #0a8f74;
  --border: #dbe3ef;
  --header-bg: #0f3660;
  --header-text: #ffffff;
  --footer-bg: #0f3660;
  --heading-color: #172033;
  --font-body: "Segoe UI", Tahoma, sans-serif;
  --font-heading: "Segoe UI", Tahoma, sans-serif;
  --font-size-base: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading-color);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(90vw, 1800px);
  max-width: 1800px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  min-width: 0;
}

.site-header {
  background-image:
    linear-gradient(135deg, rgba(12, 39, 70, 0.78), rgba(11, 92, 171, 0.68)),
    var(--header-bg-image, none);
  background-color: var(--header-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--header-text);
  padding: 20px 0 24px;
}
.site-header h1 {
  margin: 0 0 2px;
  font-size: var(--header-title-size, 30px);
  font-family: var(--header-title-font, var(--font-heading));
  font-weight: var(--header-title-weight, 700);
  line-height: 1.15;
  color: var(--header-title-color, var(--header-text));
}
.site-header p { margin: 6px 0 0; color: var(--header-subtitle-color, var(--header-text)); opacity: .95; }
.header-subtitle {
  margin-top: 4px;
  font-size: var(--header-subtitle-size, 16px);
  font-family: var(--header-subtitle-font, var(--font-body));
  font-weight: var(--header-subtitle-weight, 400);
  line-height: 1.45;
  color: var(--header-subtitle-color, var(--header-text));
}
.header-subtitle * {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.header-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-logo {
  max-height: 54px;
  width: auto;
  object-fit: contain;
}
.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 14px;
}
.top-nav a {
  color: var(--header-nav-text-color, var(--header-text));
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(12, 47, 93, 0.46);
  padding: 8px 14px;
  font-size: var(--header-nav-font-size, 14px);
  font-family: var(--header-nav-font, var(--font-body));
  font-weight: var(--header-nav-font-weight, 600);
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.top-nav a:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.46);
  transform: translateY(-1px);
}
.top-nav .nav-logo-link {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none;
}
.top-nav .nav-logo-link:hover {
  border: 0;
  background: transparent;
  transform: none;
}
.top-nav .nav-logo {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

.admin-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin: 16px 0;
}
.admin-main-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 8px;
}
.admin-main-actions .button {
  flex: 0 0 auto;
  max-width: 100%;
}
.admin-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.admin-header-actions {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.page-top-actions {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.action-row.tight {
  margin-top: 8px;
  gap: 6px;
}

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.result-count {
  color: #5a6981;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.field-min-260 {
  min-width: 260px;
}

.input-order {
  width: 80px;
}

.page-section-lg {
  padding: 18px 0 30px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(15, 37, 70, .06);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.journals-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.6fr);
}

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #384760; }
input[type="text"], input[type="url"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}
textarea { min-height: 100px; resize: vertical; }

.button {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}
.button.secondary { background: #445676; }
.button.success { background: var(--accent); }
.button.danger { background: #c33d3d; }
.button.main-btn { padding: 11px 16px; font-size: 14px; }
.button.sub-btn { padding: 8px 11px; font-size: 12px; border-radius: 8px; }

.stage-title {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #5a6981;
}

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

.journal-card h3 { margin: 0 0 8px; }
.journal-thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d9e5f3;
  display: block;
  margin-bottom: 8px;
}
.journal-thumb-lg {
  width: 180px;
  height: 120px;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  border: 1px solid #b7d7cf;
  color: #0f6f5f;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin: 2px 6px 2px 0;
  background: #effbf8;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}
th, td {
  border-bottom: 1px solid #e5ecf5;
  text-align: left;
  padding: 10px;
  vertical-align: top;
}
th { background: #f7faff; }

.alert {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid;
}
.alert.success { background: #ecfbf3; color: #1d6a3b; border-color: #bfe4cc; }
.alert.error { background: #fff0f0; color: #8e2222; border-color: #f0c6c6; }

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-full { grid-column: 1 / -1; }

.checkbox-list {
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 6px;
}
.checkbox-list.checkbox-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2d3a4f;
}
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.footer-note {
  background: var(--footer-bg);
  color: #dbe7f5;
  padding: 16px 0 36px;
  font-size: 13px;
}
.footer-note-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.footer-note-text {
  grid-column: 2;
  text-align: center;
}
.footer-tech-partner {
  grid-column: 3;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}
.footer-tech-partner a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}
.footer-tech-partner a:hover {
  text-decoration: underline;
}
.footer-logo-wrap {
  background: var(--footer-bg);
  margin-top: 12px;
  text-align: center;
  padding-bottom: 16px;
}
.footer-logo {
  max-height: 54px;
  width: auto;
  object-fit: contain;
}

.footer-social-wrap {
  background: var(--footer-bg);
  padding-top: 14px;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #ccdaec;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1c2e4d;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.footer-social a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(11, 63, 111, 0.14);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social a.social-facebook { color: #1877f2; }
.footer-social a.social-linkedin { color: #0a66c2; }
.footer-social a.social-twitter { color: #111827; }
.footer-social a.social-instagram { color: #e4405f; }
.footer-social a.social-telegram { color: #27a7e7; }
.footer-social a.social-whatsapp { color: #25d366; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  background: linear-gradient(145deg, #ffffff, #f5f9ff);
  border: 1px solid #dde7f5;
  border-radius: 12px;
  padding: 14px;
}
.stat .num { font-size: 28px; font-weight: 700; color: #0d4d8a; margin-bottom: 4px; }

.split-2 {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.service-hero {
  background:
    linear-gradient(120deg, rgba(11, 92, 171, 0.09), rgba(10, 143, 116, 0.09)),
    #fff;
  border: 1px solid #cfe1f3;
  border-radius: 16px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}
.services-page .services-hero {
  gap: 18px;
  border-color: #c7d9ef;
  box-shadow: 0 14px 36px rgba(7, 43, 83, 0.08);
}
.services-page .services-hero-copy h2 {
  margin: 8px 0 10px;
}
.services-page .services-hero-copy p {
  max-width: 66ch;
}
.services-page .services-hero-actions {
  margin-top: 14px;
}
.services-page .services-hero-metrics {
  align-content: start;
}
.service-hero-glow {
  background:
    radial-gradient(90% 120% at 90% 0%, rgba(11, 92, 171, 0.16), transparent 60%),
    radial-gradient(60% 100% at 0% 100%, rgba(10, 143, 116, 0.12), transparent 70%),
    #fff;
}
.service-hero h2 { margin: 0 0 10px; font-size: 30px; }
.service-hero p { margin: 0 0 14px; color: #3f4e67; line-height: 1.5; }

.service-highlight {
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(160deg, #153d6d, #1d6f74);
  color: #fff;
  display: grid;
  gap: 10px;
}
.service-metric {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.service-metric strong { font-size: 22px; }
.service-metric span { font-size: 12px; opacity: 0.9; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.services-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.services-page .services-list-one {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px;
}
.services-page .services-grid-spacing {
  margin-top: 14px;
}
.services-page .services-section-title {
  margin: 0;
}
.service-tile {
  background: #fff;
  border: 1px solid #dae7f4;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 37, 70, 0.05);
}
.services-page .service-tile {
  display: flex;
  flex-direction: column;
}
.services-page .service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.services-page .service-row-media {
  display: flex;
  min-height: 220px;
}
.services-page .service-row-content {
  display: flex;
  flex-direction: column;
}
.services-page .service-row.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.services-page .service-row.reverse .service-row-content {
  grid-column: 1;
  grid-row: 1;
}
.services-page .service-row.reverse .service-row-media {
  grid-column: 2;
  grid-row: 1;
}
.service-tile-strong {
  background:
    linear-gradient(170deg, #ffffff, #f7fbff 58%, #eef8ff);
  border: 1px solid #c8dbf0;
  box-shadow: 0 14px 34px rgba(7, 43, 83, 0.09);
}
.service-tile-strong:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease;
}
.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid #dce8f6;
}
.services-page .service-image-row {
  height: 100%;
  min-height: 0;
  margin-bottom: 0;
}
.service-tile h3 { margin: 10px 0 8px; font-size: 18px; }
.service-tile p { margin: 0 0 6px; color: #50607a; line-height: 1.55; }
.services-page .service-tile p {
  flex-grow: 1;
}
.service-tag {
  display: inline-block;
  border: 1px solid #b9d0ea;
  border-radius: 999px;
  font-size: 11px;
  color: #1e5188;
  padding: 3px 9px;
  background: #edf5ff;
}
.services-page .service-tile-cta .button {
  width: auto !important;
  max-width: 100%;
}
.services-page .service-row-content .service-tile-cta {
  margin-top: auto;
}
.services-page .services-process-card {
  margin-top: 14px;
}
.services-page .services-process-title {
  margin-top: 0;
}
.services-page .services-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.services-page .service-quick-card {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: linear-gradient(160deg, #153d6d, #1d6f74);
  padding: 10px 12px;
  text-align: center;
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  text-decoration: none;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.services-page .service-quick-card:hover {
  background: linear-gradient(160deg, #1a477e, #278386);
  border-color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
}
.service-cta-row {
  margin-top: 12px;
}
.service-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.services-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.services-admin-form .full {
  grid-column: 1 / -1;
}
.journal-actions {
  min-width: 96px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-items: stretch;
}
.journal-actions form {
  margin: 0;
  display: block;
}
.journal-actions .button {
  width: 96px;
  min-height: 34px;
  padding: 7px 10px;
}
.actions-cell {
  min-width: 128px;
  white-space: nowrap;
}
.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.section-title-block {
  min-width: 0;
}
.section-title-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.section-heading-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.section-subtext {
  margin: 0;
  font-size: 13px;
  color: #5a6981;
}
.journal-add-row {
  margin: 2px 0 0;
  display: block;
}
.journals-toolbar {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.journals-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.process-item {
  border: 1px solid #dce8f6;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}
.step-no {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #0b5cab;
  font-weight: 700;
  margin-bottom: 6px;
}
.process-item p { margin: 0; color: #3f4f67; font-size: 14px; line-height: 1.4; }

@media (max-width: 900px) {
  .filters-grid, .journal-grid, .form-grid, .stats-grid, .split-2, .service-hero, .services-grid, .process-strip, .services-admin-form { grid-template-columns: 1fr; }
  .admin-main-actions { flex-wrap: wrap; overflow-x: visible; }
  .admin-user-actions { justify-content: flex-start; }
  .section-heading-row { grid-template-columns: 1fr; }
  .journal-actions { min-width: 0; }
  .checkbox-list.checkbox-two-col { grid-template-columns: 1fr; }
  .services-page .service-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .services-page .service-row.reverse {
    grid-template-columns: 1fr;
  }
  .services-page .service-row.reverse .service-row-media,
  .services-page .service-row.reverse .service-row-content {
    order: initial;
    grid-column: auto;
    grid-row: auto;
  }
  .services-page .service-row-media,
  .services-page .service-row-content {
    width: 100%;
  }
  .services-page .service-image-row {
    min-height: 160px;
  }
  .services-page .services-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header h1 { font-size: min(var(--header-title-size, 30px), 26px); }
  .header-subtitle { font-size: min(var(--header-subtitle-size, 16px), 15px); }
  .button.main-btn { padding: 10px 14px; font-size: 13px; }
  .button.sub-btn { padding: 7px 10px; font-size: 12px; }
  .journals-filters { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .services-grid-two { grid-template-columns: 1fr; gap: 14px; }
  .container { padding: 0 12px; }
  .card { padding: 14px; border-radius: 12px; }
  .top-nav { gap: 8px; }
  .top-nav a { font-size: min(var(--header-nav-font-size, 14px), 12px); padding: 6px 10px; }
  .top-nav .nav-logo-link { padding: 0; }
  .top-nav .nav-logo { height: 32px; }
  .service-image { height: 180px; }
  .services-page .service-tile-cta .button {
    width: 100% !important;
  }
  table { font-size: 13px; min-width: 760px; }
  th, td { padding: 8px; }
}

@media (max-width: 600px) {
  .site-header { padding: 16px 0 20px; }
  .site-header h1 { font-size: min(var(--header-title-size, 30px), 23px); }
  .header-subtitle { font-size: min(var(--header-subtitle-size, 16px), 14px); }
  .admin-main-actions,
  .admin-user-actions,
  .page-top-actions,
  .action-row { gap: 6px; }
  .button { font-size: 13px; padding: 9px 12px; }
  .button.main-btn { width: 100%; justify-content: center; }
  .button.sub-btn { padding: 7px 9px; }
  .action-row .button,
  .page-top-actions .button { width: 100%; }
  .inline-form > div { width: 100%; }
  .field-min-260 { min-width: 0; width: 100%; }
  .journal-actions .button { width: 100%; min-width: 0; }
  .actions-cell { min-width: 120px; }
  .service-image { height: 160px; }
  .process-item p { font-size: 13px; }
  .services-page .service-hero {
    padding: 16px;
    border-radius: 14px;
  }
  .services-page .services-hero-actions .button {
    width: 100%;
  }
  .services-page .services-quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .container { padding: 0 10px; }
  .site-header h1 { font-size: min(var(--header-title-size, 30px), 21px); }
  .card { padding: 12px; }
  .top-nav { gap: 6px; }
  .top-nav a { font-size: min(var(--header-nav-font-size, 14px), 11px); padding: 5px 9px; }
  .top-nav .nav-logo { height: 28px; }
  .footer-note { padding: 14px 0 28px; }
  .footer-note-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-tech-partner {
    margin-left: 0;
    text-align: left;
    white-space: normal;
  }
  table { min-width: 680px; }
}
