/* ============================================================
   Parallel Dialler – Global Styles (Lite / Bright theme)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

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

:root {
  --bg:          #f4f5fb;
  --surface:     #ffffff;
  --surface2:    #f1f2f9;
  --border:      #e6e8f1;
  --text:        #2b2c40;
  --text-muted:  #8a8fa8;
  --accent:      #6d5dfc;
  --accent-dark: #5a49e8;
  --accent-soft: #eeebff;
  --green:       #22c55e;
  --green-soft:  #e6f9ee;
  --red:         #ef4444;
  --red-soft:    #fdeaea;
  --orange:      #f97316;
  --orange-soft: #fdf0e6;
  --yellow:      #eab308;
  --blue:        #3b82f6;
  --blue-soft:   #e8f0fe;
  --radius:      9px;
  --radius-lg:   14px;
  --shadow:      0 1px 3px rgba(45,46,64,.06), 0 1px 2px rgba(45,46,64,.04);
  --shadow-lg:   0 8px 30px rgba(45,46,64,.10);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Header ---- */
.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.app-header .logo { font-weight: 800; font-size: 17px; color: var(--accent); letter-spacing: -0.3px; }
.app-header nav a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: color .15s, background .15s;
}
.app-header nav a:hover,
.app-header nav a.active { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.app-header .spacer { flex: 1; }

.page-wrap { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  border: none; cursor: pointer; font-size: 13px; font-weight: 700;
  font-family: inherit; transition: filter .15s, background .15s, box-shadow .15s; line-height: 1;
}
.btn:hover { filter: brightness(.97); }
.btn:active { filter: brightness(.93); }
.btn-primary  { background: var(--accent);  color: #fff; box-shadow: 0 2px 6px rgba(109,93,252,.3); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-danger   { background: var(--red);     color: #fff; }
.btn-success  { background: var(--green);   color: #fff; }
.btn-warning  { background: var(--orange);  color: #fff; }
.btn-ghost    { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #e9ebf5; }
.btn-sm       { padding: 5px 11px; font-size: 12px; }
.btn-lg       { padding: 11px 24px; font-size: 15px; }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.form-control {
  width: 100%; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 9px 12px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,93,252,.12); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8fa8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; }
tr:hover td { background: var(--surface2); }

/* ---- Badges / Status ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-pending        { background: var(--surface2);  color: var(--text-muted); }
.badge-calling        { background: var(--blue-soft);  color: var(--blue); }
.badge-called         { background: var(--green-soft); color: #16a34a; }
.badge-retry          { background: #fdf6e3;           color: #b88407; }
.badge-callback       { background: var(--blue-soft);  color: var(--blue); }
.badge-booked         { background: var(--green-soft); color: #16a34a; }
.badge-not_interested { background: var(--red-soft);   color: var(--red); }
.badge-no_answer      { background: var(--orange-soft);color: var(--orange); }
.badge-left_voicemail { background: #f1ecfe;           color: #7c5cff; }
.badge-other          { background: var(--surface2);   color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-success { background: var(--green-soft); border: 1px solid #bbf7d0; color: #15803d; }
.alert-error   { background: var(--red-soft);   border: 1px solid #fecaca; color: #b91c1c; }
.alert-info    { background: var(--blue-soft);  border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ---- Stat blocks ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-box .value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-box .label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }

/* ---- Modal ---- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(43,44,64,.45); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; width: 90%; max-width: 560px; position: relative; box-shadow: var(--shadow-lg); }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }

/* ---- Upload / drag-drop zone ---- */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 40px 24px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone input[type=file] { display: none; }
.upload-zone .icon { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.upload-zone p { color: var(--text-muted); font-size: 13px; }
.upload-zone .upload-label { color: var(--accent); font-weight: 700; cursor: pointer; }

/* ---- Mapping table ---- */
.mapping-table { width: 100%; border-collapse: collapse; }
.mapping-table th { font-size: 11px; text-transform: uppercase; color: var(--text-muted); padding: 6px 8px; }
.mapping-table td { padding: 6px 8px; }
.mapping-table tr:nth-child(even) td { background: var(--surface2); }

/* ---- Progress bar ---- */
.progress { background: var(--surface2); border-radius: 20px; height: 6px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 20px; transition: width .3s; }

/* ---- Scrollbars ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d9e6; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c2c6d8; }

/* ---- Utility ---- */
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.text-muted { color: var(--text-muted); } .text-sm { font-size: 12px; } .text-right { text-align: right; }
.w-full { width: 100%; } .hidden { display: none !important; }
