/* Lendora theme on top of Bootstrap 5.3 */
:root {
  --brand: #0F766E;
  --brand-hover: #115E59;
  --brand-ink: #134E4A;
  --brand-soft: #F0FDFA;
  --brand-line: #CCFBF1;
  --brand-dark: #0B3B36;
  --ground: #F6F7F9;
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: #111827;
  --bs-secondary-color: #4B5563;
  --bs-border-color: #E5E7EB;
  --bs-link-color: #0F766E;
  --bs-link-color-rgb: 15, 118, 110;
  --bs-link-hover-color: #115E59;
  --bs-primary: #0F766E;
  --bs-primary-rgb: 15, 118, 110;
  --bs-border-radius: .6rem;
  --bs-border-radius-lg: .85rem;
}
body { background: var(--ground); }
.btn { font-weight: 600; border-radius: .6rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover); --bs-btn-active-bg: var(--brand-ink); --bs-btn-disabled-bg: #5EBDB4; --bs-btn-disabled-border-color: #5EBDB4; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-ink); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: #D1D5DB; --bs-btn-hover-bg: #F9FAFB; --bs-btn-hover-border-color: #D1D5DB; }
.form-control, .form-select { border-color: #D1D5DB; min-height: 42px; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(15,118,110,.18); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-range::-webkit-slider-thumb { background: var(--brand); }
.form-range::-moz-range-thumb { background: var(--brand); }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.text-muted { color: #4B5563 !important; }
.small-muted { font-size: .82rem; color: #6B7280; }

/* Layout */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: #fff; border-right: 1px solid var(--bs-border-color); padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 992px) { .sidebar { max-width: 260px; position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar.dark { background: #0B2E2B; color: #E5E7EB; border-right: 0; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: inherit; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sidebar.dark .brand-mark { background: #14B8A6; color: #0B2E2B; }
.brand-name { font-size: 18px; font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.sidebar.dark .brand-sub { color: #5EEAD4; }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 8px; color: #374151; font-size: 14px; font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: #F9FAFB; }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-hover); font-weight: 600; }
.side-nav i { font-size: 17px; }
.sidebar.dark .side-nav a { color: #CBD5E1; }
.sidebar.dark .side-nav a:hover { background: #12403C; }
.sidebar.dark .side-nav a.active { background: #134E4A; color: #fff; }
.side-nav .count { margin-left: auto; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #F59E0B; color: #1F2937; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 32px; background: #fff; border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 20px; font-weight: 700; margin: 0; }
.content { padding: 24px 32px 48px; max-width: 1260px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 640px) { .content { padding: 16px; } .topbar { padding: 12px 16px; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #CCFBF1; color: var(--brand-ink); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; }
.help-card { margin-top: auto; padding: 14px; border-radius: 10px; background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 13px; }

/* Cards */
.card { border-color: var(--bs-border-color); border-radius: .85rem; }
.card-pad { padding: 20px; }
.card h2, .card-title-sm { font-size: 16px; font-weight: 600; margin: 0; }
.kpi { padding: 18px; }
.kpi .label { font-size: 13px; font-weight: 500; color: #4B5563; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 4px; }
.kpi .sub { font-size: 13px; color: #6B7280; }
.hero-dark { background: var(--brand-dark); color: #fff; border-radius: .85rem; padding: 22px; }
.hero-dark .muted { color: #99F6E4; }
.stat-tile { padding: 12px; border-radius: 10px; background: var(--brand-soft); }
.stat-tile .l { font-size: 12px; color: #4B5563; }
.stat-tile .v { font-size: 17px; font-weight: 700; }
.icon-tile { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }

/* Tables */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #4B5563; background: #F9FAFB; font-weight: 600; white-space: nowrap; border-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem .65rem; vertical-align: middle; border-color: #F3F4F6; }
.table > :not(caption) > * > *:first-child { padding-left: 1.25rem; }
.table > :not(caption) > * > *:last-child { padding-right: 1.25rem; }
.sub { font-size: 12px; color: #6B7280; }

/* Soft badges */
.badge { font-weight: 600; font-size: 12px; padding: .38em .7em; }
.text-bg-warning-soft { background: #FFFBEB; color: #B45309; }
.text-bg-info-soft { background: #EFF6FF; color: #1D4ED8; }
.text-bg-primary-soft { background: #E0F2FE; color: #075985; }
.text-bg-success-soft { background: #ECFDF5; color: #047857; }
.text-bg-danger-soft { background: #FEF2F2; color: #B91C1C; }
.text-bg-secondary-soft { background: #F3F4F6; color: #374151; }

/* Progress stages */
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.stages li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: #6B7280; }
.stages .bar { height: 6px; border-radius: 3px; background: #E5E7EB; }
.stages li.done { color: #111827; } .stages li.done .bar { background: var(--brand); }
.stages li.cur { color: #B45309; } .stages li.cur .bar { background: #F59E0B; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; width: 28px; flex: none; }
.timeline .dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.timeline .line { width: 2px; flex: 1; min-height: 20px; background: #E5E7EB; }
.timeline li:last-child .line { background: transparent; }
.timeline .body { padding-bottom: 18px; min-width: 0; }
.dot.done { background: var(--brand); color: #fff; } .line.done { background: var(--brand); }
.dot.cur { background: #FFFBEB; color: #B45309; border: 2px solid #F59E0B; }
.dot.todo { background: #fff; border: 2px solid #D1D5DB; color: #9CA3AF; }
.dot.bad { background: #FEF2F2; color: #B91C1C; border: 2px solid #FCA5A5; }

/* Pills / chips */
.chip-tab { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--bs-border-color); background: #fff; color: #374151; }
.chip-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--bs-border-color); background: #fff; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.btn-check:checked + .choice { border: 2px solid var(--brand); background: var(--brand-soft); padding: 11px 13px; }
.choice .t { font-size: 14px; font-weight: 600; color: #111827; } .choice .d { font-size: 12px; color: #4B5563; }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 16px; height: 200px; border-bottom: 1px solid var(--bs-border-color); padding: 0 4px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bars .b span { font-size: 11px; color: #4B5563; white-space: nowrap; }
.bars .b div { width: 100%; max-width: 48px; border-radius: 6px 6px 0 0; background: #14B8A6; min-height: 2px; }
.bar-labels { display: flex; gap: 16px; padding: 0 4px; } .bar-labels span { flex: 1; text-align: center; font-size: 12px; color: #6B7280; }

/* Auth */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; }
.auth-brand { flex: 1 1 420px; background: var(--brand-dark); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.auth-brand h1 { font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; max-width: 520px; }
.auth-brand ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; color: #CCFBF1; max-width: 520px; }
.auth-brand li { display: flex; gap: 12px; } .auth-brand li i { color: #5EEAD4; }
.auth-form { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; }
@media (max-width: 640px) { .auth-brand { padding: 32px 24px; } .auth-brand h1 { font-size: 28px; } }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #F3F4F6; border-radius: 10px; }
.seg a { text-align: center; padding: 9px; border-radius: 8px; font-weight: 600; font-size: 14px; color: #4B5563; text-decoration: none; }
.seg a.active { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.doc-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 16px 20px; border-top: 1px solid #F3F4F6; }
.doc-row:first-child { border-top: 0; }
.doc-ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.preview-ad { border: 1px solid var(--bs-border-color); border-radius: 12px; overflow: hidden; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
dl.kv dt { font-weight: 400; color: #4B5563; } dl.kv dd { margin: 0; text-align: right; font-weight: 600; }
.msg { padding: 12px; border-radius: 10px; background: #F9FAFB; }
.msg.staff { background: var(--brand-soft); }
