/* ZRM — mid-2010s enterprise CRM chrome on top of Bootstrap 3. */
body { background: #ecf0f1; color: #2c3e50; }
.brand-z {
  display: inline-block; background: linear-gradient(180deg,#ff8d28,#ff6a00);
  color: #1a1714; font-weight: 800; border-radius: 4px; padding: 0 6px; line-height: 1.3;
  font-family: Georgia, serif; text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* QA ribbon */
.qa-ribbon {
  position: fixed; top: 14px; right: -54px; z-index: 1040;
  transform: rotate(45deg); background: #f1c40f; color: #6b4e00;
  font: 700 11px/1 Arial, sans-serif; letter-spacing: .5px;
  padding: 6px 60px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #2c3e50; }
.login-card { width: 420px; max-width: 92vw; box-shadow: 0 10px 40px rgba(0,0,0,.4); border: 0; }
.login-head { text-align: center; padding: 28px 0 14px; }
.login-head .brand-z { font-size: 30px; }
.login-head .brand-name { font-size: 30px; font-weight: 800; color: #2c3e50; margin-left: 6px; }
.login-head .brand-sub { color: #7f8c8d; margin-top: 6px; }
.login-hint { margin-top: 14px; font-size: 12px; color: #7f8c8d; }
.login-hint code { font-size: 11px; }
.login-foot { text-align: center; font-size: 11px; color: #95a5a6; padding: 12px; border-top: 1px solid #ecf0f1; }
#sso { margin-top: 8px; }

/* ===== Shell ===== */
.zrm-nav { background: #2c3e50; border: 0; border-radius: 0; }
.zrm-nav .navbar-brand { color: #fff; font-weight: 700; }
.zrm-nav .navbar-brand .brand-z { font-size: 18px; }
.zrm-nav .navbar-nav > li > a { color: #cfd8dc; }
.zrm-nav .navbar-nav > li > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.zrm-search { margin-top: 8px; }
.zrm-search .form-control { width: 320px; max-width: 38vw; }
.zrm-search #search-go { cursor: pointer; }
.badge-notif { background: #e74c3c; }
.notif-menu { width: 300px; }
.notif-menu > li > a { white-space: normal; padding: 8px 16px; }

.avatar {
  display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center;
  border-radius: 50%; background: #1abc9c; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle;
}
.avatar-me { background: #ff8534; color: #1a1714; }
.avatar-lg { width: 48px; height: 48px; line-height: 48px; font-size: 18px; float: left; margin-right: 12px; }

.zrm-body { display: flex; padding-top: 50px; min-height: 100vh; }
.zrm-sidebar { width: 210px; flex: 0 0 210px; background: #34495e; min-height: calc(100vh - 50px); padding: 14px 0; }
.nav-sidebar > li > a { color: #b8c4ce; padding: 10px 18px; border-left: 3px solid transparent; }
.nav-sidebar > li > a:hover { color: #fff; background: rgba(0,0,0,.12); }
.nav-sidebar > li.active > a { color: #fff; background: rgba(0,0,0,.2); border-left-color: #ff8534; }
.sidebar-kpi { margin-top: 24px; padding: 0 18px; }
.sidebar-kpi .kpi { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.kpi-label { display: block; color: #8a9bab; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.kpi-val { display: block; color: #fff; font-size: 18px; font-weight: 700; }

.zrm-main { flex: 1 1 auto; padding: 20px 24px; min-width: 0; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 22px; }
.page-head h2 small { font-size: 13px; color: #95a5a6; }
.back-link { display: inline-block; margin-bottom: 12px; color: #7f8c8d; }

/* ===== Filter bar ===== */
.filterbar .panel-body { padding: 10px 12px; }
.filterbar .form-group { margin: 4px 12px 4px 0; }
.filterbar label { font-size: 11px; text-transform: uppercase; color: #95a5a6; margin-right: 4px; }

/* ===== Backgrid ===== */
.backgrid { background: #fff; }
table.backgrid { margin-bottom: 0; }
.backgrid th a { color: #2c3e50; }
.backgrid td, .backgrid th { vertical-align: middle !important; }
.zrm-compact .backgrid td, .zrm-compact .backgrid th { padding: 4px 8px; font-size: 12px; }
.backgrid-paginator { margin-top: 10px; }
.backgrid-filter { margin-bottom: 0; }
.lead-link { cursor: pointer; font-weight: 600; color: #2980b9; }
.lead-link:hover { text-decoration: underline; }
.cell-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.synergy-on tr[data-synergy="hi"] { background: #fff8ec !important; }

/* stage + temperature */
.label.stage-label { color: #fff; }
.stage-Prospecting { background: #95a5a6; } .stage-Qualification { background: #3498db; }
.stage-Discovery { background: #1abc9c; } .stage-Proposal { background: #9b59b6; }
.stage-Negotiation { background: #e67e22; } .stage-SynergyReview { background: #ff8534; }
.stage-ClosedWon { background: #27ae60; } .stage-ClosedLost { background: #e74c3c; }
.temp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.temp-hot { background: #e74c3c; } .temp-warm { background: #f39c12; } .temp-cold { background: #95a5a6; }
.btn-mini-touch { padding: 1px 7px; font-size: 11px; }

/* ===== Lead detail ===== */
.deal-grid .field, .company-meta .field { margin-bottom: 14px; }
.field label { font-size: 11px; text-transform: uppercase; color: #95a5a6; margin: 0; display: block; }
.field > div { font-size: 14px; }
.value-edit { display: flex; gap: 8px; align-items: center; }
.value-edit .input-group { max-width: 160px; }
.synergy { font-weight: 700; font-size: 16px; color: #16a085; }
.progress { margin: 4px 0 0; }
.comments { list-style: none; padding: 0; }
.comments li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ecf0f1; }
.cm-body { font-size: 13px; }
.cm-body .reltime { color: #95a5a6; font-size: 11px; margin-left: 6px; }
.comment-form { margin-top: 12px; }
.comment-form .btn { margin-top: 8px; }
.artifacts .artifact-icon { color: #7f8c8d; margin-right: 4px; }
.art-meta { font-size: 11px; color: #95a5a6; margin-top: 2px; margin-left: 22px; }
.activity .fa { margin-right: 6px; }

.team-card .panel-body { overflow: hidden; }
.team-info { overflow: hidden; }

/* ===== Error screen ===== */
.error-screen { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-card { width: 560px; max-width: 92vw; }
.error-code { font-size: 16px; color: #c0392b; }
.error-detail { color: #7f8c8d; font-size: 13px; }

/* ===== Toasts ===== */
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 1080; }
.toast {
  background: #2c3e50; color: #fff; padding: 10px 16px; border-radius: 4px; margin-top: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); font-size: 13px; min-width: 220px;
  animation: toast-in .2s ease;
}
.toast .fa { color: #2ecc71; margin-right: 6px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ===== Report / print ===== */
.report-sheet { background: #fff; padding: 24px; border: 1px solid #ddd; }
.report-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #2c3e50; padding-bottom: 8px; margin-bottom: 14px; }
.report-table { font-size: 12px; }
.report-table tfoot th { background: #ecf0f1; }

@media print {
  .qa-ribbon, .zrm-nav, .zrm-sidebar, .no-print, #toasts { display: none !important; }
  body { background: #fff; }
  .zrm-body { padding-top: 0; }
  .zrm-main { padding: 0; }
  .report-sheet { border: 0; padding: 0; }
  a[href]:after { content: ""; }
}

@page { size: letter; margin: 14mm; }
