/* ==========================================================================
   tci.css - FreezerMate in the TCI Consultancy brand (week 5).
   Loaded last, after styles.css and template.css. Colours and fonts match
   tci-consultancy.com. Selectors are deliberately specific so page-level
   <style> blocks written for the old blue header do not override them.
   ========================================================================== */
:root {
  --tci-bg: #EAF4EE;
  --tci-surface: #FFFFFF;
  --tci-ink: #16213E;
  --tci-muted: #4D6260;
  --tci-line: #CFE0D6;
  --tci-accent: #16705F;
  --tci-accent-soft: #D6ECE2;
  --tci-warm: #D98E2B;
  --tci-f-logo: Georgia, "Times New Roman", serif;
  --tci-f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --tci-f-body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --tci-f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

body { font-family: var(--tci-f-body); color: var(--tci-ink); }

/* ---- header ---------------------------------------------------------- */
header.tci-header.header-bar {
  position: sticky; top: 0; z-index: 50;
  margin-bottom: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px;
  background: var(--tci-surface);
  border-bottom: 1px solid var(--tci-line);
  box-shadow: 0 1px 0 var(--tci-line);
  font-family: var(--tci-f-body); font-weight: 400;
}
header.tci-header .tci-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--tci-ink);
}
header.tci-header .tci-mark { flex: none; display: block; }
header.tci-header .tci-wordmark { display: block; line-height: 1; text-align: left; }
header.tci-header .tci-wordmark b {
  display: block; font-family: var(--tci-f-logo); font-weight: 700;
  font-size: 23px; letter-spacing: .02em; color: var(--tci-ink);
}
header.tci-header .tci-wordmark span {
  display: block; margin-top: 4px;
  font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: 9px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--tci-muted);
}
header.tci-header .left-header.tci-date {
  color: var(--tci-muted); font-family: var(--tci-f-mono); font-size: 12.5px;
  font-weight: 400; flex: 1; text-align: center;
}
header.tci-header .right-header.tci-user {
  display: flex; align-items: center; gap: 10px; position: relative;
  color: var(--tci-ink);
}
header.tci-header .dropdown1 { position: relative; }
header.tci-header .dropdown-trigger1 {
  cursor: pointer; color: var(--tci-ink); font-weight: 600; font-size: 14.5px;
  padding: 6px 10px; border-radius: 4px;
}
header.tci-header .dropdown-trigger1:hover { background: var(--tci-accent-soft); }
header.tci-header .dropdown-content1 {
  display: none; position: absolute; right: 0; top: 120%; min-width: 160px;
  background: var(--tci-surface); border: 1px solid var(--tci-line); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(22, 33, 62, .12); z-index: 1001; text-align: left;
}
header.tci-header .dropdown-content1.show { display: block; }
header.tci-header .dropdown-content1 a {
  display: block; padding: 10px 14px; color: var(--tci-ink); text-decoration: none; font-size: 14px;
}
header.tci-header .dropdown-content1 a:hover { background: var(--tci-accent-soft); color: var(--tci-accent); }
header.tci-header .tci-account-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--tci-f-body); font-weight: 600; font-size: 14.5px;
  padding: 7px 14px; border-radius: 4px; cursor: pointer;
  background: transparent; color: var(--tci-accent); border: 1.5px solid var(--tci-accent);
}
header.tci-header .tci-account-btn:hover { background: var(--tci-accent-soft); }
.tci-modal {
  background: var(--tci-surface); margin: 5% auto; padding: 10px;
  width: 800px; max-width: 94vw; height: 750px; max-height: 88vh;
  position: relative; border-radius: 8px; border-top: 4px solid var(--tci-warm);
}

/* ---- buttons and links across pages --------------------------------- */
/* The shape of a button, so a page need not load Bootstrap for it (the public
   pages do not). These are Bootstrap's own measurements, so the pages that do
   load it look the same as before. 11 Nov 2026. */
.btn, a.btn, input.btn, button.btn {
  display: inline-block; box-sizing: border-box; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px;
  line-height: 1.5; text-align: center; vertical-align: middle; text-decoration: none; cursor: pointer;
}
a.btn:hover, a.btn:focus { text-decoration: none; }
.btn.btn-primary {
  background-color: var(--tci-accent); border-color: var(--tci-accent); color: #fff;
  font-family: var(--tci-f-body); font-weight: 600; border-radius: 4px;
}
.btn.btn-primary:hover, .btn.btn-primary:focus { background-color: #12604f; border-color: #12604f; color: #fff; }
.btn.btn-secondary {
  background-color: transparent; border: 1.5px solid var(--tci-accent); color: var(--tci-accent);
  font-family: var(--tci-f-body); font-weight: 600; border-radius: 4px;
}
.btn.btn-secondary:hover { background-color: var(--tci-accent-soft); color: var(--tci-accent); }

/* ---- footer ---------------------------------------------------------- */
footer.tci-footer {
  margin: 40px auto 0; padding: 18px 24px 26px; max-width: 1120px;
  border-top: 2px solid var(--tci-warm);
  font-family: var(--tci-f-body); color: var(--tci-muted); text-align: center;
}
footer.tci-footer .tci-footnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
footer.tci-footer .tci-footnav a {
  color: var(--tci-ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
footer.tci-footer .tci-footnav a:hover { color: var(--tci-accent); text-decoration: underline; }
footer.tci-footer .tci-footmeta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 13px;
}
footer.tci-footer .tci-footmeta a { color: var(--tci-accent); text-decoration: none; font-weight: 600; }
footer.tci-footer .tci-footmeta a:hover { text-decoration: underline; }
footer.tci-footer .tci-ruo { font-family: var(--tci-f-mono); font-size: 12px; }

@media print {
  header.tci-header, footer.tci-footer .tci-footnav { display: none; }
}

/* ---- full logo under the header, on every page ------------------------ */
.tci-banner { text-align: center; margin: -8px 0 6px; }
.tci-banner img { display: inline-block; max-width: 80vw; height: auto; }
@media print { .tci-banner img { width: 260px; } }

/* ---- public (logged-out) pages ---------------------------------------- */
header.tci-header.tci-public .tci-publicnav { display: flex; align-items: center; gap: 4px; }
header.tci-header.tci-public .tci-publicnav a {
  color: var(--tci-ink); text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 7px 11px; border-radius: 4px;
}
header.tci-header.tci-public .tci-publicnav a:hover { background: var(--tci-accent-soft); color: var(--tci-accent); }
header.tci-header.tci-public .tci-publicnav a.tci-login {
  margin-left: 6px; color: #fff; background: var(--tci-accent); border: 1.5px solid var(--tci-accent);
}
header.tci-header.tci-public .tci-publicnav a.tci-login:hover { filter: brightness(1.08); color: #fff; }
/* the login / registration card: TCI teal shadow and an amber top edge instead of the blue glow */
table.shadow-table {
  box-shadow: 0 8px 28px rgba(22, 112, 95, .18), 0 1px 0 var(--tci-line);
  border-top: 4px solid var(--tci-warm);
  border-radius: 8px;
}
h1, h2, h3, .container-title h2 { font-family: var(--tci-f-display); color: var(--tci-ink); }
input[type=text], input[type=password], input[type=email], select, textarea {
  font-family: var(--tci-f-body); border: 1px solid #b8cfc3; border-radius: 4px; padding: 4px 6px;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, select:focus, textarea:focus {
  outline: 2px solid var(--tci-accent-soft); border-color: var(--tci-accent);
}
@media (max-width: 760px) {
  header.tci-header .left-header.tci-date { display: none; }
  header.tci-header.tci-public .tci-publicnav a { padding: 6px 7px; font-size: 13.5px; }
}
/* pages styled their own plain "footer {}" (grey band); keep the TCI footer clean */
footer.tci-footer { background: transparent; position: static; width: auto; box-shadow: none; }

/* ---- inside the app pages ---------------------------------------------- */
/* text in tables and forms: TCI body font instead of the old Times */
td, th, label, p, li { font-family: var(--tci-f-body); }
/* buttons: TCI font, no shouty capitals (some buttons set Times in their own style attribute) */
.btn, input.btn, button.btn {
  font-family: var(--tci-f-body) !important; text-transform: none !important;
  letter-spacing: .02em !important; font-size: 15px !important;
}
/* section banners some pages print as a plain <header> (e.g. About): TCI mint with an amber rule */
header:not(.tci-header) {
  background: var(--tci-bg) !important; color: var(--tci-ink) !important;
  border-bottom: 3px solid var(--tci-warm);
}
header:not(.tci-header) h1 { color: var(--tci-ink); }
/* the box grid: mint headings, teal "InUse" wells (set by the grid page's script) */
table.button-table thead th, table.button-table tbody th {
  background-color: var(--tci-bg) !important; color: var(--tci-ink);
  font-family: var(--tci-f-display); border-color: var(--tci-line) !important;
}
table.button-table th, table.button-table td { border-color: var(--tci-line) !important; }
table.button-table input.enabled {
  font-family: var(--tci-f-mono); background-color: #eef3f0; border-color: #eef3f0; color: var(--tci-ink);
}
table.button-table input.enabled:hover { background-color: var(--tci-accent-soft); }
/* labels and grid text that set Times in the HTML itself */
td > b, th > b, td > a, th > a, td > font, td > label { font-family: var(--tci-f-body) !important; }
table.button-table th a { font-family: var(--tci-f-display) !important; color: var(--tci-ink); }
table.button-table input { font-family: var(--tci-f-mono) !important; font-weight: 500 !important; }
/* page-level header bars (e.g. the Account pop-up): readable on the mint background */
header:not(.tci-header) .left-header, header:not(.tci-header) .middle-header, header:not(.tci-header) .right-header {
  color: var(--tci-ink) !important; font-family: var(--tci-f-body) !important; font-weight: 600;
}
header:not(.tci-header) .left-header { font-family: var(--tci-f-mono) !important; font-weight: 400; font-size: 12.5px; color: var(--tci-muted) !important; }
header:not(.tci-header) .right-header span { color: var(--tci-accent) !important; }

/* Data tables: the old border="5" frame was drawn in the ink colour (navy). TCI frame and lines instead. */
table.styled-table[border] { border: 3px solid #16705F; border-collapse: collapse; }
table[border="5"] { border: 3px solid #16705F; }
table.styled-table[border] > tbody > tr > th,
table.styled-table[border] > tbody > tr > td,
table.styled-table[border] > thead > tr > th { border: 1px solid #CFE0D6; }
table.styled-table[border] > tbody > tr > th,
table.styled-table[border] > thead > tr > th { background-color: #D6ECE2; color: #16213E; }

/* Small in-form buttons (Show Clone Data, Add Strain/Species/Source): compact, not full-size */
button.btn.btn-primary[onclick^="toggleTable"],
input.btn.btn-primary[name="Add Strain"],
input.btn.btn-primary[name="Add Species"],
input.btn.btn-primary[name="Add Source"] {
  padding: 3px 12px; line-height: 1.3; font-size: 13px; min-height: 0; height: auto; vertical-align: middle;
}

/* ---- phones (10 Nov 2026): the header fits, old fixed-width tables shrink, wide tables scroll ---- */
img { max-width: 100%; }
@media (max-width: 640px) {
  header.tci-header.header-bar { padding: 8px 10px; gap: 8px; height: auto; min-height: 0; flex-wrap: wrap; }
  header.tci-header .tci-wordmark span { display: none; }
  header.tci-header .tci-wordmark b { font-size: 18px; }
  header.tci-header .tci-mark { width: 30px; height: 30px; }
  header.tci-header .right-header.tci-user { gap: 6px; margin-left: auto; }
  header.tci-header .dropdown-trigger1 { padding: 6px 6px; font-size: 13.5px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.tci-header .tci-account-btn { padding: 6px 9px; font-size: 13.5px; }
  header.tci-header.tci-public .tci-publicnav { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; gap: 2px; }
  header.tci-header.tci-public .tci-publicnav a { padding: 6px 6px; font-size: 13px; }
  table[width] { width: auto !important; max-width: 100% !important; }
  td[width], th[width] { width: auto !important; }
  input[size], select, textarea { max-width: 100%; box-sizing: border-box; }
  .tci-banner img { width: 240px; }
  footer.tci-footer .tci-footmeta { display: block; text-align: center; line-height: 1.9; }
}
