* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  background: #f5f7fa;
  color: #172033;
}

button {
  font: inherit;
}

.app {
  display: flex;
  min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  width: 260px;
  min-height: 100vh;

  background: #111827;
  color: white;

  display: flex;
  flex-direction: column;

  transition: width 0.25s ease;
  z-index: 100;
}

.sidebar.collapsed {
  width: 78px;
}


/* BRAND */

.brand {
  height: 82px;

  display: flex;
  align-items: center;

  padding: 0 18px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;

  border-radius: 11px;

  background: white;
  color: #111827;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  font-weight: 800;
}

.brand-text {
  margin-left: 12px;

  display: flex;
  flex-direction: column;

  white-space: nowrap;
  overflow: hidden;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.5px;
}

.brand-text span {
  margin-top: 2px;

  font-size: 10px;
  letter-spacing: 2px;

  color: #9ca3af;
}


/* COLLAPSE BUTTON */

.collapse-btn {
  margin-left: auto;

  width: 30px;
  height: 30px;

  border: 0;
  border-radius: 7px;

  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;

  cursor: pointer;

  font-size: 22px;
}

.collapse-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}


/* NAVIGATION */

.nav {
  padding: 22px 12px;
  flex: 1;
}

.nav-item {
  width: 100%;
  height: 48px;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: #9ca3af;

  display: flex;
  align-items: center;

  padding: 0 14px;
  margin-bottom: 5px;

  cursor: pointer;

  text-align: left;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.nav-item.active {
  background: white;
  color: #111827;
}

.nav-icon {
  width: 24px;
  min-width: 24px;

  text-align: center;
  font-size: 17px;
}

.nav-label {
  margin-left: 12px;

  white-space: nowrap;
  overflow: hidden;
}


/* SIDEBAR FOOTER */

.sidebar-footer {
  padding: 15px 12px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile {
  display: flex;
  align-items: center;

  padding: 9px;
}

.avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;

  border-radius: 50%;

  background: #374151;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 13px;
}

.profile-info {
  margin-left: 10px;

  white-space: nowrap;
  overflow: hidden;
}

.profile-info strong {
  display: block;

  font-size: 12px;
}

.profile-info span {
  display: block;

  margin-top: 3px;

  font-size: 10px;

  color: #9ca3af;
}


/* COLLAPSED SIDEBAR */

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .profile-info {
  display: none;
}

.sidebar.collapsed .collapse-btn {
  position: absolute;

  left: 61px;
  top: 26px;

  margin: 0;

  background: white;
  color: #111827;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);

  transform: rotate(180deg);
}


/* =========================
   MAIN
========================= */

.main {
  margin-left: 260px;

  width: calc(100% - 260px);
  min-height: 100vh;

  transition:
    margin-left 0.25s ease,
    width 0.25s ease;
}

.sidebar.collapsed + .main {
  margin-left: 78px;

  width: calc(100% - 78px);
}


/* TOP BAR */

.topbar {
  min-height: 100px;

  padding: 24px 38px;

  background: white;

  border-bottom: 1px solid #e5e7eb;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  margin-bottom: 5px;

  color: #9ca3af;

  font-size: 12px;
}

.topbar h1 {
  margin: 0;

  font-size: 23px;
  font-weight: 700;

  letter-spacing: -0.5px;
}

.top-actions {
  display: flex;
  align-items: center;

  gap: 12px;
}

.status {
  display: flex;
  align-items: center;

  gap: 6px;

  color: #6b7280;

  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #22c55e;
}

.top-button {
  padding: 8px 13px;

  border: 1px solid #e5e7eb;
  border-radius: 8px;

  background: white;
  color: #4b5563;

  cursor: pointer;

  font-size: 12px;
}


/* =========================
   CONTENT
========================= */

.content {
  max-width: 1500px;

  margin: 0 auto;

  padding: 36px 38px;
}


/* WELCOME */

.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-bottom: 28px;
}

.eyebrow {
  display: block;

  margin-bottom: 8px;

  color: #9ca3af;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1.5px;
}

.welcome h2 {
  margin: 0;

  font-size: 28px;

  letter-spacing: -1px;
}

.welcome p {
  margin: 8px 0 0;

  color: #6b7280;

  font-size: 13px;
}

.date-box {
  color: #6b7280;

  font-size: 12px;
}


/* CARDS */

.cards {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;

  margin-bottom: 20px;
}

.card {
  padding: 23px;

  background: white;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.card-label {
  color: #6b7280;

  font-size: 12px;
}

.card-value {
  margin: 13px 0 5px;

  font-size: 31px;
  font-weight: 700;
}

.card-description {
  color: #9ca3af;

  font-size: 11px;
}


/* PANEL */

.panel {
  min-height: 330px;

  background: white;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  overflow: hidden;
}

.panel-header {
  padding: 22px 24px;

  border-bottom: 1px solid #e5e7eb;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  margin: 0;

  font-size: 16px;
}

.primary-button {
  padding: 9px 15px;

  border: 0;
  border-radius: 7px;

  background: #111827;
  color: white;

  cursor: pointer;

  font-size: 12px;
}

.primary-button:hover {
  background: #1f2937;
}


/* EMPTY STATE */

.empty-state {
  height: 245px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  color: #6b7280;
}

.empty-icon {
  width: 42px;
  height: 42px;

  margin-bottom: 13px;

  border-radius: 50%;

  background: #f3f4f6;
  color: #374151;

  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state strong {
  color: #374151;

  font-size: 13px;
}

.empty-state p {
  margin-top: 7px;

  font-size: 11px;
}


/* =========================
   PAGE SECTIONS
========================= */

.page-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-intro h2 {
  margin: 0;

  font-size: 28px;
  letter-spacing: -1px;
}

.page-intro p {
  margin: 8px 0 0;

  color: #6b7280;
  font-size: 13px;
}


/* TOOLBAR */

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;

  transform: translateY(-50%);

  color: #9ca3af;
  font-size: 15px;
}

.search-box input {
  width: 100%;
  height: 40px;

  padding: 0 14px 0 38px;

  border: 1px solid #e5e7eb;
  border-radius: 8px;

  background: white;
  color: #172033;

  font-size: 13px;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.search-box input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.search-box input::placeholder {
  color: #9ca3af;
}


/* DATA TABLE */

.client-panel {
  min-height: auto;
}

.table-count {
  color: #6b7280;
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th {
  padding: 14px 20px;

  border-bottom: 1px solid #e5e7eb;

  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;

  border-bottom: 1px solid #f3f4f6;

  font-size: 13px;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fafbfc;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-name {
  font-weight: 600;
  color: #111827;
}

.cell-date {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}

.table-empty {
  padding: 48px 20px !important;

  color: #9ca3af;
  text-align: center;
}


/* BADGES */

.type-badge {
  display: inline-flex;
  align-items: center;

  padding: 4px 9px;

  border-radius: 999px;

  background: #f3f4f6;
  color: #4b5563;

  font-size: 11px;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;

  padding: 4px 9px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-active {
  background: #ecfdf5;
  color: #059669;
}

.status-review {
  background: #fffbeb;
  color: #d97706;
}

.status-new {
  background: #eff6ff;
  color: #2563eb;
}

.status-default {
  background: #f3f4f6;
  color: #6b7280;
}


/* ROW ACTIONS */

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-button {
  padding: 6px 10px;

  border: 1px solid #e5e7eb;
  border-radius: 6px;

  background: white;
  color: #4b5563;

  cursor: pointer;
  font-size: 11px;

  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.table-button:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}


/* =========================
   DUMMY PAGES
========================= */

.dummy-page {
  min-height: 520px;

  padding: 35px;

  background: white;

  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.dummy-page h2 {
  margin: 0 0 10px;

  font-size: 24px;
}

.dummy-page p {
  color: #6b7280;

  font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 800px) {

  .cards {
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: none;
  }

  .content {
    padding: 25px 20px;
  }

  .topbar {
    padding: 20px;
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: none;
  }

  .data-table th,
  .data-table td {
    padding: 12px 14px;
  }

}