/* ============================================================================
   Lotus Work Portal — shared styles
   Minimal, professional, mobile-first. Brand colour: Lotus green.
   ============================================================================ */

:root {
  /* Brand colours sampled from the Lotus logo (deep navy + gold) */
  --lp-primary: #16294a;
  --lp-primary-dark: #0d1a30;
  --lp-primary-light: #e9edf4;
  --lp-accent: #c69c52;
  --lp-sidebar-bg: #0d1a30;
  --lp-sidebar-text: #d6dce6;
  --lp-sidebar-active: #16294a;
  --lp-bg: #f4f5f7;
  --lp-border: #e2e5ea;
  --lp-text: #1b2333;
  --lp-muted: #6c7688;
  --lp-radius: 10px;
}

body {
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--lp-primary); }
.btn-primary { --bs-btn-bg: var(--lp-primary); --bs-btn-border-color: var(--lp-primary); --bs-btn-hover-bg: var(--lp-primary-dark); --bs-btn-hover-border-color: var(--lp-primary-dark); }
.text-primary { color: var(--lp-primary) !important; }
.bg-primary { background-color: var(--lp-primary) !important; }

/* ---------------------------------------------------------------------- */
/* Shell layout: sidebar + main                                           */
/* ---------------------------------------------------------------------- */
.lp-shell { display: flex; min-height: 100vh; }

.lp-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--lp-sidebar-bg);
  color: var(--lp-sidebar-text);
  display: flex;
  flex-direction: column;
}

.lp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.lp-brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: #ffffff; padding: 4px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.lp-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.lp-brand-name { font-weight: 700; letter-spacing: .04em; line-height: 1.1; }
.lp-brand-sub { font-size: .75rem; opacity: .75; }

.lp-nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.lp-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--lp-sidebar-text); text-decoration: none;
  font-size: .92rem; margin-bottom: 2px;
}
.lp-nav-link i { font-size: 1.05rem; width: 18px; text-align: center; }
.lp-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.lp-nav-link.active { background: #ffffff; color: var(--lp-primary-dark); font-weight: 600; }

.lp-sidebar-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,.12); }

.lp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.lp-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--lp-border);
  position: sticky; top: 0; z-index: 20;
}
.lp-page-title { font-weight: 700; font-size: 1.1rem; }
.lp-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lp-primary-light); color: var(--lp-primary-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}

.lp-content { padding: 20px; flex: 1; }
.lp-footer { padding: 14px 20px; color: var(--lp-muted); font-size: .8rem; text-align: center; }

@media (min-width: 992px) {
  .lp-sidebar { position: sticky; top: 0; height: 100vh; }
  /* Bootstrap's responsive offcanvas forces background-color: transparent
     !important at this breakpoint (so the sidebar behaves as a normal,
     always-visible panel instead of a slide-out drawer on desktop) — that
     wipes out our dark green background and leaves the light sidebar text
     unreadable against the white page. Force our colours back on top of it. */
  .lp-sidebar.offcanvas-lg {
    background-color: var(--lp-sidebar-bg) !important;
    color: var(--lp-sidebar-text) !important;
  }
}

/* ---------------------------------------------------------------------- */
/* Cards, tables, KPIs                                                    */
/* ---------------------------------------------------------------------- */
.lp-card {
  background: #fff; border: 1px solid var(--lp-border); border-radius: var(--lp-radius);
  padding: 18px; margin-bottom: 18px;
}
.lp-card-title { font-weight: 700; margin-bottom: 14px; font-size: 1rem; }

.lp-kpi { background: #fff; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); padding: 16px 18px; }
.lp-kpi-label { font-size: .78rem; color: var(--lp-muted); text-transform: uppercase; letter-spacing: .04em; }
.lp-kpi-value { font-size: 1.55rem; font-weight: 700; margin-top: 4px; }
.lp-kpi-sub { font-size: .8rem; color: var(--lp-muted); }

.table { --bs-table-bg: transparent; }
.lp-table-wrap { background: #fff; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); overflow: hidden; }
.lp-table-wrap .table { margin-bottom: 0; }
.lp-table-wrap thead th { background: #fafbfa; border-bottom: 2px solid var(--lp-border); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--lp-muted); white-space: nowrap; }
.lp-table-wrap td, .lp-table-wrap th { padding: 10px 14px; vertical-align: middle; }
.table-responsive-wrap { overflow-x: auto; }

.lp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.lp-toolbar .form-control, .lp-toolbar .form-select { max-width: 260px; }

form label.form-label { font-weight: 600; font-size: .88rem; }
.form-section-title { font-weight: 700; font-size: .95rem; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--lp-border); color: var(--lp-primary-dark); }
.form-section-title:first-child { margin-top: 0; }

.lp-required::after { content: " *"; color: #c0392b; }

/* ---------------------------------------------------------------------- */
/* Appraisal document (screen + print)                                    */
/* ---------------------------------------------------------------------- */
.appraisal-doc { background: #fff; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); padding: 22px; }
.appraisal-doc table { font-size: .86rem; }
.appraisal-doc .doc-header-title { text-align: center; font-weight: 800; letter-spacing: .03em; font-size: 1.15rem; color: var(--lp-primary-dark); margin-bottom: 14px; }
.appraisal-doc .doc-meta-table th, .appraisal-doc .doc-meta-table td { border: 1px solid #333; padding: 4px 8px; font-size: .8rem; }
.appraisal-doc .items-table th, .appraisal-doc .items-table td { border: 1px solid #333; padding: 4px 6px; font-size: .8rem; }
.appraisal-doc .items-table th { background: #f1f3f1; text-align: center; }
.chk-box { display:inline-block; width:14px; text-align:center; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .appraisal-doc { border: none; padding: 0; }
  .lp-shell, .lp-content { display: block; padding: 0; margin: 0; }
  .lp-sidebar, .lp-topbar, .lp-footer { display: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Misc                                                                    */
/* ---------------------------------------------------------------------- */
.lp-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--lp-primary-dark), var(--lp-primary)); padding: 16px; }
.lp-login-card { background: #fff; border-radius: 14px; padding: 34px 30px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.lp-empty-state { text-align: center; padding: 40px 20px; color: var(--lp-muted); }
.lp-empty-state i { font-size: 2.2rem; display: block; margin-bottom: 10px; color: var(--lp-border); }
