/* ── HCAIS CRM — Design System ── */
/* Brand: #FF6B35 Burnt Orange · #2C3E50 Dark Navy · #17A2B8 Teal */

:root {
  --orange:     #FF6B35;
  --orange-2:   #FF8C42;
  --navy:       #2C3E50;
  --teal:       #17A2B8;
  --amber:      #FF9500;
  --bg:         #1a2332;
  --surface:    #243447;
  --surface-2:  #2d3f55;
  --text:       #e8edf3;
  --text-muted: #8899aa;
  --border:     #344a62;
  --green:      #28a745;
  --red:        #dc3545;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,0,0,0.3);
}

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

body { font-family: Inter, system-ui, sans-serif; background: var(--bg);
       color: var(--text); font-size: 14px; line-height: 1.6; }

/* ── Layout ── */
.crm-shell { display: flex; min-height: 100vh; }
.crm-sidebar { width: 220px; background: var(--surface); padding: 0;
               border-right: 1px solid var(--border); flex-shrink: 0; }
.crm-main   { flex: 1; padding: 28px 32px; overflow-y: auto; }
.crm-page   { max-width: 1100px; }
.crm-page h1 { font-family: Poppins, sans-serif; font-weight: 600;
               font-size: 22px; margin-bottom: 20px; color: var(--text); }

/* ── Sidebar ── */
.sidebar-brand { padding: 20px 20px 16px;
                 font-family: Poppins, sans-serif; font-weight: 700;
                 font-size: 18px; color: var(--orange);
                 border-bottom: 1px solid var(--border); }
.sidebar-brand span { color: var(--text-muted); font-weight: 400; font-size: 12px;
                      display: block; margin-top: 2px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px;
                 padding: 11px 20px; color: var(--text-muted); text-decoration: none;
                 font-size: 13px; transition: all .15s; }
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--surface-2); color: var(--text);
  border-left: 3px solid var(--orange); padding-left: 17px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border);
                  margin-top: auto; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px;
       border-radius: var(--radius); border: none; cursor: pointer; font-size: 13px;
       font-weight: 500; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary   { background: var(--orange); color: #fff; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-teal      { background: var(--teal); color: #fff; }
.btn-full      { width: 100%; justify-content: center; }
.btn-sm        { padding: 4px 10px; font-size: 12px; }

/* ── Forms ── */
label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-muted);
        text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], select, textarea {
  width: 100%; padding: 8px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 14px; margin-bottom: 14px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange); }
textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ── Tables ── */
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th { background: var(--surface-2); padding: 10px 14px; text-align: left;
                font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
                color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.crm-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.crm-table tr:hover td { background: var(--surface); }
.crm-table a { color: var(--orange); text-decoration: none; }
.crm-table a:hover { text-decoration: underline; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-orange { background: rgba(255,107,53,.2); color: var(--orange); }
.badge-green  { background: rgba(40,167,69,.2);  color: var(--green); }
.badge-teal   { background: rgba(23,162,184,.2); color: var(--teal); }
.badge-red    { background: rgba(220,53,69,.2);  color: var(--red); }
.badge-grey   { background: var(--surface-2); color: var(--text-muted); }

/* ── Stats cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
             gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 20px; }
.stat-card .stat-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted);
                          letter-spacing: .06em; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; font-family: Poppins, sans-serif;
                          color: var(--orange); }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-success { background: rgba(40,167,69,.15); border: 1px solid var(--green); color: var(--green); }
.alert-error   { background: rgba(220,53,69,.15); border: 1px solid var(--red);   color: var(--red); }

/* ── Toolbar ── */
.crm-toolbar { display: flex; justify-content: space-between; align-items: center;
               margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.crm-toolbar input[type=text] { width: 240px; margin-bottom: 0; }

/* ── Login page ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
              padding: 40px; width: 360px; box-shadow: var(--shadow); }
.login-logo { font-family: Poppins, sans-serif; font-size: 24px; font-weight: 700;
              margin-bottom: 28px; text-align: center; }
.brand-orange { color: var(--orange); }

/* ── Pipeline board ── */
.pipeline-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.pipeline-col { background: var(--surface); border: 1px solid var(--border);
                border-radius: var(--radius); width: 240px; flex-shrink: 0; }
.pipeline-col-header { padding: 12px 14px; border-bottom: 1px solid var(--border);
                       font-weight: 600; font-size: 12px; text-transform: uppercase;
                       letter-spacing: .06em; color: var(--text-muted); }
.pipeline-col-header .col-count { float: right; background: var(--surface-2);
                                   border-radius: 10px; padding: 0 7px; font-size: 11px; }
.deal-card { margin: 10px; padding: 12px; background: var(--surface-2);
             border: 1px solid var(--border); border-radius: 6px; }
.deal-card .deal-title { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.deal-card .deal-meta  { font-size: 11px; color: var(--text-muted); }
.deal-card a { color: var(--text); text-decoration: none; }
.deal-card a:hover .deal-title { color: var(--orange); }

/* ── Activity timeline ── */
.timeline { list-style: none; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0;
               border-bottom: 1px solid var(--border); }
.timeline-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2);
                  display: flex; align-items: center; justify-content: center;
                  font-size: 14px; flex-shrink: 0; }
.timeline-body .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
