/* ==========================================================================
   PressID Pro - application styles (Bootstrap 5 based)
   ========================================================================== */
:root {
  --pid-navy-900: #0a1430;
  --pid-navy-800: #0f1d42;
  --pid-navy-700: #16285a;
  --pid-blue: #2563eb;
  --pid-blue-600: #1d4ed8;
  --pid-blue-100: #e8efff;
  --pid-bg: #f2f5fb;
  --pid-card: #ffffff;
  --pid-border: #e6eaf2;
  --pid-text: #18213a;
  --pid-muted: #6b7489;
  --pid-radius: 14px;
  --pid-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --sidebar-w: 248px;
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: #18213a;
  --bs-body-bg: #f2f5fb;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-border-color: #e6eaf2;
}
body { font-size: .925rem; -webkit-font-smoothing: antialiased; }
.btn-primary { --bs-btn-bg: var(--pid-blue); --bs-btn-border-color: var(--pid-blue); --bs-btn-hover-bg: var(--pid-blue-600); --bs-btn-hover-border-color: var(--pid-blue-600); --bs-btn-active-bg: #1e40af; --bs-btn-disabled-bg: #93b0f5; --bs-btn-disabled-border-color: #93b0f5; }
.btn-outline-primary { --bs-btn-color: var(--pid-blue); --bs-btn-border-color: var(--pid-blue); --bs-btn-hover-bg: var(--pid-blue); --bs-btn-hover-border-color: var(--pid-blue); }
.btn { border-radius: 9px; font-weight: 500; }
.btn-sm { border-radius: 7px; }
.form-control, .form-select { border-radius: 9px; border-color: #dbe1ec; }
.form-control:focus, .form-select:focus { border-color: #8fb0f8; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .35rem; }
.text-secondary { color: var(--pid-muted) !important; }
a { text-decoration: none; }

/* Soft badges ---------------------------------------------------------------- */
.badge { font-weight: 600; border-radius: 6px; padding: .38em .6em; }
.badge-soft-success { background: #e3f8ec; color: #11845b; }
.badge-soft-danger { background: #fdecec; color: #c62a2a; }
.badge-soft-warning { background: #fff4dd; color: #a86500; }
.badge-soft-secondary { background: #eef1f6; color: #59647b; }
.badge-soft-primary { background: var(--pid-blue-100); color: var(--pid-blue-600); }
.badge-soft-dark { background: #e5e7ee; color: #2b3245; }
.badge-soft-light { background: #f4f6fa; color: #8a93a6; border: 1px solid #e6eaf2; }
.badge-soft-info { background: #e2f5fb; color: #0b7894; }

/* Layout ------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--pid-navy-800) 0%, var(--pid-navy-900) 100%);
  color: #c8d2ee; position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.sidebar .brand { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; background: #fff; }
.brand-name { display: block; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.brand-name span { color: #60a5fa; }
.brand-tag { display: block; font-size: .72rem; color: #8fa0c8; }
.sidebar-nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7183ad; padding: 16px 12px 6px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #c8d2ee; font-weight: 500; margin-bottom: 2px;
}
.sidebar-nav a i { font-size: 1.1rem; width: 20px; text-align: center; color: #9fb0d8; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-nav a.active { background: linear-gradient(90deg, #2563eb, #3b6ff0); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }
.sidebar-nav a.active i { color: #fff; }
.sidebar-foot { padding: 12px 18px; font-size: .75rem; color: #7183ad; border-top: 1px solid rgba(255, 255, 255, .06); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pid-border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 1030;
}
.topbar .search { position: relative; max-width: 380px; flex: 1; }
.topbar .search input { padding-left: 38px; background: #f3f6fb; border-color: transparent; border-radius: 10px; }
.topbar .search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--pid-muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem;
  background: linear-gradient(135deg, #dbe6ff, #c7d7fe); color: #1d4ed8; overflow: hidden; flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.content { padding: 24px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.45rem; font-weight: 750; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--pid-muted); margin: 2px 0 0; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 20, 48, .45); z-index: 1035; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* Panels & cards ---------------------------------------------------------- */
.panel { background: var(--pid-card); border: 1px solid var(--pid-border); border-radius: var(--pid-radius); box-shadow: var(--pid-shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--pid-border); }
.panel-head h2, .panel-head h3 { font-size: 1.05rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.panel-head h2 i, .panel-head h3 i { color: var(--pid-blue); font-size: 1.2rem; }
.panel-body { padding: 20px; }
.panel-body.p-0 .table { margin: 0; }

.hero {
  border-radius: 18px; padding: 30px 32px; color: #fff; position: relative; overflow: hidden; min-height: 180px;
  background: radial-gradient(circle at 85% 20%, rgba(96, 165, 250, .45), transparent 45%), linear-gradient(120deg, #0f1d42 0%, #1e3a8a 55%, #2563eb 100%);
}
.hero h1 { font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; margin-bottom: 6px; }
.hero p { color: #d6e2ff; max-width: 520px; }
.hero .chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: .78rem; margin: 4px 6px 0 0; }
.hero-cards { position: absolute; right: 26px; bottom: -14px; display: flex; gap: 0; }
.hero-cards canvas, .hero-cards .ph { width: 96px; height: 152px; border-radius: 8px; background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.hero-cards > *:nth-child(1) { transform: rotate(-9deg) translate(18px, 10px); }
.hero-cards > *:nth-child(2) { transform: translateY(-8px); z-index: 2; }
.hero-cards > *:nth-child(3) { transform: rotate(9deg) translate(-18px, 10px); }
@media (max-width: 1199.98px) { .hero-cards { display: none; } }

.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid transparent; color: var(--pid-text); height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--pid-shadow); color: var(--pid-text); }
.quick-action .qa-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.25rem; flex: 0 0 auto; }
.quick-action .t { font-weight: 650; font-size: .9rem; }
.quick-action .s { font-size: .76rem; color: var(--pid-muted); }
.qa-green { background: #e8f8ef; } .qa-green .qa-icon { background: #16a34a; }
.qa-purple { background: #f1ecfe; } .qa-purple .qa-icon { background: #7c3aed; }
.qa-blue { background: #e8f0fe; } .qa-blue .qa-icon { background: #2563eb; }
.qa-orange { background: #fff1e8; } .qa-orange .qa-icon { background: #ea580c; }
.qa-pink { background: #fdecf1; } .qa-pink .qa-icon { background: #e11d48; }

.stat { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat .stat-icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.35rem; }
.stat .label { color: var(--pid-muted); font-size: .82rem; }
.stat .value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat .trend { margin-left: auto; font-size: .78rem; font-weight: 600; color: #16a34a; align-self: flex-end; white-space: nowrap; }
.bg-g-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-g-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.bg-g-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.bg-g-orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.bg-g-pink { background: linear-gradient(135deg, #f472b6, #be185d); }
.bg-g-slate { background: linear-gradient(135deg, #64748b, #334155); }

.info-list { margin: 0; }
.info-list .row-i { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--pid-border); font-size: .86rem; }
.info-list .row-i:last-child { border-bottom: 0; }
.info-list .k { color: var(--pid-muted); }
.info-list .v { font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.req-mini { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .85rem; border-bottom: 1px solid #f1f3f8; }
.req-mini:last-child { border: 0; }
.req-mini i { font-size: 1rem; }

/* Tables ------------------------------------------------------------------- */
.table { --bs-table-border-color: #eef1f6; vertical-align: middle; }
.table > thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pid-muted); font-weight: 650; background: #f8fafd; border-bottom-width: 1px; white-space: nowrap; }
.table td { font-size: .88rem; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-radius: 8px; }
.btn-soft-primary { background: var(--pid-blue-100); color: var(--pid-blue-600); border: 0; }
.btn-soft-primary:hover { background: var(--pid-blue); color: #fff; }
.btn-soft-dark { background: #eceff5; color: #2b3245; border: 0; }
.btn-soft-dark:hover { background: #2b3245; color: #fff; }
.btn-soft-danger { background: #fdecec; color: #c62a2a; border: 0; }
.btn-soft-danger:hover { background: #dc2626; color: #fff; }
.btn-soft-success { background: #e3f8ec; color: #11845b; border: 0; }
.btn-soft-success:hover { background: #16a34a; color: #fff; }
.btn-soft-warning { background: #fff4dd; color: #a86500; border: 0; }
.btn-soft-warning:hover { background: #d97706; color: #fff; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--pid-muted); }
.empty-state > i { font-size: 2.6rem; color: #b7c3dc; display: block; margin-bottom: 10px; }
.empty-state h3 { font-size: 1.05rem; color: var(--pid-text); font-weight: 700; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .form-control, .filters .form-select { max-width: 220px; }

/* Template gallery ----------------------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.tpl-card { border: 1px solid var(--pid-border); border-radius: 12px; padding: 10px; background: #fff; position: relative; transition: box-shadow .15s ease, border-color .15s ease; }
.tpl-card:hover { box-shadow: var(--pid-shadow); }
.tpl-card.selected { border-color: var(--pid-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.tpl-thumb { background: #eef2f8; border-radius: 8px; display: grid; place-items: center; aspect-ratio: 54 / 85.6; overflow: hidden; position: relative; }
.tpl-thumb.landscape { aspect-ratio: 85.6 / 54; }
.tpl-thumb canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.tpl-thumb .spinner-border { position: absolute; }
.tpl-name { font-weight: 600; font-size: .86rem; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.tpl-meta { font-size: .74rem; color: var(--pid-muted); }

/* Forms ---------------------------------------------------------------------- */
.photo-drop { border: 2px dashed #cdd6e6; border-radius: 12px; padding: 14px; display: flex; gap: 14px; align-items: center; background: #fafbfe; }
.photo-drop img, .photo-drop .ph { width: 64px; height: 78px; object-fit: cover; border-radius: 8px; background: #e9eef7; display: grid; place-items: center; color: #9aa7c2; font-size: 1.6rem; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--pid-muted); margin: 6px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; border-top: 1px solid var(--pid-border); }

/* Card generator: three panels ---------------------------------------------- */
.gen-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.gen-left, .gen-right { position: sticky; top: 84px; }
.gen-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--pid-text); font-weight: 500; font-size: .88rem; }
.gen-nav a:hover { background: #f1f4fa; }
.gen-nav a i { color: var(--pid-blue); }
.gen-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gen-tpls label { cursor: pointer; }
.gen-tpls input { position: absolute; opacity: 0; }
.gen-tpls .tpl-thumb { border: 2px solid transparent; border-radius: 8px; }
.gen-tpls input:checked + .tpl-thumb { border-color: var(--pid-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.gen-tpls .n { font-size: .72rem; text-align: center; margin-top: 4px; font-weight: 550; }
.preview-stage { background: repeating-conic-gradient(#eef1f6 0% 25%, #f7f9fc 0% 50%) 50% / 18px 18px; border-radius: 12px; padding: 18px; display: flex; justify-content: center; align-items: center; min-height: 360px; }
.preview-stage .card-canvas { box-shadow: 0 10px 30px rgba(16, 24, 40, .22); border-radius: 6px; background: #fff; max-width: 100%; }
.side-toggle .btn { font-size: .8rem; }
@media (max-width: 1399.98px) { .gen-layout { grid-template-columns: 200px minmax(0, 1fr) 320px; } }
@media (max-width: 1199.98px) {
  .gen-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .gen-left { grid-column: 1 / -1; position: static; }
  .gen-left .gen-nav { display: none; }
  .gen-tpls { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}
@media (max-width: 767.98px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-right { position: static; order: -1; }
}

/* Template editor ------------------------------------------------------------- */
.editor { display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.editor-palette .btn { text-align: left; width: 100%; margin-bottom: 4px; font-size: .82rem; display: flex; gap: 8px; align-items: center; }
.editor-stage-wrap { background: #e9edf4; border-radius: 12px; overflow: auto; height: calc(100vh - 250px); min-height: 480px; position: relative; }
.editor-stage { position: relative; margin: 40px auto; box-shadow: 0 10px 30px rgba(16, 24, 40, .25); background: #fff; }
.editor-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.editor-stage .handles { position: absolute; inset: 0; }
.fbox { position: absolute; border: 1px dashed rgba(37, 99, 235, .75); cursor: move; touch-action: none; }
.fbox:hover { background: rgba(37, 99, 235, .06); }
.fbox.sel { border: 1.5px solid #2563eb; background: rgba(37, 99, 235, .08); z-index: 5; }
.fbox.hidden-field { border-color: rgba(120, 120, 120, .6); opacity: .55; }
.fbox .tag { position: absolute; top: -18px; left: -1px; font-size: 10px; line-height: 16px; padding: 0 5px; background: #2563eb; color: #fff; border-radius: 4px 4px 4px 0; white-space: nowrap; pointer-events: none; display: none; }
.fbox.sel .tag, .fbox:hover .tag { display: block; }
.fbox .rh { position: absolute; width: 10px; height: 10px; background: #fff; border: 1.5px solid #2563eb; border-radius: 2px; display: none; }
.fbox.sel .rh { display: block; }
.rh.nw { left: -6px; top: -6px; cursor: nwse-resize; } .rh.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.rh.sw { left: -6px; bottom: -6px; cursor: nesw-resize; } .rh.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.rh.n { left: calc(50% - 5px); top: -6px; cursor: ns-resize; } .rh.s { left: calc(50% - 5px); bottom: -6px; cursor: ns-resize; }
.rh.w { top: calc(50% - 5px); left: -6px; cursor: ew-resize; } .rh.e { top: calc(50% - 5px); right: -6px; cursor: ew-resize; }
.editor-props { max-height: calc(100vh - 200px); overflow-y: auto; }
.editor-props .form-control, .editor-props .form-select { font-size: .82rem; padding: .3rem .5rem; }
.editor-props .form-label { font-size: .76rem; margin-bottom: .15rem; color: var(--pid-muted); }
.editor-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.field-list { max-height: 260px; overflow-y: auto; }
.field-list a { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; border-radius: 7px; color: var(--pid-text); font-size: .8rem; }
.field-list a.active { background: var(--pid-blue-100); color: var(--pid-blue-600); }
.field-list a:hover { background: #f1f4fa; }
@media (max-width: 1199.98px) { .editor { grid-template-columns: 1fr; } .editor-stage-wrap { height: 60vh; } .editor-props { max-height: none; } }

/* PDF page picker */
.page-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.page-picker .pp { border: 2px solid var(--pid-border); border-radius: 10px; padding: 8px; background: #fff; text-align: center; }
.page-picker .pp canvas { max-width: 100%; height: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.page-picker .pp.front { border-color: #2563eb; }
.page-picker .pp.back { border-color: #16a34a; }

/* Login / public ---------------------------------------------------------------- */
.auth-body { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-art { background: radial-gradient(circle at 80% 15%, rgba(96, 165, 250, .5), transparent 40%), linear-gradient(140deg, #0a1430 0%, #1e3a8a 60%, #2563eb 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; }
.auth-art p { color: #d6e2ff; max-width: 440px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-form form { width: 100%; max-width: 380px; }
@media (max-width: 991.98px) { .auth-body { grid-template-columns: 1fr; } .auth-art { display: none; } }
.public-body { background: var(--pid-bg); min-height: 100vh; }
.verify-card { max-width: 520px; margin: 40px auto; }
.verify-status { border-radius: 16px 16px 0 0; padding: 26px; color: #fff; text-align: center; }
.verify-status.with-photo { padding-bottom: 62px; }
.verify-status i { font-size: 3rem; display: block; }
.verify-status.valid { background: linear-gradient(135deg, #16a34a, #15803d); }
.verify-status.invalid { background: linear-gradient(135deg, #dc2626, #991b1b); }
.verify-status.warning { background: linear-gradient(135deg, #f59e0b, #b45309); }
.verify-photo { width: 110px; height: 132px; object-fit: cover; border-radius: 10px; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); margin-top: -50px; background: #eef2f8; }

/* Installer --------------------------------------------------------------------- */
.install-body { background: var(--pid-bg); }
.install-shell { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.install-aside { background: linear-gradient(180deg, var(--pid-navy-800), var(--pid-navy-900)); color: #c8d2ee; padding: 28px 22px; display: flex; flex-direction: column; }
.install-steps { list-style: none; padding: 0; margin: 0; flex: 1; }
.install-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; color: #8fa0c8; font-weight: 500; position: relative; }
.install-steps li .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #34477a; font-size: .85rem; font-weight: 700; flex: 0 0 auto; }
.install-steps li.current { color: #fff; }
.install-steps li.current .num { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 0 0 5px rgba(37, 99, 235, .25); }
.install-steps li.done { color: #c8d2ee; }
.install-steps li.done .num { background: #16a34a; border-color: #16a34a; color: #fff; }
.install-aside-foot { font-size: .75rem; color: #6c7da6; }
.install-main { display: flex; align-items: flex-start; justify-content: center; padding: 48px 24px; }
.install-card { background: #fff; border-radius: 18px; box-shadow: var(--pid-shadow); border: 1px solid var(--pid-border); padding: 36px; width: 100%; max-width: 760px; }
.install-hero-icon { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 12px 26px rgba(37, 99, 235, .35); }
.install-hero-icon.success { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 12px 26px rgba(22, 163, 74, .35); }
.install-hero-icon.danger { background: linear-gradient(135deg, #f87171, #b91c1c); }
.install-feature { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--pid-border); border-radius: 12px; height: 100%; }
.install-feature > i { font-size: 1.4rem; color: var(--pid-blue); }
.req-list { border: 1px solid var(--pid-border); border-radius: 12px; overflow: hidden; }
.req-item { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--pid-border); font-size: .9rem; }
.req-item:last-child { border-bottom: 0; }
.req-item > i { font-size: 1.1rem; margin-top: 1px; }
.req-pass > i { color: #16a34a; } .req-warn > i { color: #d97706; } .req-fail > i { color: #dc2626; } .req-pending > i { color: #94a3b8; }
.req-fail { background: #fff7f7; } .req-warn { background: #fffcf3; }
.install-summary dt { font-weight: 500; color: var(--pid-muted); }
.install-summary dd { font-weight: 550; }
.install-results li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--pid-border); }
.install-results li i { font-size: 1.15rem; }
.install-results li.ok i { color: #16a34a; } .install-results li.bad i { color: #dc2626; }
.theme-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; }
.theme-swatch { width: 62px; height: 92px; border-radius: 8px; border: 2px solid var(--pid-border); background: linear-gradient(180deg, var(--sw) 0 26%, #fff 26% 88%, var(--ink) 88%); display: flex; justify-content: center; padding-top: 6px; }
.theme-swatch b { color: #fff; font-size: .7rem; letter-spacing: .03em; }
.theme-option input:checked + .theme-swatch { border-color: var(--pid-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
@media (max-width: 767.98px) { .install-shell { grid-template-columns: 1fr; } .install-aside { padding: 18px; } .install-steps { display: none; } .install-card { padding: 22px; } }

/* Misc ---------------------------------------------------------------------------- */
.toast-container { z-index: 1090; }
.kbd-hint { font-size: .72rem; color: var(--pid-muted); }
.code-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; background: #f1f4fa; padding: 2px 6px; border-radius: 5px; }
.audit-details { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; color: var(--pid-muted); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-video { width: 100%; max-height: 320px; border-radius: 12px; background: #000; }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .main { margin: 0; } }

/* PDF import: detected content ---------------------------------------------- */
.detect-stage { background: #e9edf4; border-radius: 12px; padding: 14px; text-align: center; min-height: 200px; }
.detect-wrap { position: relative; display: inline-block; box-shadow: 0 6px 20px rgba(16, 24, 40, .18); line-height: 0; }
.detect-wrap canvas { display: block; max-width: 100%; }
.dbox { position: absolute; border: 1px dashed rgba(100, 116, 139, .75); background: rgba(100, 116, 139, .06); cursor: pointer; border-radius: 2px; }
.dbox:hover { border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.dbox-on { border: 2px solid #2563eb; background: rgba(37, 99, 235, .14); }
.dbox-remove { border: 2px solid #dc2626; background: rgba(220, 38, 38, .14); }
.dbox .dtag { position: absolute; left: -2px; top: -17px; font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 4px 4px 4px 0; background: #2563eb; color: #fff; white-space: nowrap; pointer-events: none; }
.dbox-remove .dtag { background: #dc2626; }
.detect-list { max-height: 640px; overflow-y: auto; border: 1px solid var(--pid-border); border-radius: 10px; }
.drow { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 6px 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--pid-border); transition: background .3s; }
.drow:last-child { border-bottom: 0; }
.drow.on { background: #f3f7ff; }
.drow.rm { background: #fff6f6; }
.drow.flash { background: #fff4c2; }
.drow .dtext { font-size: .85rem; overflow-wrap: anywhere; }
.drow .dextra { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.drow .dextra label { font-size: .74rem; color: var(--pid-muted); white-space: nowrap; }
@media (max-width: 575.98px) { .drow { grid-template-columns: 1fr; } }

/* ---------- 2.0: platform, subscriptions, plans ---------- */
.impersonation-bar { background: #fff4d6; color: #6b4a00; border-bottom: 1px solid #f3dd9b; padding: 8px 24px; font-size: .85rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.usage-row { margin-top: 10px; }
.usage-row .progress { height: 6px; margin-top: 4px; }
.sub-card.sub-expired, .sub-card.sub-suspended, .sub-card.sub-cancelled { border-color: #f5c2c7; }
.sub-card.sub-past_due, .sub-card.sub-pending_payment { border-color: #f3dd9b; }
.rev-chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding-top: 18px; }
.rev-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.rev-bar { width: 100%; max-width: 56px; background: linear-gradient(180deg, #3b82f6, #1d4ed8); border-radius: 8px 8px 3px 3px; }
.rev-val { font-size: .7rem; color: var(--pid-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rev-lbl { font-size: .78rem; color: var(--pid-muted); margin-top: 6px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.plan-card { display: flex; flex-direction: column; }
.plan-card .panel-body { display: flex; flex-direction: column; height: 100%; }
.plan-card ul { flex: 1; }
.plan-current { border-color: var(--pid-blue) !important; box-shadow: 0 0 0 3px var(--pid-blue-100); }
.signup-plan { display: flex; align-items: center; gap: 12px; border: 1px solid var(--pid-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.signup-plan:has(input:checked), .signup-plan.active { border-color: var(--pid-blue); background: var(--pid-blue-100); }
.signup-plan .form-check-input { margin: 0; flex-shrink: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pay-instructions { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; white-space: normal; }
.perm-table th { white-space: nowrap; font-size: .8rem; }
.perm-table td .form-check-input { width: 1.15rem; height: 1.15rem; }
@media (max-width: 575.98px) { .rev-chart { gap: 6px; } .rev-val { display: none; } }
.page-head h1 .badge { font-size: .72rem; vertical-align: middle; font-weight: 600; }
.panel-head .form-select-sm { width: auto; min-width: 92px; }

/* ---------- 2.1: form builder ---------- */
.fb-name { max-width: 520px; background: transparent; }
.fb-name:focus { background: #fff; }
.fb-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1399.98px) { .fb-layout { grid-template-columns: 180px minmax(0, 1fr) 320px; } }
@media (max-width: 1099.98px) { .fb-layout { grid-template-columns: 1fr; } .fb-palette .panel-body { display: flex; flex-wrap: wrap; gap: 6px; } .fb-type { width: auto !important; } }
.fb-palette, .fb-props { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.fb-type { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--pid-border); background: #fff; border-radius: 9px; padding: 7px 10px; margin-bottom: 6px; font-size: .84rem; text-align: left; }
.fb-type:hover { border-color: var(--pid-blue); background: var(--pid-blue-100); }
.fb-type i { color: var(--pid-blue); }
.fb-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--pid-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.fb-item:hover { border-color: #b9c8ec; }
.fb-item.selected { border-color: var(--pid-blue); box-shadow: 0 0 0 3px var(--pid-blue-100); }
.fb-item-section { background: #f4f7fd; margin-top: 14px; }
.fb-item-section .fb-label { font-weight: 700; }
.fb-item.dragging { opacity: .45; }
.fb-item.drop-before { box-shadow: inset 0 3px 0 var(--pid-blue); }
.fb-item.drop-after { box-shadow: inset 0 -3px 0 var(--pid-blue); }
.fb-grip { color: #94a3b8; cursor: grab; font-size: 1.1rem; }
.fb-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--pid-blue-100); color: var(--pid-blue); display: grid; place-items: center; flex-shrink: 0; }
.fb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fb-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-hi { font-size: .8rem; color: var(--pid-muted); }
.fb-meta { font-size: .74rem; color: var(--pid-muted); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fb-meta .badge { font-weight: 600; }
.fb-actions { display: flex; gap: 2px; opacity: .55; }
.fb-item:hover .fb-actions, .fb-item.selected .fb-actions { opacity: 1; }
.fb-actions .btn { padding: 2px 6px; }
.embed-code { position: relative; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px 90px 12px 14px; }
.embed-code pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: .8rem; }
.embed-code code { color: inherit; }
.embed-code .btn { position: absolute; top: 8px; right: 8px; }
.embed-tabs .nav-link { padding: .3rem .8rem; font-size: .85rem; }
.reg-data dt { font-weight: 600; color: var(--pid-muted); font-size: .82rem; }
.reg-data dd { margin-bottom: .7rem; }
.reg-doc { display: flex; gap: 10px; align-items: center; border: 1px solid var(--pid-border); border-radius: 10px; padding: 8px 10px; }
.reg-doc img { width: 56px; height: 66px; object-fit: cover; border-radius: 6px; }

/* ---------- online payments (2.2) ---------- */
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line, #e5e7eb); background: #fafbfd; border-radius: 0 0 14px 14px; }
.pay-methods { display: grid; gap: 10px; }
.pay-method { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; border: 1px solid #dbe2ee; border-radius: 12px; padding: 12px 16px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.pay-method:hover, .pay-method:focus-visible { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.pay-method > .bi:first-child { font-size: 1.5rem; color: #2563eb; width: 32px; text-align: center; }
.pay-method span { display: flex; flex-direction: column; line-height: 1.25; }
.pay-method small { color: #6b7489; }
.pay-card { max-width: 440px; }
.pay-spinner { margin-bottom: 12px; }
.pay-result-icon { font-size: 3.2rem; }
.gw-payload { max-height: 520px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
.gw-card h2 { font-weight: 700; }

/* ---------- notifications (2.3) ---------- */
.notif-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; font-size: 1.15rem; }
.notif-bell:hover { background: #eef2f9; }
.notif-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: .66rem; font-weight: 700; line-height: 18px; text-align: center; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); }
.notif-item { display: block; white-space: normal; padding: .6rem 1rem; border-bottom: 1px solid #eef1f6; }
.notif-item .t { display: block; font-weight: 600; font-size: .86rem; }
.notif-item .b { display: block; font-size: .8rem; color: #5b6478; }
.notif-item .w { display: block; font-size: .72rem; color: #8a93a6; margin-top: 2px; }
.notif-item.unread { background: #f3f7ff; }
.notif-list .notif-row { display: flex; gap: .85rem; padding: .85rem 1rem; border-bottom: 1px solid #eef1f6; color: inherit; text-decoration: none; }
.notif-list .notif-row:hover { background: #f8fafc; }
.notif-list .notif-row.unread { background: #f3f7ff; }
.notif-list .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: .45rem; flex: none; background: transparent; }
.notif-list .unread .dot { background: #2563eb; }
.ch-matrix th, .ch-matrix td { vertical-align: middle; }
.ch-matrix td.ch { text-align: center; width: 96px; }
.ch-matrix .na { color: #b8bfcc; }
.tpl-vars .btn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.tpl-preview { background: #f2f5fb; border: 1px solid #e6eaf2; border-radius: 10px; padding: 1rem; font-size: .9rem; }
.tpl-preview .txt { white-space: pre-wrap; }
.tpl-preview.sms { max-width: 360px; background: #e9f7ef; border-color: #cfe9d9; border-radius: 14px 14px 14px 4px; }
.tpl-preview .subj { font-weight: 700; margin-bottom: .5rem; white-space: normal; }
.mail-frame { width: 100%; height: 520px; border: 1px solid #e6eaf2; border-radius: 10px; background: #fff; }

/* ---------- appearance editor (2.3) ---------- */
.color-row { display: flex; align-items: center; gap: .85rem; padding: .55rem 0; border-bottom: 1px solid #eef1f6; }
.color-row:last-of-type { border-bottom: 0; }
.color-row .form-control-color { width: 52px; height: 40px; padding: .2rem; flex: none; }
.appearance-sticky { position: sticky; top: 84px; }
.ap-preview { --ap-site_primary: #0b1f4d; --ap-site_accent: #1a56db; --ap-site_cta: #ffc61a; --ap-cta-ink: #14213d; --ap-app_sidebar: #0f1d42; --ap-side-ink: #c8d2ee; --ap-app_primary: #2563eb; --ap-verify: #2563eb; display: grid; gap: 16px; font-size: .82rem; }
.ap-site, .ap-app, .ap-verify { border: 1px solid #e3e9f3; border-radius: 12px; overflow: hidden; background: #fff; }
.ap-nav { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid #eef1f6; color: var(--ap-site_primary); }
.ap-logo { margin-right: auto; color: var(--ap-site_primary); }
.ap-hero { padding: 18px 16px; background: linear-gradient(180deg, #f6f9ff, #fff); }
.ap-kicker { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-site_accent); }
.ap-title { font-size: 1.15rem; font-weight: 800; color: var(--ap-site_primary); margin: 4px 0 6px; line-height: 1.25; }
.ap-lead { color: #5d6b85; margin-bottom: 10px; }
.ap-btn { display: inline-block; padding: 5px 12px; border-radius: 8px; font-weight: 700; font-size: .78rem; }
.ap-cta { background: var(--ap-site_cta); color: var(--ap-cta-ink); }
.ap-outline { border: 1.5px solid var(--ap-site_accent); color: var(--ap-site_primary); }
.ap-link { color: var(--ap-site_accent); font-weight: 600; margin-left: 6px; text-decoration: underline; }
.ap-foot { background: var(--ap-site_primary); color: rgba(255,255,255,.8); padding: 8px 14px; font-size: .72rem; }
.ap-app { display: flex; min-height: 130px; }
.ap-side { width: 130px; background: var(--ap-app_sidebar); color: var(--ap-side-ink); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ap-side b { margin-bottom: 4px; }
.ap-side .on { background: rgba(255,255,255,.14); border-radius: 6px; padding: 3px 6px; margin: 0 -6px; font-weight: 600; }
.ap-main { flex: 1; background: #f2f5fb; padding: 12px; }
.ap-card { background: #fff; border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px; }
.ap-line { height: 8px; background: #e9edf5; border-radius: 4px; margin: 8px 0; }
.ap-line.short { width: 60%; }
.ap-prim { background: var(--ap-app_primary); color: #fff; }
.ap-link2 { color: var(--ap-app_primary); font-weight: 600; margin-left: 6px; }
.ap-verify { border-top: 5px solid var(--ap-verify); }
.ap-vhead { text-align: center; padding: 10px; }
.ap-vhead img { max-height: 34px; display: block; margin: 0 auto 4px; }
.ap-vorg { color: var(--ap-verify); }
.ap-vstatus { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; text-align: center; padding: 10px; font-weight: 700; }
.ap-vbody { padding: 10px 14px; }
.ap-vnote { color: #5d6b85; white-space: pre-wrap; }
.verify-note { white-space: pre-wrap; }

/* ---------- reports & charts (2.3) ---------- */
.kpi { display: flex; flex-direction: column; gap: .2rem; }
.kpi b { font-size: 1.55rem; font-weight: 700; color: var(--pid-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.chart-fig { margin: 0; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid { stroke: #e9edf4; stroke-width: 1; }
.chart-svg .base { stroke: #b8c0cf; stroke-width: 1; }
.chart-svg .axis { fill: #6b7489; font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg path { transition: opacity .12s; }
.chart-svg rect:hover + path, .chart-svg path:hover { opacity: .8; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: #4b5568; margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-table summary { font-size: .78rem; color: #6b7489; cursor: pointer; margin-top: 6px; }
.chart-empty { color: #8a93a6; font-size: .85rem; padding: 1.5rem 0; text-align: center; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .84rem; }
.hbar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3b4663; }
.hbar .track { height: 12px; background: #f0f3f8; border-radius: 0 4px 4px 0; }
.hbar .fill { display: block; height: 100%; min-width: 2px; background: #2a78d6; border-radius: 0 4px 4px 0; }
.hbar .v { font-variant-numeric: tabular-nums; color: #18213a; font-weight: 600; min-width: 2.5rem; text-align: right; }

/* ---------- website editor (2.4) ---------- */
.site-tile { transition: border-color .15s, box-shadow .15s; }
.site-tile:hover { border-color: var(--pid-blue); box-shadow: 0 6px 18px rgba(37, 99, 235, .12); }
.site-tile-icon { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--pid-blue-100); color: var(--pid-blue); font-size: 1.2rem; }
.site-rows { display: grid; gap: 10px; margin-bottom: 10px; }
.site-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px 10px 2px; background: #fbfcfe; }
.site-row-fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 10px; min-width: 0; }
.site-row-field.site-row-textarea, .site-row-field.site-row-lines { grid-column: 1 / -1; }
.site-row-field .mb-3 { margin-bottom: .5rem !important; }
.site-row-tools { flex: none; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.media-grid.small-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.media-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 14px 14px 0 0; display: block; background: #f2f5fb; }
.media-thumb { padding: 0; border: 1px solid #e6eaf2; border-radius: 8px; overflow: hidden; background: #fff; aspect-ratio: 1; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb:hover { border-color: var(--pid-blue); }

/* ---------------------------------------------------------------- 2.5 Joining Letter Management */
.sidebar-nav details.nav-group { margin-bottom: 2px; }
.sidebar-nav details.nav-group > summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #c8d2ee; font-weight: 500; cursor: pointer;
}
.sidebar-nav details.nav-group > summary::-webkit-details-marker { display: none; }
.sidebar-nav details.nav-group > summary i:first-child { font-size: 1.1rem; width: 20px; text-align: center; color: #9fb0d8; }
.sidebar-nav details.nav-group > summary:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-nav details.nav-group > summary.active { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav details.nav-group > summary.active i:first-child { color: #ffb347; }
.sidebar-nav .nav-caret { margin-left: auto; font-size: .75rem; transition: transform .15s; }
.sidebar-nav details[open] > summary .nav-caret { transform: rotate(180deg); }
.sidebar-nav .nav-sub { padding: 2px 0 6px 18px; border-left: 1px solid rgba(255, 255, 255, .08); margin-left: 21px; }
.sidebar-nav .nav-sub a { padding: 6px 10px; font-size: .86rem; }
.sidebar-nav .nav-sub a i { font-size: .95rem; }
.sidebar-nav .nav-badge { background: #ff9933; color: #1b1300; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: 1px 7px; margin-left: auto; }
.sidebar-nav details.nav-group > summary .nav-badge + .nav-caret { margin-left: 6px; }

.lt-hero { background: linear-gradient(120deg, #0b1f4b 0%, #1e3a8a 60%, #2563eb 100%); color: #fff; border-radius: 18px; padding: 22px 26px; position: relative; overflow: hidden; }
.lt-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 153, 51, .18); }
.lt-hero h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 4px; }
.lt-hero p { margin: 0; opacity: .85; }
.lt-hero .btn-saffron, .btn-saffron { background: #ff9933; border-color: #ff9933; color: #1b1300; font-weight: 600; }
.btn-saffron:hover { background: #f08a1f; border-color: #f08a1f; color: #1b1300; }
.lt-stat .value { font-size: 1.6rem; }
.lt-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-steps .lt-step { flex: 1 1 110px; border-radius: 10px; padding: 8px 10px; background: #f3f6fb; font-size: .78rem; color: #475569; border: 1px solid transparent; }
.lt-steps .lt-step.done { background: #e8f5ee; color: #166534; }
.lt-steps .lt-step.now { background: #fff4e6; color: #9a4b00; border-color: #ffcf99; font-weight: 600; }
.lt-steps .lt-step.bad { background: #fdecec; color: #991b1b; }
.lt-section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #1e3a8a; border-left: 3px solid #ff9933; padding-left: 8px; margin: 4px 0 12px; }
.lt-style-card { border: 2px solid var(--pid-border); border-radius: 12px; padding: 10px; cursor: pointer; display: block; height: 100%; background: #fff; }
.lt-style-card:hover { border-color: #93c5fd; }
.lt-style-card input { position: absolute; opacity: 0; }
.lt-style-card.checked, .lt-style-card:has(input:checked) { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.lt-swatch { height: 46px; border-radius: 8px; margin-bottom: 8px; position: relative; overflow: hidden; background: #f8fafc; border: 1px solid #e2e8f0; }
.lt-swatch span { position: absolute; display: block; }
.lt-asset { border: 1px solid var(--pid-border); border-radius: 12px; padding: 10px; background: #fff; height: 100%; }
.lt-asset .pic { height: 90px; display: grid; place-items: center; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 50% / 14px 14px; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.lt-asset .pic img { max-height: 86px; max-width: 100%; object-fit: contain; }
.lt-placeholders code { cursor: pointer; display: inline-block; margin: 0 4px 4px 0; background: #eef2ff; color: #1e3a8a; padding: 2px 6px; border-radius: 6px; font-size: .78rem; }
.lt-placeholders code:hover { background: #ff9933; color: #1b1300; }

/* Letter preview (A4 at 1:1 in millimetres, scaled to fit by letters.js) */
.lt-stage { background: #e9eef6; border-radius: 14px; padding: 14px; overflow: auto; position: relative; }
.lt-stage.busy::before { content: "Updating preview…"; position: absolute; top: 10px; right: 14px; z-index: 5; font-size: .75rem; background: #1e3a8a; color: #fff; padding: 2px 10px; border-radius: 999px; }
.lt-scale { transform-origin: top left; }
.lt-paper { width: 210mm; min-height: 297mm; background: #fff; position: relative; box-shadow: 0 6px 24px rgba(15, 23, 42, .18); overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 296.6mm, #c7d2fe 296.6mm, #c7d2fe 297mm); }
.lt-paper * { box-sizing: border-box; }
.lt-op { position: absolute; margin: 0; }
.lt-t { white-space: nowrap; overflow: hidden; line-height: 1; }
.lt-img { object-fit: contain; }
.lt-img.lt-box { background: #fff; outline: 2mm solid #fff; border-radius: 1mm; }
.lt-letterhead { position: absolute; left: 0; top: 0; width: 210mm; }
.lt-letterhead-ph { position: absolute; left: 6mm; right: 6mm; top: 4mm; border: 0.5mm dashed #94a3b8; border-radius: 2mm; display: grid; place-items: center; color: #64748b; font-size: 11pt; }
.lt-watermark { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-35deg); font: 700 54pt Helvetica, Arial, sans-serif; color: #f3d0d0; white-space: nowrap; pointer-events: none; }
.lt-content { position: relative; }
.lt-content p { margin: 0; }
.lt-refdate { display: flex; justify-content: space-between; gap: 6mm; }
.lt-recipient { display: flex; justify-content: space-between; gap: 6mm; align-items: flex-start; }
.lt-photo { object-fit: cover; border: 0.3mm solid #cbd5e1; flex: 0 0 auto; }
.lt-subject { font-weight: 700; }
.lt-subject span { text-decoration: underline; text-underline-offset: 0.8mm; text-decoration-thickness: 0.25mm; }
.lt-heading { font-weight: 700; color: var(--lt-primary); }
.lt-list { margin: 0; padding-left: 7mm; }
.lt-list li { margin-bottom: 0.4mm; }
.lt-sign { position: relative; }
.lt-signoff { font-weight: 700; white-space: nowrap; }
.lt-sig img { display: block; max-width: 100%; object-fit: contain; object-position: left center; }
.lt-nowrap { white-space: nowrap; }
.lt-qr svg { width: 100%; height: auto; display: block; }
.lt-qr div { font: 6.5pt Helvetica, Arial, sans-serif; color: #6b7280; text-align: center; }
.lt-disclaimer { border-top: 0.3mm solid #e5e7eb; margin-top: 1mm; padding-top: 1.5mm; font-size: 7.5pt; font-style: italic; color: #6b7280; line-height: 1.36; }
.lt-slot { border: 0.4mm dashed #94a3b8; border-radius: 1mm; color: #94a3b8; display: grid; place-items: center; font: 8pt Helvetica, Arial, sans-serif; }
.lt-editable [data-el] { cursor: move; outline: 0.4mm dashed rgba(37, 99, 235, .55); outline-offset: 0.6mm; }
.lt-editable [data-el]:hover, .lt-editable [data-el].dragging { outline: 0.5mm solid #ff9933; z-index: 4; }
.lt-editor-panel .accordion-button { font-weight: 600; font-size: .92rem; }
.lt-verify-box { max-width: 560px; margin: 0 auto; }
@media (max-width: 991.98px) { .lt-sticky { position: static !important; } }
@media print {
  body.lt-print { background: #fff; }
  body.lt-print .no-print { display: none !important; }
  body.lt-print .lt-paper { box-shadow: none; background-image: none; }
}

/* Registration payments (2.6) */
.regpay-shot img { max-width: 100%; max-height: 70vh; border: 1px solid #e3e9f5; border-radius: 12px; background: #f8fafd; }
.regpay-history li { border-left: 3px solid #e3e9f5; padding-left: 10px; }

/* Back-side details (2.7) */
.bd-stage { background: repeating-conic-gradient(#eef2f8 0% 25%, #f8fafd 0% 50%) 50% / 18px 18px; border-radius: 12px; padding: 14px; display: flex; justify-content: center; min-height: 200px; }
.bd-stage canvas { box-shadow: 0 6px 22px rgba(11, 27, 63, .18); border-radius: 6px; background: #fff; max-width: 100%; height: auto; }
