/*
 * BioCloud Standalone PHP Tools (/<id>/<id>.php) — Bright Palette & Mobile Responsiveness (2026-12-04)
 * Harmonizes 1,200+ modernized green tools (366, 899, 97, 107, 1000+) and 50+ legacy 770px tools (123, etc.).
 */

html, body {
  overflow-x: clip;
  background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%) !important;
  background-image: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%) !important;
  color: #0f172a !important;
}

/* 366-style & 899-style modernized tools: bright blue tokens */
header, .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #dbe6f5 !important;
}

.brand, .navbar-brand {
  color: #1d4ed8 !important;
}

a {
  color: #2563eb;
}

.nav-link {
  border-color: #cbdff8 !important;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%) !important;
  color: #1d4ed8 !important;
}

.nav-link.primary,
.btn-primary,
.jump-links .run-link,
.button.primary,
.primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20) !important;
}

.btn-secondary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  color: #ffffff !important;
}

.btn-upload {
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%) !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

.hero, .section, .card {
  border-color: #dbe6f5 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 32px rgba(23, 43, 77, 0.06) !important;
}

.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 52%, #f5f8ff 100%) !important;
}

.hero h1, .card h2 {
  color: #0f172a !important;
  text-wrap: balance;
}

.hero p, .card p, figcaption, .fine, .session-label {
  color: #475569 !important;
}

.jump-links a, .tool-link {
  color: #2563eb !important;
}

.sub, .input-example {
  background: #f1f6ff !important;
  border: 1px solid #dbe7f8;
}

.input-example dt, .data-table thead th {
  color: #1e3a8a !important;
}

.data-table thead th {
  background: #eff6ff !important;
}

.data-table th, .data-table td {
  border-bottom-color: #e2ecf9 !important;
  color: #1e293b !important;
}

.card code {
  color: #1d4ed8 !important;
  background: #eff6ff;
  padding: 1px 5px;
  border-radius: 4px;
}

.spinner-ring {
  border-color: rgba(37, 99, 235, 0.18) !important;
  border-top-color: #2563eb !important;
}

/* Legacy fixed-width 770px tools (e.g., /123/123.php) mobile rescue */
font[color="red"],
font[color="#ff0000"],
a font {
  color: #1d4ed8 !important;
}

#container {
  width: min(860px, calc(100% - 24px)) !important;
  max-width: 100% !important;
  margin: 20px auto !important;
  padding: 18px !important;
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(23, 43, 77, 0.07);
  overflow-x: auto;
}

#container form,
#container div {
  max-width: 100% !important;
}

#search_box {
  width: 100% !important;
  max-width: 100% !important;
  background: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  padding: 10px !important;
}

#search_box .wrapper {
  border-color: #bfdbfe !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: auto !important;
  min-height: 46px;
  padding: 6px 10px !important;
}

#search_box input[type="text"],
#search_box input:not([type="submit"]) {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 15px !important;
  margin: 4px 0 !important;
}

#container input[type="submit"] {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: #2563eb !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

#container img,
#container table {
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 680px) {
  .navbar {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .nav-link {
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }
  .page {
    width: calc(100% - 20px) !important;
    margin: 14px auto 36px !important;
  }
  .hero, .card, .section {
    padding: 18px 16px !important;
    border-radius: 16px !important;
  }
  .actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  .actions .button {
    width: 100%;
  }
}
