/* Lookme Admin — light polish on AdminLTE v4 */

:root {
  --lm-font: Poppins, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --lm-yellow: #fff6d8;
  --lm-yellow-deep: #ffe9a8;
  --lm-header: #1a1f2e;
  --lm-header-text: #f8fafc;
}

html, body,
.app-wrapper,
.app-sidebar,
.app-header,
.app-main,
.form-control,
.form-select,
.btn,
.nav-link,
.table,
.card,
.modal,
.dropdown-menu,
.dataTables_wrapper {
  font-family: var(--lm-font) !important;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  background: var(--lm-yellow) !important;
}

body.bg-body-tertiary {
  background: var(--lm-yellow) !important;
  --bs-body-bg: var(--lm-yellow);
  --bs-tertiary-bg: var(--lm-yellow-deep);
}

.app-wrapper {
  background: var(--lm-yellow) !important;
}

.app-main {
  background: transparent !important;
}

.app-main .app-content {
  background: transparent !important;
}

/* Top header strip — soft dark */
.app-header.navbar,
.app-header {
  background: var(--lm-header) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 10px rgba(26, 31, 46, 0.18);
  color: var(--lm-header-text) !important;
  min-height: 3.25rem;
}

.app-header .nav-link {
  color: rgba(248, 250, 252, 0.88) !important;
}

.app-header .nav-link:hover,
.app-header .nav-link:focus {
  color: #ffffff !important;
}

.app-header .text-secondary {
  color: rgba(248, 250, 252, 0.65) !important;
}

.app-content-header {
  background: transparent !important;
}

/* Keep footer always visible (AdminLTE grid otherwise pushes it off-screen) */
html, body {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
.app-wrapper {
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}
.app-main {
  min-height: 0 !important;
  overflow: auto !important;
}
.app-footer {
  background: rgba(255, 246, 216, 0.98) !important;
  border-top: 1px solid rgba(202, 138, 4, 0.18) !important;
  z-index: 1030;
  position: relative;
}

.lookme-brand-chip {
  color: #0f766e !important;
  font-weight: 700 !important;
}
.lookme-brand-chip:hover {
  color: #115e59 !important;
  text-decoration: underline !important;
}
#lookmePanelModal .font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Cards float nicely on yellow */
.app-content .card,
.app-content .fin-table-card,
.app-content .ss-card,
.app-content .mu-table-card {
  background: #ffffff;
  border: 1px solid rgba(202, 138, 4, 0.12);
  box-shadow: 0 2px 10px rgba(120, 90, 20, 0.06);
}

h1, h2, h3, h4, h5, h6,
.brand-text,
.card-title,
.small-box .inner h3,
.fin-card-value {
  font-family: var(--lm-font) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-image {
  margin-right: 0.5rem;
}

/* Compact page title area — kill empty gap under heading */
.app-main .app-content-header {
  padding: 0.4rem 0.5rem 0.15rem !important;
}

.app-main .app-content-header h3 {
  font-size: 1.2rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.app-main .app-content-header .breadcrumb {
  line-height: 1.5rem !important;
  margin: 0 !important;
  font-size: 0.82rem;
}

.app-main .app-content {
  padding-top: 0.15rem !important;
}

/* Bootstrap Icons as AdminLTE small-box icons */
.small-box .small-box-icon.bi {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 4rem;
  opacity: 0.25;
  z-index: 0;
  line-height: 1;
}

.small-box .inner {
  position: relative;
  z-index: 1;
}

/* Map old dashboard cards closer to AdminLTE small-box look */
.app-content .card.text-bg-primary {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-content .card.text-bg-primary .card-body {
  padding: 0.75rem 1rem;
}

.app-content .card.text-bg-primary .card-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.35rem !important;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: #fff !important;
}

.app-content .card.text-bg-primary .card-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.app-content .card.text-bg-primary a .panel-footer {
  background: rgba(0, 0, 0, 0.1);
  display: block;
  padding: 0.4rem 0.75rem;
  color: #fff !important;
  text-decoration: none;
  margin-top: 0.5rem;
}

.app-content .card.text-bg-primary a {
  text-decoration: none;
  color: inherit;
}

/* Login page (kept independent of AdminLTE shell) */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #e9ecef;
}

.admin-login-card {
  border: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-login-card .card-header {
  background: #0d6efd;
  border: 0;
  color: #fff;
  padding: 1rem 1.25rem;
}

.admin-login-card .card-body {
  padding: 1.5rem;
  background: #fff;
}

/* Sidebar — black bg, white text */
.app-sidebar {
  background-color: #0a0a0a !important;
  background-image: none !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35) !important;
  color: #ffffff !important;
  --bs-body-bg: #0a0a0a;
  --bs-body-color: #ffffff;
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: rgba(255, 255, 255, 0.75);
  --bs-tertiary-bg: #141414;
  --bs-border-color: rgba(255, 255, 255, 0.12);
}

.app-sidebar .sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 3.5rem;
  background: #000 !important;
}

.app-sidebar .brand-link {
  padding: 0.85rem 1rem !important;
  gap: 0.65rem;
  color: #ffffff !important;
}

.app-sidebar .brand-text {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  color: #ffffff !important;
}

.app-sidebar .brand-image {
  width: auto !important;
  height: 34px !important;
  max-height: 34px !important;
  object-fit: contain;
}

.app-sidebar .brand-zh {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.app-sidebar .brand-zh svg {
  height: 34px;
  width: auto;
  display: block;
}

.app-sidebar .brand-zh-img {
  height: 34px !important;
  width: auto !important;
  max-width: 180px;
  display: block;
  object-fit: contain;
}

.sidebar-wrapper {
  padding-bottom: 1rem;
  background: #0a0a0a !important;
}

.sidebar-menu .nav-header {
  padding: 1.1rem 1rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
  color: rgba(255, 255, 255, 0.55) !important;
}

.sidebar-menu .nav-link {
  border-radius: 0.45rem;
  margin: 0.15rem 0.6rem;
  padding: 0.65rem 0.85rem;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
  color: #ffffff !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-menu .nav-link p {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.35;
  color: #ffffff !important;
}

.sidebar-menu .nav-link .nav-icon {
  font-size: 1.2rem;
  width: 1.6rem;
  margin-right: 0.45rem;
  opacity: 1;
  color: #ffffff !important;
}

.sidebar-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.sidebar-menu .nav-treeview {
  padding-left: 0.15rem;
}

.sidebar-menu .nav-treeview .nav-link {
  padding: 0.55rem 0.75rem 0.55rem 1.1rem;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.88) !important;
}

.sidebar-menu .nav-treeview .nav-link p {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.88) !important;
}

.sidebar-menu .nav-treeview .nav-icon.bi-dot {
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.7;
  color: #ffffff !important;
}

.sidebar-menu .nav-link.active {
  font-weight: 700;
  background: #1a73e8 !important;
  color: #ffffff !important;
}

.sidebar-menu .nav-link.active p,
.sidebar-menu .nav-link.active .nav-icon {
  color: #ffffff !important;
  opacity: 1;
}

.sidebar-menu .nav-arrow {
  font-size: 0.95rem;
  color: #ffffff !important;
}

.sidebar-menu .nav-link .nav-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28em 0.55em;
  border-radius: 999px;
  line-height: 1;
  vertical-align: middle;
}

.sidebar-menu .nav-link .badge {
  font-size: 0.72rem !important;
  font-weight: 600;
}

.sidebar-menu .nav-link.gm-side-locked {
  opacity: 0.55;
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.65) !important;
}

.sidebar-menu .nav-link.gm-side-locked:hover {
  opacity: 0.75;
  background: rgba(220, 53, 69, 0.18) !important;
}

/* =========================================================
   Equal-height cards across admin (same row = same height)
   ========================================================= */
.app-content .lm-equal-row > [class*="col-"],
.app-content .row.g-3 > [class*="col-"]:has(> .card),
.app-content .row.g-3 > [class*="col-"]:has(> .info-box),
.app-content .row.g-3 > [class*="col-"]:has(> .fin-card),
.app-content .row.g-3 > [class*="col-"]:has(> a > .fin-card),
.app-content .dash-section > .row > [class*="col-"],
.app-content .fin-summary > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.app-content .lm-equal-row > [class*="col-"] > .card,
.app-content .lm-equal-row > [class*="col-"] > .info-box,
.app-content .row.g-3 > [class*="col-"] > .card,
.app-content .row.g-3 > [class*="col-"] > .info-box,
.app-content .dash-section > .row > [class*="col-"] > .dash-card,
.app-content .fin-summary > [class*="col-"] > .fin-card,
.app-content .fin-summary > [class*="col-"] > a {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}

.app-content .fin-summary > [class*="col-"] > a {
  display: flex;
  text-decoration: none;
}
.app-content .fin-summary > [class*="col-"] > a > .fin-card {
  flex: 1 1 auto;
  width: 100%;
}

/* Uniform card chrome */
.app-content .card {
  border-radius: 0.5rem;
}
.app-content .card.h-100 {
  display: flex;
  flex-direction: column;
}
.app-content .card.h-100 > .card-body {
  flex: 1 1 auto;
}

/* Dashboard cards: same height in a row */
.app-content .dash-section > .row > [class*="col-"] > .dash-card {
  margin-bottom: 0;
  height: 100%;
  min-height: 118px;
  display: flex;
  flex-direction: column;
}
.app-content .dash-section > .row > [class*="col-"] > .dash-card .inner {
  flex: 1 1 auto;
}
.app-content .dash-section > .row {
  --bs-gutter-y: 1rem;
}

/* Finance summary cards */
.app-content .fin-summary .fin-card {
  margin-bottom: 0;
  height: 100%;
  min-height: 102px;
}
