/* ============================================
   NREMS Wireframe Design System
   Navratna Real Estate Management System
   ============================================ */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --secondary: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #06B6D4;
  --dark: #1E293B;
  --light: #F8FAFC;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --sidebar-width: 260px;
  --header-height: 64px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F1F5F9;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--dark);
  color: var(--white);
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.sidebar-brand .brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  padding: 16px 0;
}

.nav-section {
  padding: 8px 24px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 8px;
}

.nav-item {
  display: block;
  padding: 10px 24px;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--white);
  border-left-color: var(--primary);
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  opacity: 0.7;
}

.nav-item.active i {
  opacity: 1;
  color: var(--primary);
}

/* ---- Header ---- */
.main-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 999;
  box-shadow: var(--shadow-sm);
}

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

.header-left .page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb-nav a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-nav .sep {
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.header-icon:hover {
  background: var(--light);
}

.header-icon .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  min-height: 100vh;
}

.content-wrapper {
  padding: 28px 32px;
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.stat-card .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.green { background: #D1FAE5; color: var(--success); }
.stat-card .stat-icon.yellow { background: #FEF3C7; color: var(--warning); }
.stat-card .stat-icon.red { background: #FEE2E2; color: var(--danger); }
.stat-card .stat-icon.cyan { background: #CFFAFE; color: var(--info); }
.stat-card .stat-icon.purple { background: #EDE9FE; color: #7C3AED; }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card .stat-change {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- Tables ---- */
.table-wrapper {
  overflow-x: auto;
}

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

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #F8FAFC;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Badges/Status ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #CFFAFE; color: #155E75; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-secondary { background: #F1F5F9; color: var(--text-secondary); }
.badge-purple { background: #EDE9FE; color: #5B21B6; }

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-success .dot { background: #10B981; }
.badge-warning .dot { background: #F59E0B; }
.badge-danger .dot { background: #EF4444; }
.badge-info .dot { background: #06B6D4; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--light);
  border-color: #CBD5E1;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--light);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.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='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.form-section {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
}

.form-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i {
  color: var(--primary);
}

/* ---- Filters ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.search-input {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-input input {
  padding-left: 38px;
}

.filter-select {
  min-width: 140px;
  max-width: 180px;
  flex: 0 0 auto;
}

.filter-date {
  max-width: 150px;
  flex: 0 0 auto;
}

/* ---- Pagination ---- */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination {
  display: flex;
  gap: 4px;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.pagination a:hover {
  background: var(--light);
  border-color: #CBD5E1;
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ---- Action Dropdown ---- */
.action-group {
  display: flex;
  gap: 4px;
}

/* ---- Detail View ---- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item .value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}

.tab-item {
  padding: 12px 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  cursor: pointer;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---- Stepper ---- */
.stepper {
  display: flex;
  align-items: center;
  padding: 24px;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--light);
  color: var(--text-muted);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.step.active .step-number {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.step.completed .step-number {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.step.active .step-label { color: var(--text-primary); }
.step.completed .step-label { color: var(--success); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
}

.step.completed + .step-line,
.step-line.done {
  background: var(--success);
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.timeline-item .time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-item .event {
  font-size: 13.5px;
  color: var(--text-primary);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state i {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 20px;
}

/* ---- Utilities ---- */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.fw-600 { font-weight: 600; }
.fw-500 { font-weight: 500; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.mb-3 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.justify-between { justify-content: space-between; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }

/* ---- Progress Bar ---- */
.progress-bar {
  height: 8px;
  background: var(--light);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  border-radius: 100px;
  background: var(--primary);
}

/* ---- File Upload ---- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.02);
}

.upload-zone i {
  font-size: 36px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.upload-zone h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.upload-zone p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Uploaded File Item ---- */
.uploaded-file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
  margin-top: 12px;
}

.uploaded-file .file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.uploaded-file .file-details {
  flex: 1;
}

.uploaded-file .file-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.uploaded-file .file-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.uploaded-file .file-actions {
  display: flex;
  gap: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-header { left: 0; }
  .main-content { margin-left: 0; }
  .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .stepper { flex-direction: column; align-items: flex-start; }
  .step-line { display: none; }
}

/* ---- Wireframe Label ---- */
.wireframe-label {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--dark);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 9999;
  opacity: 0.7;
}

/* ---- Info Box ---- */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
}

.info-box i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 2px;
}

.info-box p {
  font-size: 13px;
  color: var(--primary-dark);
}

/* ---- Modal / Popup ---- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 560px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h4 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h4 i { color: var(--primary); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--light);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ---- Conclusion Section ---- */
.conclusion-section {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-top: 8px;
}

.conclusion-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.conclusion-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--light);
  color: var(--text-secondary);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.conclusion-tab:first-child { border-radius: var(--radius-lg) 0 0 0; }
.conclusion-tab:last-child { border-radius: 0 var(--radius-lg) 0 0; }

.conclusion-tab.active-interested {
  background: #D1FAE5;
  color: #065F46;
  border-bottom: 2px solid #10B981;
}

.conclusion-tab.active-not-interested {
  background: #FEE2E2;
  color: #991B1B;
  border-bottom: 2px solid #EF4444;
}

.conclusion-body { padding: 20px; }

.conclusion-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.conclusion-option:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.03);
}

.conclusion-option.checked {
  border-color: var(--primary);
  background: var(--primary-light);
}

.conclusion-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.conclusion-option-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.conclusion-sub-options {
  padding: 12px 16px;
  margin: -4px 0 10px 28px;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* ---- Follow-up History ---- */
.followup-history {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.followup-history-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.followup-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.followup-entry:last-child { border-bottom: none; }

.followup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 5px;
  flex-shrink: 0;
}

.followup-entry .fe-date {
  font-size: 11px;
  color: var(--text-muted);
}

.followup-entry .fe-type {
  font-weight: 500;
  color: var(--text-primary);
}

/* ---- Multi-entry (add more) ---- */
.multi-entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.multi-entry-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
  position: relative;
}

.multi-entry-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #FEE2E2;
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.add-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.04);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.add-more-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

/* ---- Upload Zone Small (inline) ---- */
.upload-zone-sm {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.upload-zone-sm:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.02);
}
.upload-zone-sm i {
  font-size: 18px;
  color: var(--text-muted);
}
.upload-zone-sm span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- Version History ---- */
.version-list { list-style: none; }

.version-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.version-item:last-child { border-bottom: none; }

.version-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.version-info { flex: 1; }

.version-info .vi-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.version-info .vi-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.version-info .vi-changes {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---- Action buttons in tables ---- */
.action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-sm {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-icon-sm:hover {
  background: var(--light);
  border-color: var(--text-muted);
}

.btn-icon-sm.text-primary { color: var(--primary); border-color: var(--primary-light); }
.btn-icon-sm.text-primary:hover { background: var(--primary-light); }
.btn-icon-sm.text-danger { color: var(--danger); border-color: #FECACA; }
.btn-icon-sm.text-danger:hover { background: #FEF2F2; }

/* ---- Form row flexible ---- */
.form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
