/* Admin UI styles. Relies on brand tokens from brand.css (load brand.css first). */
:root {
    --ink: var(--op-navy);
    --text: #1d2030;
    --muted: var(--op-slate);
    --line: var(--op-light-gray);
    --paper: #f4f6fa;
    --accent: var(--op-blue);
}

body {
    margin: 0;
    color: var(--text);
    background: var(--paper);
}

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 36px; width: 100%; max-width: 360px; box-shadow: 0 6px 24px rgba(8, 29, 52, 0.08); }
.login-brand { font-size: 1.5rem; margin-bottom: 22px; }
.login-sub { font-size: 0.8rem; color: var(--muted); margin: -16px 0 22px; letter-spacing: 0.01em; }
.login-error { margin-bottom: 16px; }
.login-card input[type="password"] {
    width: 100%;
    padding: 13px 15px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}
.login-card input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15); }
.login-btn { width: 100%; margin-top: 14px; padding: 13px 18px; box-sizing: border-box; font-size: 1rem; border-radius: 4px; cursor: pointer; }

/* Form rows */
.entryformrow { margin-bottom: 18px; }
.entryformrow label { display: block; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font-family: var(--op-font-head);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--op-gradient); border: none; color: #fff; }
.btn-primary:hover { color: #fff; opacity: 0.92; }

/* Notices */
.notice { background: #eaf4ff; border: 1px solid var(--op-sky-blue); color: var(--op-deep-navy); padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; }

/* Wider content area (default Bootstrap caps ~1320px). */
.container { max-width: 1600px; }

/* Smaller, denser text in data grids. */
.table { font-size: 0.8rem; }
.table th, .table td { padding-top: 0.3rem; padding-bottom: 0.3rem; }

/* Sticky footer via flexbox — the template footer had no positioning, so on short pages it
   floated up under the content instead of sitting at the bottom. Make the body a full-height
   flex column, let the content region grow, and keep the footer pinned below it. */
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
body > .container { flex: 1 0 auto; width: 100%; }
.footer { flex-shrink: 0; padding: 14px 0; }

/* Compact text-link row actions inside data grids — replaces bulky per-row buttons.
   Works on both <a> and <button> so form-submit actions (Delete, Bill) stay POSTs
   while reading as links. */
.grid-action {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  line-height: inherit;
  color: var(--op-blue);
  text-decoration: none;
  cursor: pointer;
  vertical-align: baseline;
}
.grid-action:hover { text-decoration: underline; color: var(--op-blue); }
.grid-action:disabled { color: var(--op-slate); cursor: default; text-decoration: none; opacity: 0.6; }
.grid-action.danger { color: #dc3545; }
.grid-action.success { color: #198754; }

/* Opportunity map: tint the ESTIMATED (assumption-based) columns so they're unmistakable
   next to the measured/derived columns. Pairs with the ● measured / ⚠ estimated legend. */
.est-col { background: #fff8ec; }
th.est-col, td.est-col { border-left: 1px solid #f0d9a8 !important; }

/* Playbook disclosure on the Opportunity pages */
.playbook > summary { cursor: pointer; list-style: revert; }
.playbook > summary:hover { color: var(--op-blue); }

/* Smaller page titles across the admin — the h3-sized headings were too large. */
h1.h3 { font-size: 1.3rem; }
