html,
body {
  background-color: #FAFAFA;
  color: #1D3A56 !important;
}

.link-secondary {
  color: #1D3A56 !important;
}

.bg-white {
    background-color: white !important;
}

th.table-green {
  background-color: #198754 !important;
  color: white !important;
}

.ml-3 {
  margin-left: 3rem !important;
}

.mr-3 {
  margin-right: 3rem !important;
}

.ml-1 {
  margin-left: 1rem !important;
}

.mr-1 {
  margin-right: 1rem !important;
}


* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Arial", sans-serif;
  color: var(--turtle-text-main);
  background: var(--turtle-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.app-layout {
  display: flex;
  width: 100%;
  max-width: 1320px;
  gap: 12px;
  min-height: calc(100vh - 90px);
}

.sidebar {
  width: 20%;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  color: #111827;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 4px;
}

.sidebar-logo-wrap {
  width: 235px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-wrap img {
  width: 215px;
  height: 94px;
}

.sidebar-title {
  margin-left: 0;
}

.sidebar-title h6 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: #6ee7a0;
}

.sidebar-title small {
  font-size: 0.82rem;
  color: #6ee7a0;
}

.sidebar-nav-panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px;
  flex: 1;
}

.sidebar nav {
  margin-top: 0;
  margin-bottom: 0;
  padding-right: 0;
  padding-top: 0;
}

.sidebar .nav-link {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.16s ease-out;
  margin-bottom: 4px;
}

.sidebar .nav-link i {
  font-size: 1rem;
}

.sidebar .nav-link.active {
  background: var(--turtle-success);
  color: var(--turtle-text-main);
  font-weight: 500;
}

.sidebar .nav-link:hover:not(.active) {
  background: #f3f4f6;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  box-shadow: none;
  border-color: transparent;
}

.sidebar-footer {
  margin-top: 16px;
  padding: 16px;
  border-top: none;
  color: #0b1120;
  background: #ffffff;
  border-radius: 18px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 1rem;
}

.sidebar-user-meta small:first-child {
  font-weight: 600;
  font-size: 0.86rem;
  color: #111827;
}

.sidebar-user-meta small:last-child {
  font-size: 0.78rem;
  color: var(--turtle-text-muted);
}

.app-layout .btn {
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: none;
}

/* Main content card */
.main-content {
  flex: 1;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: none;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: none;
  border: none;
}

.page-header-title span.label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--turtle-text-muted);
}

.page-header-title h1 {
  margin: 4px 0 4px;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--turtle-text-main);
}

.page-header-title p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--turtle-text-muted);
}

/* Inner card around table */
.surface-panel {
  margin-top: 12px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  overflow: auto;
}


/* Transparent scroll container — sections are their own panels */
.section-container {
  margin-top: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.card {
  border-radius: 16px;
  border-color: var(--turtle-border-soft);
  box-shadow: none;
}

.zero-flex {
  flex: 0 !important;
}

/* DataTables controls */
.dt-container .row.mt-2.justify-content-between {
  margin-bottom: 4px;
}

.dt-length label,
.dt-search label {
  font-size: 0.78rem;
  color: var(--turtle-text-muted);
  margin-right: 6px;
}

.dt-length select.form-select-sm,
.dt-search input.form-control-sm {
  border-radius: 999px;
  border-color: var(--turtle-border-soft);
  font-size: 0.78rem;
  padding-inline: 12px;
}

.dt-search input.form-control-sm::placeholder {
  color: #9ca3af;
}

.dt-info {
  font-size: 0.78rem;
  color: var(--turtle-text-muted);
}

.dt-paging .pagination {
  margin-bottom: 0;
}

.dt-paging .page-link {
  border-radius: 999px !important;
  border-color: var(--turtle-border-soft);
  font-size: 0.78rem;
}

.dt-paging .page-item.active .page-link {
  background: var(--turtle-cta);
  border-color: var(--turtle-cta);
  color: var(--turtle-text-main);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

/* Table styling */
table.dataTable {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border-collapse: separate !important;
  border-spacing: 0;
}

table.dataTable thead {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.06), rgba(34, 197, 94, 0.06));
}

table.dataTable thead th {
  border-bottom: 1px solid var(--turtle-border-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--turtle-text-muted);
  padding-top: 10px;
  padding-bottom: 10px;
  background: transparent;
}

table.dataTable tbody td {
  border-top-color: #f3f4f6;
  vertical-align: middle;
  font-size: 0.9rem;
}

table.dataTable tbody tr:hover {
  background-color: #f9fafb;
}

/* Broker cell */
.broker-avatar {
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.08);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.broker-avatar i {
  color: var(--turtle-cta-hover);
  font-size: 1.2rem;
}

.broker-name {
  font-weight: 600;
  color: var(--turtle-text-main);
}

.broker-id {
  font-size: 0.78rem;
  color: var(--turtle-text-muted);
}

.admin-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.admin-email {
  font-size: 0.8rem;
  color: var(--turtle-text-muted);
}

/* Status badge */
.badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Action buttons */
.table-actions .link-secondary {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.9rem;
  color: var(--turtle-text-muted) !important;
  transition: all 0.16s ease-out;
}

.table-actions .link-secondary:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--turtle-text-main) !important;
}

@media (max-width: 992px) {
  body {
    padding: 16px;
  }

  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 14px 8px;
  }

  .sidebar-nav-panel {
    flex: 1;
    padding: 8px;
  }

  .sidebar nav {
    display: flex;
    flex: 1;
    gap: 6px;
    margin: 0;
  }

  .sidebar .nav-link {
    padding-inline: 10px;
    font-size: 0.8rem;
  }

  .sidebar-footer {
    margin-top: 0;
    border-top: none;
  }

  .main-content {
    padding-top: 10px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header-actions {
    width: 100%;
  }

  .app-layout .btn {
    justify-content: center;
  }

  .surface-panel {
    max-height: none;
  }

  .section-container {
    max-height: none;
  }
}

.sidebar-logout {
  margin-left: 0;
  margin-right: 0;
}

.btn-logout {
  background: #f9c4b4;
  border-color: #f9c4b4;
  color: #7c2d12;
  border-radius: 999px;
  padding: 6px 20px;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: none !important;
}

.btn-logout:hover {
  background: #f5a58a;
  border-color: #f5a58a;
  color: #7c2d12;
}

@media (max-width: 576px) {
  table.dataTable {
    font-size: 0.82rem;
  }
}

.dt-length .form-select-sm {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* Inline form for action buttons */
.inline-form {
  display: inline;
}

/* Button styled as icon-only link */
.btn-icon-only {
  border: none;
  background: none;
  padding: 0;
}

.cursor-pointer {
  cursor: pointer;
}

.broker-details {
  padding-left: 0.4rem;
  padding-top: 0.8rem;
}

.btn-white {
  background: white !important;
  border-color: white !important;
  box-shadow: 0 0px 0px rgba(34, 197, 94, 0) !important;
}

.app-footer {
  width: 100%;
  max-width: 1320px;
  text-align: center;
  padding: 16px 0 4px;
  color: #9ca3af;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-footer img {
  height: 22px;
}

.app-footer span {
  font-weight: 600;
  color: #d1d5db;
  letter-spacing: 0.12em;
}