/* ══════════════════════════════════════════════════════════════════════
   QualiCall — Global Design System
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────── */
:root {
  --blue-deep:    #10243E;
  --blue-vivid:   #2F6FED;
  --blue-light:   #4F8EFF;
  --green-mint:   #2ED3A8;
  --green-dark:   #1BA888;
  --white-ice:    #F5F8FC;
  --white:        #FFFFFF;
  --gray-text:    #5E6B7A;
  --gray-light:   #8A97A4;
  --gray-border:  #DDE4EE;
  --gray-bg:      #F0F4FA;
  --orange:       #FF6B35;
  --red:          #E53E3E;
  --red-light:    #FFF5F5;
  --yellow:       #F6C90E;
  --yellow-light: #FFFBEB;
  --success-light:#F0FDF8;

  --shadow-sm:    0 1px 3px rgba(16,36,62,.08);
  --shadow-md:    0 4px 16px rgba(16,36,62,.12);
  --shadow-lg:    0 12px 40px rgba(16,36,62,.16);

  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-full:  9999px;

  --transition:   0.2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--blue-deep);
  background: var(--white-ice);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--gray-text); }

/* ── Utilities ─────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1400px; }

.text-gradient {
  background: linear-gradient(135deg, var(--blue-vivid), var(--green-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.badge--ok       { background: var(--success-light); color: var(--green-dark); }
.badge--warning  { background: var(--yellow-light);  color: #B7860A; }
.badge--critical { background: var(--red-light);     color: var(--red); }
.badge--blue     { background: #EEF4FF;              color: var(--blue-vivid); }
.badge--gray     { background: var(--gray-bg);       color: var(--gray-text); }

/* ── Queue / Pipeline badges ─────────────────────────────────────── */
@keyframes queue-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}
.queue-badge--pulse { animation: queue-pulse 1.6s ease-in-out infinite; }

/* ── Score Colors ──────────────────────────────────────────────────── */
.score-high   { color: var(--green-dark); }
.score-mid    { color: #B7860A; }
.score-low    { color: var(--red); }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--blue-vivid);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(47,111,237,.35);
}
.btn--primary:hover {
  background: #2460d0;
  box-shadow: 0 6px 20px rgba(47,111,237,.45);
  transform: translateY(-1px);
}
.btn--secondary {
  background: var(--white);
  color: var(--blue-vivid);
  border: 1.5px solid var(--blue-vivid);
}
.btn--secondary:hover {
  background: #EEF4FF;
  transform: translateY(-1px);
}
.btn--mint {
  background: var(--green-mint);
  color: var(--blue-deep);
  box-shadow: 0 4px 14px rgba(46,211,168,.35);
}
.btn--mint:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-1px);
}
.btn--ghost {
  color: var(--gray-text);
  padding: 11px 16px;
}
.btn--ghost:hover { color: var(--blue-vivid); background: #EEF4FF; }
.btn--sm { padding: 7px 16px; font-size: 13px; }
.btn--lg { padding: 14px 32px; font-size: 16px; }

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
  overflow: hidden;
}
.card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card__title { font-size: 15px; font-weight: 700; color: var(--blue-deep); }
.card__body  { padding: 24px; }

/* ── Forms ─────────────────────────────────────────────────────────── */
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-label   { font-size: 13px; font-weight: 600; color: var(--blue-deep); }
.form-control {
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-border);
  font-size: 14px; color: var(--blue-deep);
  transition: border-color var(--transition);
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue-vivid);
  box-shadow: 0 0 0 3px rgba(47,111,237,.12);
}

/* ── Avatar ────────────────────────────────────────────────────────── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-vivid), var(--green-mint));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.avatar--lg { width: 52px; height: 52px; font-size: 16px; }

/* ── Score Ring ────────────────────────────────────────────────────── */
.score-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-size: 22px; font-weight: 800;
  position: relative;
}
.score-ring--high { background: conic-gradient(var(--green-mint) var(--pct), var(--gray-border) 0); }
.score-ring--mid  { background: conic-gradient(var(--yellow) var(--pct), var(--gray-border) 0); }
.score-ring--low  { background: conic-gradient(var(--red) var(--pct), var(--gray-border) 0); }
.score-ring::before {
  content: ''; position: absolute; inset: 8px;
  border-radius: 50%; background: var(--white);
}
.score-ring span { position: relative; z-index: 1; line-height: 1; }
.score-ring small { position: relative; z-index: 1; font-size: 10px; font-weight: 500; color: var(--gray-text); }

/* ── Progress Bar ──────────────────────────────────────────────────── */
.progress { height: 6px; background: var(--gray-bg); border-radius: var(--radius-full); overflow: hidden; }
.progress__fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--blue-vivid), var(--green-mint));
  transition: width .6s ease;
}

/* ── Table ─────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--gray-light); background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-border);
}
.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--white-ice); }

/* ── Alert ─────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: flex-start; gap: 12px;
}
.alert--error   { background: var(--red-light);    color: var(--red);         border: 1px solid rgba(229,62,62,.2); }
.alert--success { background: var(--success-light);color: var(--green-dark);  border: 1px solid rgba(46,211,168,.2); }
.alert--warning { background: var(--yellow-light); color: #92620A;            border: 1px solid rgba(246,201,14,.3); }
.alert--info    { background: #EEF4FF;              color: var(--blue-vivid); border: 1px solid rgba(47,111,237,.2); }
