:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --secondary: #00B894;
  --danger: #FF7675;
  --warning: #FDCB6E;

  --bg-main: #F8F9FC;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;

  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;

  --border-light: #E5E7EB;

  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

/* GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
}

/* LAYOUT */
.crm-container {
  display: flex;
  height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 15px;
  margin-top: 10px;
}

.sidebar-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  transition: 0.2s;
}

.sidebar-item:hover {
  background: #F1F3F9;
}

.sidebar-item.active {
  background: var(--primary);
  color: white;
}

/* MAIN */
.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
}

.search-bar {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  width: 250px;
}

/* STATS */
.stats-container {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  flex: 1;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-title {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 5px;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-input {
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  width: 200px;
}

.filter-select {
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* TABLE */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px;
}

.table td {
  padding: 12px 10px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
}

/* STATUS */
.status {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.status.active {
  background: #E6F9F2;
  color: #00B894;
}

.status.inactive {
  background: #FFEAEA;
  color: #FF7675;
}

.status.pending {
  background: #FFF4E5;
  color: #F39C12;
}

/* BUTTONS */
.btn {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #5a4bd1;
}

.btn-secondary {
  background: #EDF0FF;
  color: var(--primary);
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin-bottom: 15px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}

.save-btn {
  background: #6C5CE7;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
}

.cancel-btn {
  background: #eee;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .stats-container {
    flex-direction: column;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
/* INPUT GROUP */
.input-group {
display: flex;
gap: 8px;
align-items: center;
}

/* ICON BUTTONS - EXACT UI MATCH */
/* PERFECT ICON STYLE */
.icon-btn {
width: 36px;
height: 36px;
border-radius: 50%;
border: none;
cursor: pointer;

display: flex;
align-items: center;
justify-content: center;

background: #EEF2FF;
color: #6C5CE7;

font-size: 18px;
font-weight: 600;

transition: 0.2s;
}

.icon-btn:hover {
background: #E0E7FF;
transform: scale(1.1);
}

/* DELETE SAME STYLE */
.icon-delete {
background: #EEF2FF;
color: #6C5CE7;
}

/* MODAL WIDTH IMPROVE */
.modal-content {
width: 400px;
}

/* CLOSE BUTTON */
.close-btn {
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: #f1f3f9;
cursor: pointer;
}

/* SEARCH + FILTER */
.filter-bar {
display: flex;
gap: 15px;
align-items: center;
}

#searchFilter {
flex: 1;
padding: 10px;
border-radius: 20px;
border: 1px solid #ddd;
}

#statusFilter {
padding: 10px;
border-radius: 20px;
}

/* DELETE POPUP */
.delete-box {
text-align: center;
}

.delete-actions {
display: flex;
justify-content: center;
gap: 15px;
margin-top: 15px;
}

.btn-delete {
background: #ef4444;
color: white;
border-radius: 10px;
padding: 10px 18px;
border: none;
}
/* ===============================
 TABLE ICONS (ROUND - FINAL)
 =============================== */

.table td button {
width: 34px;
height: 34px;
border-radius: 50%;        /* ✅ ROUND */
border: none;
cursor: pointer;

display: inline-flex;
align-items: center;
justify-content: center;

background: #EEF2FF;       /* soft purple */
color: #6C5CE7;            /* icon color */

font-weight: bold;
margin-right: 6px;
transition: 0.2s;
}

/* Hover effect */
.table td button:hover {
transform: scale(1.1);
background: #E0E7FF;
}
/* ===============================
 FIX STATS ONLY (NO UI CHANGE)
 =============================== */

 .stats-container {
  display: flex;
  flex-wrap: wrap;        /* allow wrapping */
  gap: 16px;
}

.stat-card {
  flex: 0 0 140px;        /* fixed card width */
  height: 80px;           /* same height */

  display: flex;
  flex-direction: column;
  align-items: center;    /* center horizontally */
  justify-content: center;/* center vertically */

  text-align: center;
  padding: 10px;
}

/* KEEP TEXT IN ONE LINE */
.stat-title {
  font-size: 12px;
  white-space: nowrap;   /* prevents breaking */
}

/* NUMBER NORMAL (NOT BOLD) */
.stat-value {
  font-size: 16px;
  font-weight: 400;      /* remove bold */
  color: black;
  margin-top: 4px;
}

/* ===============================
 ADD FOLLOW UP MODAL - SCREENSHOT 2 LAYOUT
 =============================== */

.fu-modal-content {
background: white;
border-radius: 16px;
width: 420px;
max-width: 95vw;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
}

/* Header */
.fu-header {
display: flex;
align-items: center;
gap: 12px;
padding: 18px 20px 14px;
border-bottom: 1px solid var(--border-light);
position: sticky;
top: 0;
background: white;
z-index: 1;
border-radius: 16px 16px 0 0;
}

.fu-back-btn {
background: none;
border: none;
font-size: 18px;
cursor: pointer;
color: var(--text-secondary);
padding: 4px 6px;
border-radius: 6px;
line-height: 1;
}

.fu-back-btn:hover {
background: #f1f3f9;
}

.fu-title {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
}

/* Sections */
.fu-section {
padding: 14px 20px 0;
}

.fu-label {
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 8px;
}

/* Row layout (two columns) */
.fu-row {
display: flex;
gap: 12px;
}

/* Radio group */
.fu-radio-group {
display: flex;
flex-direction: column;
gap: 8px;
}

.fu-radio-label {
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
color: var(--text-primary);
cursor: pointer;
}

.fu-radio-label input[type="radio"] {
accent-color: var(--primary);
width: 16px;
height: 16px;
cursor: pointer;
}

/* Inputs */
.fu-input {
width: 100%;
padding: 10px 12px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
font-size: 14px;
color: var(--text-primary);
background: white;
outline: none;
transition: border-color 0.2s;
}

.fu-input:focus {
border-color: var(--primary-light);
}

.fu-input:disabled {
background: #F8F9FC;
color: var(--text-secondary);
}

.fu-select {
width: 100%;
padding: 10px 12px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
font-size: 14px;
color: var(--text-primary);
background: white;
outline: none;
cursor: pointer;
appearance: auto;
}

.fu-select.fu-muted {
color: var(--text-muted);
}

/* + ADD box */
.fu-add-box {
border: 1.5px dashed var(--border-light);
border-radius: var(--radius-sm);
padding: 10px 14px;
cursor: pointer;
transition: border-color 0.2s, background 0.2s;
background: #FAFBFF;
}

.fu-add-box:hover {
border-color: var(--primary-light);
background: #EEF2FF;
}

.fu-add-btn {
font-size: 13px;
font-weight: 600;
color: var(--primary);
display: flex;
align-items: center;
gap: 4px;
}

/* Textarea */
.fu-textarea {
width: 100%;
padding: 10px 12px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
font-size: 14px;
color: var(--text-primary);
resize: vertical;
min-height: 70px;
outline: none;
font-family: inherit;
}

.fu-textarea:focus {
border-color: var(--primary-light);
}

/* Date inputs */
.fu-date {
background: #FAFBFF;
}

/* Upload row */
.fu-upload-row {
display: flex;
align-items: center;
gap: 10px;
padding: 14px 20px 0;
}

.fu-upload-icon {
font-size: 18px;
color: var(--text-muted);
}

.fu-upload-label {
font-size: 13px;
color: var(--text-secondary);
cursor: pointer;
font-weight: 500;
}

.fu-upload-label:hover {
color: var(--primary);
}

/* Actions bar */
.fu-actions {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px 20px;
margin-top: 14px;
border-top: 1px solid var(--border-light);
gap: 10px;
position: sticky;
bottom: 0;
background: white;
border-radius: 0 0 16px 16px;
}

.fu-left-actions,
.fu-right-actions {
display: flex;
gap: 10px;
align-items: center;
}

/* + CONCERN button - pink/magenta like screenshot 2 */
.fu-concern-btn {
padding: 10px 16px;
border-radius: var(--radius-sm);
border: none;
cursor: pointer;
background: #e91e8c;
color: white;
font-size: 13px;
font-weight: 600;
transition: background 0.2s;
}

.fu-concern-btn:hover {
background: #c41878;
}

/* Save button in follow-up */
.fu-save-btn {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.03em;
}

/* ===============================
 FOLLOW UP LIST SCREEN
 =============================== */

.fu-list-content {
background: white;
border-radius: 16px;
width: 420px;
max-width: 95vw;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
position: relative;
padding-bottom: 70px;
}

.fu-list-label {
font-size: 13px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0 20px 10px;
}

.fu-list-body {
flex: 1;
padding: 0 16px;
overflow-y: auto;
}

.fu-empty {
text-align: center;
color: var(--text-muted);
font-size: 14px;
padding: 40px 0;
}

/* Follow-up card (matches screenshot 2) */
.fu-card {
background: #FAFBFF;
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 12px 14px;
margin-bottom: 10px;
}

.fu-card-top {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
}

.fu-card-icon {
font-size: 16px;
color: var(--text-muted);
}

.fu-status-badge {
background: #e91e8c;
color: white;
font-size: 11px;
font-weight: 700;
padding: 3px 10px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.03em;
}

.fu-card-name {
font-size: 13px;
color: var(--text-secondary);
margin-left: auto;
}

.fu-card-meta {
font-size: 12px;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 4px;
padding-left: 2px;
}

.fu-card-notes {
font-size: 12px;
color: var(--text-secondary);
margin-top: 6px;
padding-top: 6px;
border-top: 1px solid var(--border-light);
}

/* Floating + button */
.fu-fab {
position: absolute;
bottom: 16px;
right: 16px;
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--primary);
color: white;
font-size: 24px;
font-weight: 300;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(108,92,231,0.4);
transition: 0.2s;
line-height: 1;
}

.fu-fab:hover {
background: #5a4bd1;
transform: scale(1.08);
}

/* ===============================
 FOLLOW UP DETAIL VIEW
 =============================== */

.fu-detail-body {
padding: 0 20px;
flex: 1;
}

.fu-detail-row {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 12px 0;
border-bottom: 1px solid var(--border-light);
}

.fu-detail-row:last-child {
border-bottom: none;
}

.fu-detail-label {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
min-width: 120px;
padding-top: 2px;
}

.fu-detail-value {
font-size: 14px;
color: var(--text-primary);
flex: 1;
}