:root {
  --app-brand: #0b3a7a;
  --app-brand-soft: #e7eef9;
  --app-border: #d7dbe2;
  --app-bg: #f7f9fc;
  --app-muted: #6c757d;
  --ok: #198754;
  --warn: #fd7e14;
  --err: #dc3545;
}

html,
body {
  background: var(--app-bg);
}

.app-navbar {
  background: linear-gradient(90deg, #ffffff, #f2f6fc 60%, #edf4ff);
}

.app-nav-grid {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.app-nav-left {
  justify-self: start;
}

.app-nav-center {
  text-align: center;
  min-width: 0;
}

.app-title {
  color: #1a237e;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.app-subtitle {
  color: #495057;
  font-size: 0.8rem;
  line-height: 1.2;
}

.app-nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.partner-logo {
  display: block;
  height: 36px;
  width: auto;
  object-fit: contain;
}

.partner-logo-celsia {
  height: 32px;
}

.partner-logo-univalle {
  height: 42px;
}

.upload-zone {
  border: 2px dashed var(--app-border);
  border-radius: 12px;
  min-height: 150px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-zone:hover,
.upload-zone:focus {
  border-color: var(--app-brand);
  background: var(--app-brand-soft);
  outline: none;
}

.upload-zone.dragover {
  border-color: var(--app-brand);
  background: var(--app-brand-soft);
  box-shadow: inset 0 0 0 1px rgba(11, 58, 122, 0.15);
}

.upload-zone-title {
  font-weight: 700;
}

.upload-zone-subtitle,
.upload-zone-small {
  color: var(--app-muted);
  font-size: 0.85rem;
}

.status-box {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 10px;
  min-height: 52px;
  background: #fff;
  font-size: 0.9rem;
}

.status-box.ok {
  border-color: color-mix(in srgb, var(--ok) 40%, white);
  background: color-mix(in srgb, var(--ok) 8%, white);
}

.status-box.warn {
  border-color: color-mix(in srgb, var(--warn) 40%, white);
  background: color-mix(in srgb, var(--warn) 8%, white);
}

.status-box.err {
  border-color: color-mix(in srgb, var(--err) 40%, white);
  background: color-mix(in srgb, var(--err) 8%, white);
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
}

.table-wrap table {
  margin-bottom: 0;
  font-size: 0.9rem;
  min-width: 560px;
}

.table-wrap table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3fb;
  white-space: nowrap;
}

.table-wrap td,
.table-wrap th {
  vertical-align: middle;
}

.table-wrap input,
.table-wrap select {
  min-width: 90px;
  font-size: 0.86rem;
}

.table-wrap input[readonly],
.table-wrap input[data-lock="1"] {
  background: #f1f3f5;
}

.img-frame {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.img-frame img {
  max-width: 100%;
  height: auto;
  display: block;
}

.placeholder-note {
  color: var(--app-muted);
  font-size: 0.9rem;
}

#app-alerts .alert {
  margin-bottom: 0.6rem;
}

@media (max-width: 991px) {
  .app-nav-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "center center"
      "left right";
    row-gap: 8px;
  }

  .app-nav-left {
    grid-area: left;
  }

  .app-nav-center {
    grid-area: center;
  }

  .app-nav-right {
    grid-area: right;
  }

  .app-title {
    font-size: 1.18rem;
  }

  .app-subtitle {
    font-size: 0.72rem;
  }

  .table-wrap table {
    min-width: 520px;
  }

  .partner-logo {
    height: 24px;
  }

  .partner-logo-celsia {
    height: 21px;
  }

  .partner-logo-univalle {
    height: 28px;
  }

  .app-badges .badge {
    font-size: 0.67rem;
  }
}
