/* Connect — base admin styles. Brand: chartreuse #D8E020 + charcoal #606060,
   sampled from the AA logo. Plain CSS, no build step, so it's easy to tweak
   directly on the server if needed. */

:root{
  --accent: #C9D11A;      /* slightly deepened for AA/contrast on white UI chrome */
  --accent-bright: #D8E020;
  --ink: #2A2A2A;
  --ink-soft: #606060;
  --line: #E2E2E2;
  --surface: #FFFFFF;
  --bg: #F5F5F3;
  --ok: #3F6B4F;
  --ok-bg: #E4EFE7;
  --warn: #A8720E;
  --warn-bg: #F5EAD2;
  --critical: #A13A2B;
  --critical-bg: #F3DCD7;
  --radius: 6px;
}

*{ box-sizing: border-box; }
body{
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a{ color: var(--ink); }
h1,h2,h3{ margin: 0 0 8px; }

.app-shell{ display: flex; min-height: 100vh; }

.sidebar{
  width: 220px;
  background: var(--ink);
  color: #EDEDED;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar .brand{
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar .brand img{ width: 28px; height: 28px; }
.sidebar .brand span{ font-weight: 600; font-size: 15px; }
.sidebar nav{ padding: 12px 8px; flex: 1; }
.sidebar nav a{
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: #C9C9C9;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}
.sidebar nav a:hover{ background: rgba(255,255,255,0.08); color: #fff; }
.sidebar nav a.active{ background: var(--accent-bright); color: #1a1a1a; font-weight: 600; }
.sidebar .user{
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12.5px; color: #B5B5B5;
}
.sidebar .user form{ margin-top: 6px; }
.sidebar .user button{
  background: none; border: none; color: #C9C9C9; font-size: 12.5px; padding: 0; cursor: pointer; text-decoration: underline;
}

.main{ flex: 1; padding: 28px 34px; max-width: 1100px; }
.page-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.page-head h1{ font-size: 22px; }
.page-head .dek{ color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }

.btn{
  display: inline-block;
  background: var(--accent-bright);
  color: #1a1a1a;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover{ filter: brightness(0.95); }
.btn.secondary{ background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

.card{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

.stat-row{ display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .n{ font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l{ font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

table{ width: 100%; border-collapse: collapse; background: var(--surface); }
table th, table td{ text-align: left; padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
table th{ font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); background: #FAFAF8; }
.table-wrap{ border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }

.pill{ display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.pill.active, .pill.won, .pill.paid, .pill.filed, .pill.closed{ background: var(--ok-bg); color: var(--ok); }
.pill.prospect, .pill.pending, .pill.draft, .pill.new{ background: var(--warn-bg); color: var(--warn); }
.pill.overdue, .pill.offboarded, .pill.lost{ background: var(--critical-bg); color: var(--critical); }

.form-group{ margin-bottom: 16px; }
.form-group label{ display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea{
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; font-family: inherit;
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.toggle-row{ display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child{ border-bottom: none; }
.toggle-row .t-name{ font-size: 14px; font-weight: 600; }
.toggle-row .t-desc{ font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.switch{ position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input{ opacity: 0; width: 0; height: 0; }
.switch .track{ position: absolute; inset: 0; background: #D0D0D0; border-radius: 99px; transition: .15s; cursor: pointer; }
.switch .track::before{ content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + .track{ background: var(--accent-bright); }
.switch input:checked + .track::before{ transform: translateX(18px); }

.alert{ padding: 11px 14px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 18px; }
.alert.error{ background: var(--critical-bg); color: var(--critical); }
.alert.success{ background: var(--ok-bg); color: var(--ok); }

.section-title{ font-size: 15px; margin: 26px 0 10px; }

.login-shell{ min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card{ background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 36px 32px; width: 340px; }
.login-card img{ width: 36px; margin-bottom: 14px; }
.login-card h1{ font-size: 18px; }
.login-card .dek{ font-size: 13px; color: var(--ink-soft); margin-bottom: 22px; }
.login-card .btn{ width: 100%; margin-top: 6px; text-align: center; }
