:root {
  --fs-primary-blue: #2f80c4;
  --fs-dark-blue: #174a7c;
  --fs-header-navy: #153d73;
  --fs-light-blue: #dceeff;
  --fs-border-grey: #d9e2ec;
  --fs-text-dark: #1f2937;
  --fs-success: #22c55e;
  --fs-warning: #f59e0b;
  --fs-review: #6366f1;
}

body {
  background-color: #ffffff;
  background-image: none;
  color: var(--fs-text-dark);
}

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

.app-sidebar {
  width: 248px;
  background: #ffffff;
  border-right: 1px solid #d8e1eb;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 2rem;
  font-weight: 700;
  text-decoration: none;
  color: #243b53;
  margin-bottom: 10px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--fs-primary-blue), #8b5cf6);
}

.workspace-pill {
  border: 1px solid #d7e3ef;
  border-radius: 9px;
  background: #f7fbff;
  font-size: 0.82rem;
  padding: 7px 9px;
  color: #334e68;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #334e68;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.side-nav a:hover {
  background: #eef5ff;
  color: #174a7c;
}

.side-icn {
  width: 18px;
  text-align: center;
  color: #8aa2bd;
  font-size: 0.88rem;
}

.side-nav a.active {
  background: #eef4ff;
  color: #174a7c;
  border: 1px solid #c8daf2;
  font-weight: 700;
}
.side-nav a.active .side-icn {
  color: #174a7c;
}

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

.top-utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d8e1eb;
  background: #ffffff;
  padding: 12px 20px;
}

.top-title {
  font-size: 1.35rem;
}

.utility-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-container {
  padding: 14px 20px 22px;
}

.finstacks-nav {
  background: var(--fs-header-navy);
}

.finstacks-nav .btn-light {
  background: var(--fs-primary-blue) !important;
  border-color: #1f6fb1 !important;
  color: #ffffff !important;
}

.finstacks-nav .btn-outline-light {
  border-color: #a9c8e6 !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

h1, h2, h3, h4, h5 {
  color: var(--fs-dark-blue);
}

.tab-nav-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  background: var(--fs-primary-blue) !important;
  color: #fff !important;
  text-decoration: none;
  border: 1px solid var(--fs-primary-blue) !important;
  border-radius: 8px;
  padding: 6px 13px;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  display: inline-block;
}

.tab-btn:hover {
  color: #fff !important;
  background: var(--fs-dark-blue) !important;
}

.tab-btn-active {
  background: #174a7c !important;
  border-color: #174a7c !important;
}

.card {
  border: 1px solid #b7c7d8;
  border-radius: 10px;
}

.table {
  background: #fff;
  color: #111827;
}

.table th {
  background: #f3f8ff;
  color: #153d73;
  border-color: #b5c7da !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 9px 10px;
}

.table td {
  border-color: #c7d6e5 !important;
  font-size: 0.86rem;
  padding: 8px 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d2deea;
  color: #486581;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  text-decoration: none;
}

.chip-active {
  border-color: #c7a6ef;
  color: #7a35c4;
  background: #f8f0ff;
}

.toolbar-search {
  width: 220px;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid #d0dceb;
  padding: 6px 11px;
  font-size: 0.82rem;
}

.icon-btn {
  border: 1px solid #d1deea !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.table-sticky th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.pagination-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d5e1ec;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
}

.pagination-wrap a {
  text-decoration: none;
  color: #174a7c;
  font-weight: 600;
}

.list-view td,
.list-view th {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #fff;
}

.status-completed { background: var(--fs-success); }
.status-in_progress { background: var(--fs-warning); }
.status-under_review { background: var(--fs-review); }
.status-not_started { background: #94a3b8; }
.status-draft { background: #94a3b8; }
.status-sent { background: #2f80c4; }
.status-accepted { background: #22c55e; }
.status-lost { background: #ef4444; }
.status-cancelled { background: #64748b; }

input, select, textarea {
  border: 1px solid #bccfe0;
  border-radius: 8px;
  padding: 7px 9px;
  width: 100%;
  background: #ffffff;
  color: #111827;
  font-size: 0.9rem;
}

.fin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.task-table th {
  background: #1f4f8f;
  color: #ffffff;
}

.task-table td,
.task-table th {
  border-width: 1.2px !important;
}

@media (max-width: 992px) {
  .app-shell {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #d8e1eb;
  }
  .top-utility-bar {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-container {
    padding: 14px;
  }
}
