:root {
  --cc-bg: #f4f7fb;
  --cc-surface: rgba(255, 255, 255, 0.88);
  --cc-surface-strong: #ffffff;
  --cc-border: rgba(15, 23, 42, 0.08);
  --cc-text: #122033;
  --cc-muted: #5a6a85;
  --cc-primary: #0f766e;
  --cc-primary-soft: rgba(15, 118, 110, 0.12);
  --cc-accent: #f59e0b;
  --cc-accent-soft: rgba(245, 158, 11, 0.14);
  --cc-danger: #dc2626;
  --cc-success: #15803d;
  --cc-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: var(--cc-text);
}

a {
  color: inherit;
}

.cc-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.cc-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 22px;
  background: rgba(8, 15, 30, 0.92);
  color: #f8fbff;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
/* WebKit / Chromium scrollbar — matches the dark sidebar */
.cc-sidebar::-webkit-scrollbar { width: 8px; }
.cc-sidebar::-webkit-scrollbar-track { background: transparent; }
.cc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  transition: background 0.15s;
}
.cc-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); }

.cc-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.cc-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.28);
}

.cc-brand-copy strong,
.cc-logo-copy strong {
  display: block;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cc-brand-copy span,
.cc-logo-copy span,
.cc-sidebar-note,
.cc-user-meta,
.cc-panel-subtitle,
.cc-helper-copy,
.cc-muted,
.cc-table td small {
  color: rgba(232, 240, 255, 0.7);
}

.cc-sidebar-note {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.cc-nav-group {
  margin-bottom: 22px;
}

.cc-nav-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 240, 255, 0.48);
}

.cc-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  color: rgba(248, 251, 255, 0.78);
  text-decoration: none;
  transition: all 0.2s ease;
}

.cc-nav-link:hover,
.cc-nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.cc-nav-link i {
  width: 18px;
  text-align: center;
}

.cc-sidebar-footer {
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.cc-main {
  padding: 28px 32px 36px;
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.cc-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cc-logo-chip {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.22);
}

.cc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cc-connection-badge,
.cc-status-badge,
.cc-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--cc-surface-strong);
  border: 1px solid var(--cc-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.cc-connection-badge.is-live,
.cc-inline-badge.is-success {
  color: var(--cc-success);
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.16);
}

.cc-connection-badge.is-demo,
.cc-inline-badge.is-warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.18);
}

.cc-user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--cc-surface-strong);
  border: 1px solid var(--cc-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.cc-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #122033, #1d3557);
}

.cc-logout {
  color: var(--cc-danger);
  text-decoration: none;
  font-weight: 700;
}

.cc-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  margin-bottom: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(14, 165, 233, 0.94));
  color: #f9fffe;
  box-shadow: var(--cc-shadow);
}

.cc-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cc-hero h1,
.cc-panel-title,
.cc-section-title {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

.cc-hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.65rem);
}

.cc-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(249, 255, 254, 0.86);
}

.cc-grid,
.cc-two-col,
.cc-three-col,
.cc-stats-grid,
.cc-action-grid,
.cc-form-grid {
  display: grid;
  gap: 18px;
}

.cc-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cc-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cc-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 24px;
}

.cc-card,
.cc-stat-card,
.cc-panel,
.cc-form-shell {
  border: 1px solid var(--cc-border);
  background: var(--cc-surface);
  backdrop-filter: blur(14px);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.cc-stat-card {
  padding: 20px;
}

.cc-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cc-stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
}

.cc-icon-primary {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.cc-icon-accent {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.cc-icon-dark {
  background: linear-gradient(135deg, #1d3557, #457b9d);
}

.cc-icon-danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.cc-stat-value {
  display: block;
  margin-top: 18px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.cc-stat-label {
  color: var(--cc-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.cc-panel {
  padding: 22px;
}

.cc-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.cc-panel-title {
  font-size: 1.25rem;
}

.cc-panel-subtitle {
  margin: 6px 0 0;
  color: var(--cc-muted);
  line-height: 1.6;
}

.cc-list {
  margin: 0;
  padding-left: 18px;
  color: var(--cc-muted);
  line-height: 1.8;
}

.cc-list strong {
  color: var(--cc-text);
}

.cc-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cc-action-tile {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--cc-border);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cc-action-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.09);
}

.cc-action-tile i {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  color: var(--cc-primary);
  background: var(--cc-primary-soft);
}

.cc-form-shell {
  padding: 22px;
}

.cc-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cc-text);
}

.cc-field input,
.cc-field select,
.cc-field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--cc-text);
  font: inherit;
}

.cc-field textarea {
  min-height: 120px;
  resize: vertical;
}

.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.cc-form-actions,
.cc-inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cc-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.cc-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.2);
}

.cc-btn-dark {
  color: #fff;
  background: linear-gradient(135deg, #122033, #1d3557);
  box-shadow: 0 14px 26px rgba(29, 53, 87, 0.2);
}

.cc-btn-accent {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.22);
}

.cc-btn-light {
  color: var(--cc-text);
  background: #ffffff;
  border: 1px solid var(--cc-border);
}

.cc-btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.cc-table-wrap {
  overflow-x: auto;
}

.cc-table {
  width: 100%;
  border-collapse: collapse;
}

.cc-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-muted);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cc-table tbody td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cc-table tbody tr:last-child td {
  border-bottom: 0;
}

.cc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.cc-status-pill.is-success {
  color: var(--cc-success);
  background: rgba(21, 128, 61, 0.1);
}

.cc-status-pill.is-warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.cc-status-pill.is-danger {
  color: var(--cc-danger);
  background: rgba(220, 38, 38, 0.12);
}

.cc-status-pill.is-neutral {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.cc-note,
.cc-alert {
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.7;
}

.cc-note {
  background: rgba(15, 118, 110, 0.08);
  color: #0f4c47;
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.cc-alert {
  margin-bottom: 18px;
  background: rgba(245, 158, 11, 0.12);
  color: #8a4b07;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.cc-log-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cc-log-item:last-child {
  border-bottom: 0;
}

.cc-log-item strong {
  display: block;
  margin-bottom: 4px;
}

.cc-call-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.cc-lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cc-lead-card {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.cc-lead-card span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-muted);
}

.cc-lead-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.cc-hidden-agent-frame {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.cc-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cc-login-card {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--cc-shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cc-login-brand {
  padding: 42px;
  color: #f7fffd;
  background: linear-gradient(135deg, #0f766e, #0369a1);
}

.cc-login-brand h1 {
  margin: 18px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.cc-login-brand p {
  max-width: 420px;
  line-height: 1.85;
  color: rgba(247, 255, 253, 0.86);
}

.cc-login-highlights {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.cc-login-highlight {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.cc-login-highlight strong {
  display: block;
  margin-bottom: 6px;
}

.cc-login-form-wrap {
  padding: 42px;
}

.cc-login-form-wrap h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.cc-login-form-wrap p {
  margin: 0 0 24px;
  color: var(--cc-muted);
  line-height: 1.7;
}

.cc-login-footer {
  margin-top: 22px;
  color: var(--cc-muted);
  font-size: 0.92rem;
}

.cc-empty {
  padding: 26px;
  text-align: center;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 22px;
  color: var(--cc-muted);
  background: rgba(255, 255, 255, 0.55);
}

.cc-waiting-call-popup {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 9999;
  width: min(520px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.cc-waiting-call-popup.is-hidden {
  display: none;
}

.cc-waiting-call-head,
.cc-waiting-call-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-waiting-call-head {
  margin-bottom: 12px;
}

.cc-waiting-call-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--cc-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cc-waiting-call-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cc-waiting-call-count {
  display: inline-grid;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--cc-danger);
  font-weight: 800;
}

.cc-waiting-call-clear,
.cc-waiting-call-dismiss {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.cc-waiting-call-clear {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--cc-text);
}

.cc-waiting-call-list {
  display: grid;
  gap: 12px;
  max-height: 58vh;
  overflow-y: auto;
}

.cc-waiting-call-item {
  padding: 14px 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.cc-waiting-call-item strong {
  font-size: 1rem;
}

.cc-waiting-call-dismiss {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--cc-danger);
}

.cc-waiting-call-meta,
.cc-waiting-call-empty {
  color: var(--cc-muted);
  line-height: 1.6;
}

.cc-waiting-call-meta {
  margin-top: 4px;
}

.cc-waiting-call-empty {
  padding: 10px 0 4px;
}

@media (max-width: 1100px) {
  .cc-shell {
    grid-template-columns: 1fr;
  }

  .cc-sidebar {
    position: static;
    min-height: auto;
  }

  .cc-call-layout,
  .cc-two-col,
  .cc-three-col,
  .cc-form-grid,
  .cc-login-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cc-main,
  .cc-login-brand,
  .cc-login-form-wrap {
    padding: 22px 18px;
  }

  .cc-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cc-hero,
  .cc-panel,
  .cc-form-shell,
  .cc-stat-card {
    padding: 18px;
  }

  .cc-lead-grid {
    grid-template-columns: 1fr;
  }

  .cc-waiting-call-popup {
    top: 12px;
    width: calc(100vw - 20px);
    padding: 16px;
  }

  .cc-waiting-call-head,
  .cc-waiting-call-item-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cc-waiting-call-tools {
    width: 100%;
    justify-content: space-between;
  }
}
