/* ============================================================
   Acquire Intelligence Time Tracker
   Brand: Adriatic #155464 | Coral #FF6B5E | Acqua #46B29D
          Black #000000 | White #FFFFFF | Steel #777776
   ============================================================ */

:root {
  --adriatic:    #155464;
  --adriatic-h:  #0f3d4a;   /* darker hover */
  --adriatic-lt: #e8f2f4;   /* light tint for backgrounds */
  --coral:       #FF6B5E;
  --coral-h:     #e85547;
  --acqua:       #46B29D;
  --steel:       #777776;
  --black:       #000000;
  --white:       #FFFFFF;

  /* Semantic aliases */
  --bg:        #f4f7f8;
  --surface:   var(--white);
  --border:    #d0dde0;
  --text:      var(--black);
  --muted:     var(--steel);
  --primary:   var(--adriatic);
  --primary-h: var(--adriatic-h);
  --danger:    #c0392b;

  --radius:    6px;
  --shadow:    0 1px 3px rgba(21,84,100,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Proxima Nova", Aptos, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.navbar {
  background: var(--adriatic);
  border-bottom: none;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color .15s;
}

.nav-links a:hover { color: var(--white); }

.nav-sep { color: rgba(255,255,255,.25); }
.nav-user { color: rgba(255,255,255,.55); font-size:.875rem; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--adriatic);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 1.25rem 0 .5rem;
}

.cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  min-width: 140px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}

.card-green { border-color: var(--acqua); }
.card-blue  { border-color: var(--adriatic); }
.card-grey  { border-color: var(--steel); }

.card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.card-value { font-size: 32px; font-weight: 800; line-height: 1.1; margin-top: 2px; color: var(--adriatic); }
.card-sub   { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Billable bar ────────────────────────────────────────────────────────── */
.bill-bar-wrap { margin-bottom: 1.25rem; }

.bill-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
}

.bill-seg.billable     { background: var(--adriatic); }
.bill-seg.non-billable { background: var(--steel); }

.bill-legend {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.dot-blue, .dot-grey {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-blue { background: var(--adriatic); }
.dot-grey { background: var(--steel); }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--adriatic);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 2px solid var(--adriatic-lt);
  padding: 6px 8px;
}

td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--bg);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--adriatic-lt); }

.num { text-align: right; font-variant-numeric: tabular-nums; }

.client-row td { padding-top: 12px; }

.indent { padding-left: 1.5rem; color: var(--muted); }

.notes-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
}

.row-inactive { opacity: 0.45; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge.billable   { background: var(--adriatic-lt); color: var(--adriatic); }
.badge.non-bill   { background: #efefef; color: var(--steel); }
.badge.active     { background: #d4f0ea; color: #1a7a5e; }
.badge.inactive   { background: #fde8e8; color: #a93226; }
.badge.internal   { background: #e8f2f4; color: var(--adriatic); }
.badge.client     { background: #fff0ef; color: #c0392b; }
.badge.prospect   { background: #fff0ef; color: var(--coral-h); }

.badge.type-billable     { background: var(--adriatic-lt); color: var(--adriatic); }
.badge.type-non_billable { background: #efefef; color: var(--steel); }
.badge.type-internal     { background: #e8f2f4; color: var(--adriatic); }
.badge.type-presales     { background: #fff0ef; color: var(--coral-h); }

.badge.billing-time_and_materials { background: var(--adriatic-lt); color: var(--adriatic); }
.badge.billing-fixed_price        { background: #fff0ef; color: var(--coral-h); }
.badge.billing-retainer           { background: #d4f0ea; color: #1a7a5e; }
.badge.billing-capped_tm          { background: #efefef; color: var(--steel); }
.badge.billing-milestone          { background: #fef9e7; color: #7d6608; }

.badge.role-owner      { background: #1a3a44; color: #fff; }
.badge.role-admin      { background: var(--adriatic); color: #fff; }
.badge.role-editor     { background: var(--adriatic-lt); color: var(--adriatic); }
.badge.role-readonly   { background: #efefef; color: var(--steel); }
.badge.role-contractor { background: #fff4e0; color: #8a5c00; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-wrap {
  max-width: 560px;
}

.entry-form, .form-wrap form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--adriatic);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--adriatic);
  box-shadow: 0 0 0 3px rgba(21,84,100,.10);
}

.form-check { flex-direction: row; align-items: center; gap: 1rem; }
.form-check label { text-transform: none; font-size: 14px; font-weight: normal; cursor: pointer; color: var(--text); }
.form-check input { width: auto; margin-right: 4px; accent-color: var(--adriatic); }

.form-hint    { font-size: 11px; }
.hint-bill    { color: var(--adriatic); }
.hint-nonbill { color: var(--steel); }

.optional { color: var(--muted); font-weight: normal; text-transform: none; }

.form-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: 1.25rem;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.filter-bar select,
.filter-bar input[type="text"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--adriatic);
}

.date-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.date-filter label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: 13px;
  color: var(--muted);
}

.date-filter input[type="text"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  min-width: 180px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
button, .btn-primary, .btn-outline, .btn-sm, .btn-danger-sm {
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 6px 14px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-primary, button[type="submit"]:not(.btn-sm):not(.btn-danger-sm) {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.btn-primary:hover, button[type="submit"]:not(.btn-sm):not(.btn-danger-sm):hover {
  background: var(--coral-h);
  border-color: var(--coral-h);
}

.btn-outline {
  background: var(--surface);
  color: var(--adriatic);
  border-color: var(--adriatic);
}

.btn-outline:hover {
  background: var(--adriatic);
  color: var(--white);
}

.btn-sm {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--surface);
  color: var(--adriatic);
  border-color: var(--border);
}

.btn-sm:hover { border-color: var(--adriatic); background: var(--adriatic-lt); }

.btn-danger-sm {
  font-size: 14px;
  padding: 3px 8px;
  background: transparent;
  color: var(--steel);
  border-color: transparent;
}

.btn-danger-sm:hover { background: #fde8e8; color: var(--danger); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-size: 13px;
}

.alert-success {
  background: #d4f0ea;
  color: #1a7a5e;
  border: 1px solid #a8dfd3;
}

/* ── Misc ────────────────────────────────────────────────────────────────── */
code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  background: var(--adriatic-lt);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--adriatic);
}

.hint { font-size: 12px; color: var(--muted); margin-top: .75rem; }

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
