/* ==========================================================================
   Bidvest Branded Products — Redmine theme
   Palette from the Bidvest CI: PMS 659 corporate blue (#7BA4DB),
   PMS 8660 metallic gold (#8E7831), white, dark neutral.
   Light + dark capable: dark follows the OS unless html.theme-light /
   html.theme-dark is set explicitly.
   Drop this folder in redmine/public/themes/ and pick "bidvest" in
   Administration > Settings > Display > Theme.
   ========================================================================== */

@import url("/assets/application-839c155b.css");

:root {
  color-scheme: light dark;
  --bv-blue: #7ba4db;          /* PMS 659 */
  --bv-blue-deep: #16325c;
  --bv-blue-deeper: #0e2242;
  --bv-gold: #8e7831;          /* PMS 8660 */
  --bv-gold-bright: #c4a548;

  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #eaeff6;
  --surface-3: #dfe6ef;
  --border: #d3dbe6;
  --border-strong: #b9c5d4;
  --text: #16202e;
  --text-muted: #5c6b80;
  --link: #1b4f91;
  --link-hover: #0e2242;

  --chrome: var(--bv-blue-deep);
  --chrome-text: #ffffff;
  --chrome-dim: rgba(255, 255, 255, 0.72);
  --accent: var(--bv-gold);
  --on-accent: #ffffff;

  --ok: #1f7a4c;
  --ok-bg: #e6f4ec;
  --warn: #97650a;
  --warn-bg: #fbf1dc;
  --err: #ab2f26;
  --err-bg: #fbeae8;

  --radius: 6px;
  --shadow-1: 0 1px 2px rgba(14, 34, 66, 0.08);
  --shadow-2: 0 2px 4px rgba(14, 34, 66, 0.08), 0 12px 28px rgba(14, 34, 66, 0.07);
  --row-pad: 7px 10px;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: Archivo, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

html.theme-dark {
  --bg: #0c1320;
  --surface: #141e2e;
  --surface-2: #1a2537;
  --surface-3: #223047;
  --border: #2a3a52;
  --border-strong: #3a4d69;
  --text: #e6ecf5;
  --text-muted: #9baac0;
  --link: #93b8e8;
  --link-hover: #bcd4f2;

  --chrome: #0a1122;
  --chrome-text: #ffffff;
  --chrome-dim: rgba(255, 255, 255, 0.66);
  --accent: var(--bv-gold-bright);
  --on-accent: #1a1405;

  --ok: #5cbb8b;
  --ok-bg: #122b20;
  --warn: #d9a441;
  --warn-bg: #2c2413;
  --err: #e58279;
  --err-bg: #33191a;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 14px 32px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) {
    --bg: #0c1320;
    --surface: #141e2e;
    --surface-2: #1a2537;
    --surface-3: #223047;
    --border: #2a3a52;
    --border-strong: #3a4d69;
    --text: #e6ecf5;
    --text-muted: #9baac0;
    --link: #93b8e8;
    --link-hover: #bcd4f2;
    --chrome: #0a1122;
    --chrome-dim: rgba(255, 255, 255, 0.66);
    --accent: var(--bv-gold-bright);
    --on-accent: #1a1405;
    --ok: #5cbb8b;
    --ok-bg: #122b20;
    --warn: #d9a441;
    --warn-bg: #2c2413;
    --err: #e58279;
    --err-bg: #33191a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 14px 32px rgba(0, 0, 0, 0.4);
  }
}

/* Fill the full viewport on nothing falls through to the browser's
   default white canvas on short pages or overscroll. */
html {
  background: var(--bg);
  min-height: 100%;
}
body {
  min-height: 100vh;
}

/* Compact density (html.bv-compact) */
html.bv-compact { --row-pad: 4px 8px; }
/* Blue-only mode: retire the gold accent (html.bv-no-gold) */
html.bv-no-gold { --accent: var(--bv-blue); --on-accent: #0e2242; }

/* --- base ----------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover, a:active { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); letter-spacing: -0.01em; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
h3 { font-size: 16px; font-weight: 600; }
hr { border: none; border-top: 1px solid var(--border); }
code, pre, tt { font-family: var(--font-mono); }

/* --- top menu ------------------------------------------------------------- */
#top-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--chrome);
  color: var(--chrome-dim);
  font-size: 12px;
  padding: 0 20px;
  min-height: 30px;
  line-height: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
#top-menu a, #top-menu #loggedas { color: var(--chrome-dim); font-weight: 500; }
#top-menu a:hover { color: #fff; text-decoration: none; }
#top-menu ul { margin: 0; padding: 0; }
#top-menu li { display: inline-block; margin-right: 14px; list-style: none; }
#top-menu > div { float: none !important; white-space: nowrap; }

/* --- header --------------------------------------------------------------- */
#header {
  background: var(--chrome);
  color: var(--chrome-text);
  padding: 14px 20px 16px;
  border-bottom: 3px solid var(--accent);
  position: relative;
}
#header h1 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}
#header a { color: #fff; }
#quick-search { float: right; margin-top: -4px; }
#quick-search input[type="text"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  width: 190px;
}
#quick-search input[type="text"]::placeholder { color: rgba(255, 255, 255, 0.6); }
#quick-search input[type="text"]:focus { background: rgba(255, 255, 255, 0.16); outline: none; border-color: var(--accent); }

/* --- main menu ------------------------------------------------------------ */
#main-menu { background: var(--chrome); padding: 0 20px; }
#main-menu ul { margin: 0; padding: 0; display: flex; gap: 2px; }
#main-menu li { list-style: none; }
#main-menu li a {
  display: block;
  color: var(--chrome-dim);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
#main-menu li a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; }
#main-menu li a.selected, #main-menu li a.selected:hover {
  background: var(--bg);
  color: var(--link);
  border-bottom-color: var(--bg);
}

/* --- layout --------------------------------------------------------------- */
#main { display: flex; gap: 20px; align-items: flex-start; padding: 20px; background: var(--bg); }
#content {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 20px 22px 26px;
}
#sidebar {
  flex: 0 0 240px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--text-muted);
}
#sidebar h3 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}
#sidebar ul { margin: 0 0 18px; padding: 0; }
#sidebar li { list-style: none; padding: 3px 0; }
#footer {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 18px;
  border-top: 1px solid var(--border);
  margin: 12px 20px 0;
}
.contextual { float: right; display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* --- boxes, tabs, flash --------------------------------------------------- */
.box, div.box, fieldset.box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
fieldset {
  border: none;
  border-top: 1px solid var(--border);
  padding: 12px 0 0;
  margin: 0 0 16px;
}
fieldset legend { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.tabs ul { display: flex; gap: 2px; margin: 0 0 -1px; padding: 0; border-bottom: 1px solid var(--border); }
.tabs li { list-style: none; }
.tabs ul li a {
  display: block;
  padding: 8px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tabs ul li a:hover { background: var(--surface-3); text-decoration: none; }
.tabs ul li a.selected {
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
  color: var(--link);
}
div.flash {
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-weight: 500;
  border: 1px solid transparent;
}
div.flash.notice { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
div.flash.warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
div.flash.error { background: var(--err-bg); color: var(--err); border-color: var(--err); }

/* --- tables --------------------------------------------------------------- */
table.list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}
table.list th {
  background: var(--surface-2);
  color: var(--text-muted);
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: var(--row-pad);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.list th a { color: var(--text-muted); }
table.list td { padding: var(--row-pad); border-bottom: 1px solid var(--border); vertical-align: top; }
table.list tr:last-child td { border-bottom: none; }
table.list tr.odd { background: var(--surface); }
table.list tr.even { background: var(--surface-2); }
table.list tr:hover td { background: var(--surface-3); }
table.list td.id, table.list td.checkbox { color: var(--text-muted); text-align: right; }
tr.issue.closed td.subject a, .closed { text-decoration: line-through; color: var(--text-muted); }
p.pagination, span.pagination { color: var(--text-muted); font-size: 12px; margin-top: 12px; }
p.pagination a { padding: 2px 7px; border: 1px solid var(--border); border-radius: 4px; margin-right: 3px; }
p.pagination span.current.page { padding: 2px 7px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* --- attributes / issue detail ------------------------------------------- */
div.issue { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
div.issue table.attributes th { color: var(--text-muted); font-weight: 600; text-align: left; padding: 4px 12px 4px 0; width: 24%; }
div.issue table.attributes td { padding: 4px 0; }
.journal { border-top: 1px solid var(--border); padding: 14px 0; }
.journal h4 { margin: 0 0 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.journal ul.details { color: var(--text-muted); font-size: 13px; }
blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 2px 0 2px 12px; color: var(--text-muted); }

/* progress bars */
table.progress { border-collapse: collapse; border-radius: 999px; overflow: hidden; height: 8px; width: 120px; background: var(--surface-3); }
table.progress td { height: 8px; padding: 0; }
table.progress td.closed { background: var(--ok); }
table.progress td.done { background: var(--bv-blue); }
table.progress td.todo { background: var(--surface-3); }
p.percent { font-size: 11px; color: var(--text-muted); }

/* badges / tags */
.badge, span.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-status-open { background: rgba(123, 164, 219, 0.18); color: var(--link); border-color: var(--bv-blue); }
.badge-status-closed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.badge-prio-high { background: var(--err-bg); color: var(--err); border-color: var(--err); }

/* --- forms & buttons ----------------------------------------------------- */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-family: inherit;
  font-size: 13px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bv-blue);
  box-shadow: 0 0 0 3px rgba(123, 164, 219, 0.28);
}
label { color: var(--text-muted); font-size: 13px; font-weight: 600; }

input[type="submit"], input[type="button"], button, a.button {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: var(--shadow-1);
}
input[type="submit"]:hover, button:hover, a.button:hover { background: var(--surface-3); text-decoration: none; }
input[type="submit"].primary, button.primary, a.button.primary,
#login-form input[type="submit"] {
  background: var(--bv-blue-deep);
  border-color: var(--bv-blue-deep);
  color: #fff;
}
input[type="submit"].primary:hover, button.primary:hover, a.button.primary:hover,
#login-form input[type="submit"]:hover { background: var(--bv-blue-deeper); border-color: var(--bv-blue-deeper); }
html.theme-dark input[type="submit"].primary,
html.theme-dark button.primary,
html.theme-dark a.button.primary { background: var(--bv-blue); border-color: var(--bv-blue); color: #0b1526; }

/* --- login --------------------------------------------------------------- */
#login-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: 26px 28px;
  max-width: 360px;
  margin: 40px auto;
}
#login-form table { width: 100%; }

/* --- wiki --------------------------------------------------------------- */
.wiki h1, .wiki h2, .wiki h3 { border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.wiki pre, pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  overflow: auto;
}
.wiki code, code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }

/* --- my page / gantt / calendar ------------------------------------------ */
.mypage-box, #list-top .mypage-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 14px 16px;
}
.gantt_hdr { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }
.task_todo { background: var(--bv-blue); border-radius: 3px; }
.task_done { background: var(--ok); border-radius: 3px; }
table.cal th { background: var(--surface-2); color: var(--text-muted); }
table.cal td { border: 1px solid var(--border); }

/* --- misc --------------------------------------------------------------- */
.tooltip span.tip { background: var(--chrome); color: #fff; border: none; border-radius: var(--radius); box-shadow: var(--shadow-2); }
#ajax-indicator { background: var(--chrome); color: #fff; border-radius: var(--radius); }
::selection { background: rgba(123, 164, 219, 0.35); }
