/* TakedownDesk — style.css — PhishPin dark theme */

:root {
  --bg:         #050810;
  --bg2:        #0d1117;
  --bg3:        #161b22;
  --border:     #30363d;
  --border2:    #21262d;
  --text:       #e6edf3;
  --text2:      #8b949e;
  --text3:      #484f58;
  --accent:     #1f6feb;
  --accent-h:   #388bfd;
  --red:        #e63946;
  --green:      #3fb950;
  --yellow:     #d29922;
  --orange:     #f0883e;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 1px 3px rgba(0,0,0,0.4);
}

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

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-h); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #79c0ff;
}

/* ── Navbar ── */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.logo-text em {
  font-style: normal;
  color: var(--red);
}
.logo-sep { color: var(--border); }
.logo-product {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-link:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--bg3); color: var(--text); }
.nav-link-ext { margin-left: auto; font-size: 13px; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-name { font-size: 13px; color: var(--text2); }

/* ── Layout ── */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header h1 { font-size: 22px; font-weight: 600; }
.page-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }

.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; }

/* ── Cards ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 1px solid var(--border2);
  background: var(--bg3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-body { padding: 18px; }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}
.stat-val { font-size: 32px; font-weight: 600; color: var(--text); line-height: 1; }
.stat-lbl { font-size: 12px; color: var(--text2); margin-top: 4px; }
.stat-open    .stat-val { color: var(--yellow); }
.stat-submitted .stat-val { color: var(--accent-h); }
.stat-resolved .stat-val { color: var(--green); }
.stat-overdue .stat-val { color: var(--red); }
.stat-overdue { border-color: rgba(230, 57, 70, 0.4); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead { background: var(--bg3); }
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg3); }
.row-overdue { background: rgba(230, 57, 70, 0.05) !important; }
.domain-cell { max-width: 260px; word-break: break-all; }
.actions-cell { white-space: nowrap; }
.overdue-date { color: var(--red); }
.overdue-tag {
  font-size: 10px;
  background: var(--red);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-high   { background: rgba(230, 57, 70, 0.2);  color: #f85149; }
.badge-medium { background: rgba(210, 153, 34, 0.2); color: #d29922; }
.badge-low    { background: rgba(63, 185, 80, 0.2);  color: #3fb950; }
.badge-status-open       { background: rgba(210, 153, 34, 0.2); color: #d29922; }
.badge-status-submitted  { background: rgba(31, 111, 235, 0.2); color: #388bfd; }
.badge-status-resolved   { background: rgba(63, 185, 80, 0.2);  color: #3fb950; }
.badge-status-escalated  { background: rgba(240, 136, 62, 0.2); color: #f0883e; }
.badge-status-closed     { background: rgba(72, 79, 88, 0.3);   color: #8b949e; }
.badge-status-active     { background: rgba(63, 185, 80, 0.2);  color: #3fb950; }
.badge-status-down       { background: rgba(72, 79, 88, 0.3);   color: #8b949e; }
.badge-status-unknown    { background: rgba(72, 79, 88, 0.2);   color: #8b949e; }
.badge-status-sent       { background: rgba(63, 185, 80, 0.2);  color: #3fb950; }
.badge-status-failed     { background: rgba(230, 57, 70, 0.2);  color: #f85149; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--bg3); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); text-decoration: none; color: var(--text); }
.btn-ghost { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.btn-full { width: 100%; justify-content: center; }

.btn-sm {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  margin-right: 4px;
  transition: all 0.15s;
}
.btn-sm:hover { background: var(--border); color: var(--text); text-decoration: none; }
.btn-sm-blue { background: rgba(31,111,235,0.15); color: #388bfd; border-color: rgba(31,111,235,0.3); }
.btn-sm-blue:hover { background: rgba(31,111,235,0.25); }
.btn-sm-green { background: rgba(63,185,80,0.15); color: #3fb950; border-color: rgba(63,185,80,0.3); }
.btn-sm-green:hover { background: rgba(63,185,80,0.25); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-grow { flex: 1; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }
.form-actions { display: flex; gap: 10px; padding-top: 8px; }

input[type=text], input[type=email], input[type=date], input[type=password],
select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--bg2); }
textarea { resize: vertical; }
.field-hint { font-size: 12px; color: var(--text3); }
.input-action-row { display: flex; gap: 8px; }
.input-action-row input { flex: 1; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3); color: #3fb950; }
.alert-danger  { background: rgba(230,57,70,0.1);  border: 1px solid rgba(230,57,70,0.3);  color: #f85149; }

/* ── Detail list ── */
.detail-list { display: grid; grid-template-columns: 160px 1fr; gap: 0; }
.detail-compact { grid-template-columns: 110px 1fr; }
.detail-list dt {
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border2);
}
.detail-list dd {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border2);
}
.detail-list dt:last-of-type,
.detail-list dd:last-of-type { border-bottom: none; }

/* ── Activity log ── */
.log-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.log-entry { border-left: 2px solid var(--border); padding-left: 12px; }
.log-action { font-size: 12px; font-weight: 600; color: var(--accent-h); text-transform: uppercase; }
.log-detail { font-size: 13px; color: var(--text); }
.log-time   { font-size: 11px; color: var(--text3); }

/* ── Misc ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.section-header h2 { font-size: 16px; font-weight: 600; }
.link-all { font-size: 13px; color: var(--accent-h); }
.count-badge {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-left: 8px;
  vertical-align: middle;
}
.muted { color: var(--text2); font-size: 13px; }
.empty-state {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: var(--text2);
}
.empty-state a { color: var(--accent-h); }

/* ── Filter bar ── */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-form input, .filter-form select { width: auto; flex: 1; min-width: 160px; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; }
.page-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  text-decoration: none;
}
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-link:hover { background: var(--bg3); text-decoration: none; }

/* ── Quick contacts ── */
.quick-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
}
.quick-contact:hover { background: var(--bg3); }
.qc-name { font-weight: 500; color: var(--text); }
.qc-email { font-size: 11px; color: var(--text2); }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 760px;
  z-index: 1;
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.modal-close { background: none; border: none; color: var(--text2); font-size: 20px; cursor: pointer; }
.modal-body { padding: 16px; }

/* ── Auth page ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.auth-wrap { width: 100%; max-width: 400px; padding: 20px; }
.auth-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.auth-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}
.logo-sub { font-size: 13px; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.auth-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text2); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { padding: 0 12px; gap: 12px; }
  .nav-links .nav-link { padding: 6px 8px; font-size: 13px; }
  .main-content { padding: 16px 12px 40px; }
  .page-header { flex-direction: column; }
  .header-actions { flex-wrap: wrap; }
}
/* ── Append these rules to the bottom of your existing assets/style.css ── */

/* Client portal nav company label */
.nav-user-info { display: flex; flex-direction: column; align-items: flex-end; }
.cp-company    { font-size: 11px; color: var(--text3); line-height: 1; }

/* Package badges */
.pkg-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.pkg-starter { background: rgba(139,148,158,0.2); color: #8b949e; }
.pkg-pro     { background: rgba(31,111,235,0.2);  color: #388bfd; }
.pkg-elite   { background: rgba(163,113,247,0.2); color: #a371f7;
               border: 1px solid rgba(163,113,247,0.3); }
