/* ── HEADER ── */
.clients-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
}

.clients-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.clients-header p {
  font-size: 0.9rem;
  color: #888888;
}

.add-client-btn {
  background: #1D9E75;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.add-client-btn:hover {
  background: #0F6E56;
}

/* ── WRAP ── */
.clients-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

/* ── STATS ── */
.clients-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.client-stat {
  background: #111111;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  text-align: center;
}

.client-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.client-stat-value.green { color: #1D9E75; }
.client-stat-value.yellow { color: #F0A500; }

.client-stat-label {
  font-size: 0.8rem;
  color: #888888;
}

/* ── TOOLBAR ── */
.clients-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.clients-toolbar input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #111111;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border 0.2s;
}

.clients-toolbar input:focus {
  border-color: #1D9E75;
}

.clients-toolbar select {
  padding: 0.75rem 1rem;
  background: #111111;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

/* ── EMPTY STATE ── */
.clients-empty {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  background: #111111;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
}

.clients-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.clients-empty h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.clients-empty p {
  font-size: 0.9rem;
  color: #888888;
  margin-bottom: 1.5rem;
}

.empty-add-btn {
  background: #1D9E75;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.empty-add-btn:hover {
  background: #0F6E56;
}

/* ── CLIENTS GRID ── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* ── CLIENT CARD ── */
.client-card {
  background: #111111;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.client-card:hover {
  border-color: #1D9E75;
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1D9E75;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-company {
  font-size: 0.8rem;
  color: #888888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  flex-shrink: 0;
}

.client-status-badge.active {
  background: #0d1f1a;
  color: #1D9E75;
  border: 1px solid #1D9E75;
}

.client-status-badge.inactive {
  background: #1a1a1a;
  color: #666666;
  border: 1px solid #2a2a2a;
}

/* ── CARD DETAILS ── */
.client-card-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #1a1a1a;
  border-radius: 8px;
}

.client-detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.7rem;
  color: #555555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.detail-value {
  font-size: 0.8rem;
  color: #cccccc;
  font-weight: 500;
}

.detail-value.green {
  color: #1D9E75;
}

/* ── CARD ACTIONS ── */
.client-card-actions {
  display: flex;
  gap: 0.5rem;
}

.client-card-actions button {
  flex: 1;
  padding: 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #888888;
}

.client-card-actions button:hover {
  border-color: #1D9E75;
  color: #1D9E75;
}

.client-card-actions button.delete:hover {
  border-color: #E24B4A;
  color: #E24B4A;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
}

.modal-overlay.visible {
  display: block;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 101;
}

.modal.visible {
  display: block;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #1f1f1f;
  position: sticky;
  top: 0;
  background: #111111;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.modal-close {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .field {
  margin-bottom: 1rem;
}

.modal-body .field label {
  display: block;
  font-size: 0.85rem;
  color: #888888;
  margin-bottom: 0.4rem;
}

.modal-body .field input,
.modal-body .field select,
.modal-body .field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border 0.2s;
  font-family: 'Segoe UI', sans-serif;
  box-sizing: border-box;
}

.modal-body .field input:focus,
.modal-body .field select:focus,
.modal-body .field textarea:focus {
  border-color: #1D9E75;
}

.modal-body .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #1f1f1f;
  position: sticky;
  bottom: 0;
  background: #111111;
}

.modal-cancel {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #888888;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-cancel:hover {
  border-color: #888888;
  color: #ffffff;
}

.modal-save {
  flex: 1;
  padding: 0.75rem;
  background: #1D9E75;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-save:hover {
  background: #0F6E56;
}

/* ── VIEW MODAL ── */
.view-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.view-detail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.view-detail.full {
  grid-column: 1 / -1;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .clients-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1rem 0;
  }

  .clients-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .clients-grid {
    grid-template-columns: 1fr;
  }

  .clients-wrap {
    padding: 1.5rem 1rem 4rem;
  }

  .clients-toolbar {
    flex-direction: column;
  }

  .view-detail-grid {
    grid-template-columns: 1fr;
  }
}
/* ── CLIENTS PAGE HERO ── */
.clients-page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
  gap: 2rem;
}

.clients-hero-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  max-width: 600px;
}

.clients-hero-text p {
  font-size: 0.9rem;
  color: #888888;
  line-height: 1.7;
  max-width: 550px;
}

@media (max-width: 768px) {
  .clients-page-hero {
    flex-direction: column;
    padding: 1.5rem 1rem 0;
  }

  .clients-hero-text h1 {
    font-size: 1.4rem;
  }
}