/* ============================================================
   ReadyCall AI — Portal Skin
   Shared by the client portal AND the operator portal.
   Loads on TOP of Bootstrap 5. One file = one brand for both.

   Tokens lifted verbatim from the live ReadyCall theme
   (readycall-ai-v112/style.css). Do not invent new colors here;
   if the brand site changes, update these vars and both portals
   move together.
   ============================================================ */

:root {
  /* --- ReadyCall brand tokens (source of truth) --- */
  --lan-ink:      #17212b;   /* primary text / near-black            */
  --lan-muted:    #5f6b77;   /* secondary text / grey                */
  --lan-soft:     #f6f8fb;   /* page + panel background              */
  --lan-line:     #e4e8ee;   /* borders / dividers                   */
  --lan-red:      #ee514b;   /* primary action (coral)               */
  --lan-red-dark: #cf3d37;   /* primary hover                        */
  --lan-teal:     #073f42;   /* deep green — headers / contrast band */
  --lan-white:    #ffffff;
  --lan-shadow:   0 14px 35px rgba(23, 33, 43, 0.08);
  --lan-radius:   18px;
  --lan-radius-pill: 999px;
  --lan-width:    1120px;

  /* --- Remap Bootstrap's own variables onto ReadyCall ---
     This is what makes stock Bootstrap components come out
     in-brand without per-component overrides. */
  --bs-primary:        var(--lan-red);
  --bs-primary-rgb:    238, 81, 75;
  --bs-body-color:     var(--lan-ink);
  --bs-body-bg:        var(--lan-soft);
  --bs-border-color:   var(--lan-line);
  --bs-border-radius:  var(--lan-radius);
  --bs-border-radius-sm: 12px;
  --bs-border-radius-lg: 24px;
  --bs-link-color:     var(--lan-red);
  --bs-link-hover-color: var(--lan-red-dark);
  --bs-font-sans-serif: Arial, Helvetica, sans-serif;
}

/* ---------- base ---------- */
body {
  background: var(--lan-soft);
  color: var(--lan-ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--lan-ink); font-weight: 800; }
a { color: var(--lan-red); }
a:hover { color: var(--lan-red-dark); }
.text-muted, .rc-muted { color: var(--lan-muted) !important; }

.rc-container {
  max-width: var(--lan-width);
  margin-inline: auto;
  padding-inline: 18px;
}

/* ---------- top header bar (white, brand-left, nav-right) ---------- */
.rc-header {
  background: var(--lan-white);
  border-bottom: 1px solid var(--lan-line);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.rc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.rc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--lan-ink);
  text-decoration: none;
}
.rc-brand .rc-brand-dot { color: var(--lan-red); }
.rc-brand small { display: block; font-size: 12px; color: var(--lan-muted); font-weight: 400; }

.rc-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rc-nav a {
  color: var(--lan-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 2px;
}
.rc-nav a:hover,
.rc-nav a.active { color: var(--lan-red); }

/* mobile: collapse nav into a stacked menu under a toggle */
.rc-nav-toggle {
  display: none;
  border: 1px solid var(--lan-line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  color: var(--lan-ink);
}
@media (max-width: 768px) {
  .rc-nav-toggle { display: inline-flex; }
  .rc-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--lan-line);
    box-shadow: var(--lan-shadow);
    padding: 8px 18px 16px;
  }
  .rc-nav.open { display: flex; }
  .rc-nav a { padding: 12px 4px; border-bottom: 1px solid var(--lan-soft); font-size: 16px; }
}

/* ---------- page band (red strip under header — page title) ---------- */
.rc-band {
  background: var(--lan-red);
  color: #fff;
  padding: 26px 0;
  margin-bottom: 28px;
}
.rc-band h1 { color: #fff; margin: 0; font-size: clamp(24px, 4vw, 38px); }
.rc-band .rc-band-sub { color: rgba(255,255,255,0.9); margin-top: 4px; font-size: 15px; }

/* ---------- tabbed sub-nav (Overview / Calls / Audio / ...) ---------- */
.rc-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--lan-line);
  margin-bottom: 24px;
}
.rc-tabs a {
  padding: 12px 16px;
  color: var(--lan-muted);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.rc-tabs a:hover { color: var(--lan-ink); }
.rc-tabs a.active { color: var(--lan-red); border-bottom-color: var(--lan-red); }
@media (max-width: 768px) {
  .rc-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .rc-tabs a { padding: 12px 14px; }
}

/* ---------- cards ---------- */
.rc-card,
.card {
  background: var(--lan-white);
  border: 1px solid var(--lan-line);
  border-radius: var(--lan-radius);
  box-shadow: var(--lan-shadow);
}
.rc-card { padding: 22px; margin-bottom: 20px; }
.rc-card h2, .rc-card h3 { margin-top: 0; }
.rc-card-label { color: var(--lan-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* metric / stat tile for the dashboard */
.rc-stat { padding: 20px; }
.rc-stat .rc-stat-num { font-size: 34px; font-weight: 800; line-height: 1; color: var(--lan-ink); }
.rc-stat .rc-stat-label { color: var(--lan-muted); font-size: 14px; margin-top: 6px; }
.rc-stat.rc-stat-alert .rc-stat-num { color: var(--lan-red); }

/* ---------- buttons (pill, ReadyCall) ---------- */
.btn { border-radius: var(--lan-radius-pill); font-weight: 700; }
.btn-primary,
.rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--lan-radius-pill);
  background: var(--lan-red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary:hover,
.rc-btn:hover { background: var(--lan-red-dark); color: #fff; }
.rc-btn.secondary,
.btn-outline-primary {
  background: #fff;
  color: var(--lan-ink);
  border-color: var(--lan-line);
}
.rc-btn.secondary:hover,
.btn-outline-primary:hover { border-color: var(--lan-red); color: var(--lan-red); background: #fff; }
.rc-btn.block { width: 100%; }

/* ---------- forms (login front door + settings) ---------- */
.form-control, .rc-input {
  border: 1px solid var(--lan-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px; /* 16px prevents iOS zoom-on-focus */
  width: 100%;
  color: var(--lan-ink);
  background: #fff;
}
.form-control:focus, .rc-input:focus {
  outline: none;
  border-color: var(--lan-red);
  box-shadow: 0 0 0 3px rgba(238, 81, 75, 0.15);
}
.rc-label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--lan-ink); }

/* ---------- tables (calls list) ---------- */
.rc-table, .table {
  width: 100%;
  background: #fff;
  border-radius: var(--lan-radius);
  overflow: hidden;
  border-collapse: collapse;
}
.rc-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--lan-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--lan-line);
}
.rc-table td { padding: 14px; border-bottom: 1px solid var(--lan-soft); }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table tr:hover td { background: var(--lan-soft); }

/* ---------- badges (urgency / disposition / status) ---------- */
.rc-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--lan-radius-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.rc-badge.high   { background: #fdecec; color: var(--lan-red-dark); }
.rc-badge.medium { background: #fff4e5; color: #b45e00; }
.rc-badge.low    { background: #eef6ee; color: #2f7a36; }
.rc-badge.neutral{ background: var(--lan-soft); color: var(--lan-muted); }
.rc-badge.teal   { background: #e6f0f0; color: var(--lan-teal); }

/* ---------- "coming soon" state (integrations / billing not yet live) ---------- */
.rc-soon {
  border: 1px dashed var(--lan-line);
  border-radius: var(--lan-radius);
  background: var(--lan-soft);
  padding: 28px 22px;
  text-align: center;
  color: var(--lan-muted);
}
.rc-soon .rc-soon-title { color: var(--lan-ink); font-weight: 800; font-size: 18px; margin-bottom: 6px; }

/* ---------- responsive content width ---------- */
.rc-main { padding-bottom: 48px; }
@media (max-width: 600px) {
  .rc-card { padding: 18px; }
  .rc-band { padding: 20px 0; margin-bottom: 20px; }
}
