
/* =====================================
   CLIENTSCOPE - COMPLETE STYLESHEET
===================================== */

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f6f8fb;
  color: #202b3c;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* =====================================
   MAIN APP LAYOUT
===================================== */

.app {
  display: flex;
  min-height: 100vh;
}

/* =====================================
   SIDEBAR
===================================== */

.sidebar {
  width: 250px;
  min-width: 250px;
  background: #ffffff;
  border-right: 1px solid #e9edf2;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 750;
  color: #1d2939;
  margin-bottom: 48px;
  padding-left: 5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #286b52;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-weight: bold;
}

.workspace-label {
  font-size: 10px;
  font-weight: 700;
  color: #9aa4b2;
  letter-spacing: 1.5px;
  margin: 0 0 14px 10px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
}

.nav-link:hover {
  background: #f2f6f4;
  color: #286b52;
}

.nav-link.active {
  background: #e9f3ee;
  color: #286b52;
}

.sidebar-bottom {
  margin-top: auto;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #edf0f3;
  margin-top: 24px;
  padding: 22px 5px 0;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6eee9;
  color: #286b52;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
}

.user-card strong {
  display: block;
  font-size: 12px;
}

.user-card small {
  display: block;
  color: #98a2b3;
  font-size: 11px;
  margin-top: 4px;
}

/* =====================================
   MAIN CONTENT
===================================== */

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 75px;
  background: #ffffff;
  border-bottom: 1px solid #e9edf2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
}

.breadcrumb {
  font-size: 12px;
  color: #98a2b3;
}

.breadcrumb strong {
  color: #344054;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-label {
  color: #7c8797;
  font-size: 12px;
}

/* =====================================
   BUTTONS
===================================== */

.primary-btn {
  border: none;
  background: #286b52;
  color: white;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s;
}

.primary-btn:hover {
  background: #1e553f;
  transform: translateY(-1px);
}

.secondary-btn {
  background: white;
  border: 1px solid #e1e6eb;
  color: #475467;
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 11px;
  font-weight: 600;
}

.secondary-btn:hover {
  background: #f6f8fa;
}

.full-btn {
  width: 100%;
  margin-top: 15px;
}

/* =====================================
   PAGE CONTENT
===================================== */

.content {
  padding: 38px;
  max-width: 1500px;
  margin: auto;
}

.welcome {
  margin-bottom: 30px;
}

.eyebrow {
  color: #286b52;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.welcome h1 {
  font-size: 27px;
  color: #1d2939;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 13px;
  color: #8993a3;
  line-height: 1.6;
}

/* =====================================
   STATISTICS
===================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 42px;
}

.stat-card {
  background: white;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  padding: 23px;
  box-shadow: 0 2px 8px rgba(20, 35, 50, 0.025);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  color: #788393;
  font-size: 11px;
  font-weight: 600;
}

.stat-top span:last-child {
  font-size: 18px;
  color: #286b52;
}

.stat-card h2 {
  font-size: 29px;
  color: #1d2939;
  margin: 18px 0 7px;
}

.stat-card small {
  color: #9aa4b2;
  font-size: 10px;
}

/* =====================================
   SECTION HEADING
===================================== */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 19px;
  gap: 15px;
}

.section-heading h2 {
  font-size: 17px;
  color: #263447;
  margin-bottom: 6px;
}

.section-heading p {
  color: #98a2b3;
  font-size: 11px;
}

/* =====================================
   TABLE
===================================== */

.project-table {
  background: white;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(20, 35, 50, 0.025);
}

.table-head {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr 1fr 1.2fr;
  gap: 15px;
  align-items: center;
  min-width: 650px;
  padding: 19px 20px;
  background: #fafbfc;
  border-bottom: 1px solid #edf0f3;
}

.table-head.four-columns {
  grid-template-columns: 1.5fr 1.5fr 1.5fr 1fr;
}

.table-head span {
  color: #98a2b3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

#projectRows {
  min-width: 650px;
}

.project-row {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr 1fr 1.2fr;
  gap: 15px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 11px;
  color: #667085;
}

.project-row:last-child {
  border-bottom: none;
}

.project-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-row strong {
  display: block;
  color: #344054;
  font-size: 12px;
  margin-bottom: 5px;
}

.project-row small {
  display: block;
  color: #98a2b3;
  font-size: 10px;
}

.client-row {
  grid-template-columns: 1.5fr 1.5fr 1.5fr 1fr;
}

.proposal-row {
  grid-template-columns: 2fr 1.3fr 1fr 1fr 1.2fr;
}

.status {
  display: inline-block;
  background: #e9f3ee;
  color: #286b52;
  padding: 7px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.proposal-status-pending {
  background: #fff4d6;
  color: #9a6a00;
}

.proposal-status-accepted {
  background: #e2f5e9;
  color: #237a45;
}

.proposal-status-rejected {
  background: #fde8e8;
  color: #c03939;
}

/* =====================================
   ACTION BUTTONS
===================================== */

.client-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.client-actions button {
  background: #f0f4ff;
  color: #315fca;
  border: 1px solid #e2e9ff;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
}

.client-actions button:hover {
  background: #e1eaff;
}

.client-actions button[data-delete-project],
.client-actions button[data-delete-client],
.client-actions button[data-delete-proposal] {
  background: #fff0f0;
  color: #d04444;
  border-color: #f5dddd;
}

.client-actions button[data-delete-project]:hover,
.client-actions button[data-delete-client]:hover,
.client-actions button[data-delete-proposal]:hover {
  background: #ffe0e0;
}

/* =====================================
   EMPTY STATE
===================================== */

.empty-state {
  text-align: center;
  padding: 55px 20px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eaf3ee;
  color: #286b52;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 23px;
  margin: 0 auto 17px;
}

.empty-state h3 {
  color: #344054;
  font-size: 15px;
  margin-bottom: 9px;
}

.empty-state p {
  color: #98a2b3;
  font-size: 11px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* =====================================
   MODALS
===================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background: white;
  width: 440px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  gap: 15px;
}

.modal-heading h2 {
  font-size: 19px;
  color: #263447;
  margin-bottom: 7px;
}

.modal-heading p {
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.5;
}

.close-btn {
  background: #f2f4f7;
  border: none;
  border-radius: 7px;
  width: 31px;
  height: 31px;
  color: #667085;
  font-size: 22px;
  flex-shrink: 0;
}

.close-btn:hover {
  background: #e4e7ec;
}

/* =====================================
   FORMS
===================================== */

.modal form {
  display: flex;
  flex-direction: column;
}

.modal label {
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  border: 1px solid #e0e5eb;
  background: white;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: #344054;
  outline: none;
  margin-bottom: 17px;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  border-color: #286b52;
  box-shadow: 0 0 0 3px rgba(40, 107, 82, 0.1);
}

.modal textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.modal input::placeholder,
.modal textarea::placeholder {
  color: #b2bac5;
}

/* =====================================
   RESPONSIVE DESIGN
===================================== */

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 28px;
  }
}

@media (max-width: 750px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    padding: 15px;
    border-right: none;
    border-bottom: 1px solid #e9edf2;
  }

  .brand {
    margin-bottom: 18px;
  }

  .workspace-label,
  .sidebar-bottom,
  .user-card {
    display: none;
  }

  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .nav-link {
    flex-shrink: 0;
    font-size: 11px;
    padding: 10px;
  }

  .topbar {
    padding: 0 18px;
    height: 65px;
  }

  .date-label {
    display: none;
  }

  .content {
    padding: 22px 16px;
  }

  .welcome h1 {
    font-size: 22px;
  }

  .stats {
    gap: 10px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card h2 {
    font-size: 24px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .top-actions .primary-btn {
    padding: 10px;
    font-size: 10px;
  }

  .breadcrumb {
    font-size: 10px;
  }

  .modal {
    padding: 20px;
  }
}
