:root {
  --sidebar-width: 292px;
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --border: #e7edf6;
  --text: #172033;
  --muted: #7b8798;
  --primary: #2563eb;
  --primary-soft: #eaf1ff;
  --sidebar: #0f172a;
  --sidebar-muted: #94a3b8;
}

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 45%, #eef4ff 100%);
  color: var(--text);
}

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

.admin-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.18), transparent 22rem),
    var(--sidebar);
  color: #fff;
  padding: 22px 16px;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  font-weight: 800;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--sidebar-muted);
}

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

.sidebar-section {
  margin: 18px 10px 8px;
  font-size: 12px;
  color: var(--sidebar-muted);
  letter-spacing: 0.08em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all .18s ease;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.75));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

.sidebar-table-link {
  font-size: 14px;
  padding-left: 18px;
}

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

.admin-topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title {
  font-weight: 700;
  font-size: 18px;
}

.topbar-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.admin-content {
  padding: 28px;
}

.card {
  border: 1px solid rgba(231, 237, 246, 0.9);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  background: var(--panel);
  backdrop-filter: blur(8px);
}

.metric-card {
  min-height: 110px;
}

.metric-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 8px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #edf4ff, #f8fbff);
}

.login-card {
  width: 380px;
}

.table th {
  white-space: nowrap;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-card {
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.filter-card .card-body {
  padding: 12px 14px;
}

.filter-card .row {
  --bs-gutter-x: .65rem;
  --bs-gutter-y: .55rem;
}

.filter-card .form-label {
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  margin-bottom: 3px;
}

.filter-card .form-control,
.filter-card .form-select,
.filter-card .input-group-text {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 13px;
  border-radius: 9px;
}

.filter-card .input-group .form-control:first-child {
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
}

.filter-card .input-group .form-control:last-child {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}

.filter-card .btn {
  min-height: 34px;
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 9px;
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.filter-subtitle {
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.filter-actions {
  margin-top: 10px !important;
}

.form-control,
.form-select,
.input-group-text {
  border-color: var(--border);
  border-radius: 12px;
}

.input-group .form-control:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.input-group .form-control:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.btn {
  border-radius: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: 0;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.data-card {
  overflow: hidden;
}

.data-table-wrap {
  max-height: calc(100vh - 315px);
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
}

.data-table td {
  font-size: 13px;
}

.sticky-action {
  position: sticky;
  right: 0;
  background: inherit;
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.04);
}

.log-box {
  padding: 16px;
  max-height: 70vh;
  overflow: auto;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 0 0 12px 12px;
  font-size: 13px;
}

.log-filter .form-select,
.log-filter .btn {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 13px;
  border-radius: 9px;
}

.investment-selected-list {
  max-height: 680px;
  overflow: auto;
}

.investment-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, .16), transparent 34rem),
    #eef4ff;
}

.investment-login-card {
  width: 380px;
  padding: 34px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
}

.login-subtitle {
  color: var(--muted);
  margin-top: 6px;
}

.investment-page {
  min-height: 100vh;
  background: #f3f4f6;
  padding: 18px;
}

.investment-report {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d8d8d8;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .08);
}

.investment-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid #edf0f5;
}

.investment-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 10px;
}

.meta-line,
.meta-panel {
  font-size: 14px;
  color: #111827;
  line-height: 1.8;
}

.investment-filter {
  display: grid;
  grid-template-columns: 180px 1fr auto auto;
  gap: 10px;
  padding: 14px 26px;
  background: #fafafa;
  border-bottom: 1px solid #edf0f5;
}

.investment-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 26px;
  background: #f5f6f8;
}

.investment-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid #edf0f5;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.investment-card .card-label {
  color: #7b8798;
  font-size: 14px;
  margin-bottom: 8px;
}

.investment-card .card-value {
  font-size: 24px;
  font-weight: 800;
}

.investment-card .blue {
  color: #246bfe;
}

.investment-card .green {
  color: #12b347;
}

.investment-card .orange {
  color: #ff8a00;
}

.investment-table-card {
  margin: 22px 26px;
  border-radius: 14px;
  border: 1px solid #edf0f5;
  overflow: hidden;
}

.investment-table-card thead th {
  background: #f3f4f6;
  color: #111827;
}

.investment-store-cards {
  display: none;
}

.store-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #246bfe;
  font-size: 12px;
  font-weight: 700;
}

.store-card-head,
.store-card-foot,
.store-metrics {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.store-card-head {
  align-items: flex-start;
}

.store-metrics {
  margin-top: 14px;
}

.store-metrics div {
  flex: 1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.store-metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.store-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.store-card-foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.store-name {
  font-weight: 700;
}

.investment-remark {
  padding: 16px 26px 22px;
  border-top: 1px solid #edf0f5;
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 992px) {
  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .admin-topbar {
    position: relative;
  }
}

@media (max-width: 760px) {
  .investment-page {
    padding: 0;
    background: #f5f6f8;
  }

  .investment-report {
    min-height: 100vh;
    border: 0;
    box-shadow: none;
  }

  .investment-header,
  .investment-filter {
    display: block;
  }

  .investment-header {
    padding: 18px 16px 12px;
  }

  .investment-header h2 {
    font-size: 20px;
  }

  .meta-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
  }

  .meta-panel div {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
  }

  .investment-filter {
    padding: 10px 16px 14px;
  }

  .investment-filter > * {
    margin-bottom: 10px;
  }

  .investment-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
    background: #f5f6f8;
  }

  .investment-card {
    border-radius: 14px;
    padding: 12px;
  }

  .investment-card .card-label {
    font-size: 12px;
  }

  .investment-card .card-value {
    font-size: 17px;
    word-break: break-all;
  }

  .investment-table-card {
    margin: 14px 16px;
    border: 0;
    background: transparent;
  }

  .investment-desktop-table {
    display: none;
  }

  .investment-store-cards {
    display: grid;
    gap: 12px;
  }

  .investment-store-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    border: 1px solid #edf0f5;
  }

  .investment-remark {
    margin: 0 16px 18px;
    padding: 14px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    font-size: 13px;
  }
}
