/* Fiscit design layer, loaded after the theme (style.css) and custom.css.
   Shell: top bar, sidebar, page header. Shared components: .vr-* (cards, tables, tags, buttons). */

:root {
  --fx-navy: #12273d;
  --fx-ink: #1E2F45;
  --fx-green: #169D53;
  --fx-muted: #6B7280;
  --fx-line: #CBD2DA;
  --fx-soft: #E9EDF2;
  --fx-bg: #F3F5F8;
}

body, .content-page { background: var(--fx-bg); }

/* ------------------------------------------------------------- top bar */
.topbar .navbar-default { background: var(--fx-navy); border: 0; min-height: 70px; margin: 0; border-radius: 0; }
.fx-bar { display: flex; align-items: center; gap: 14px; height: 70px; padding: 0 20px 0 8px; }
.fx-burger { position: static !important; float: none !important; flex: none; width: 44px; height: 44px; margin: 0 !important;
  border: 0; border-radius: 10px; background: transparent; color: #fff; font-size: 26px; line-height: 44px; }
.fx-burger:hover { background: rgba(255,255,255,.08); }
.fx-search { flex: 1 1 auto; max-width: 520px; position: relative; margin: 0; }
.fx-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.55); }
.fx-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08); color: #fff; padding: 0 14px 0 38px; outline: none; font-size: 14px; }
.fx-search input::placeholder { color: rgba(255,255,255,.55); }
.fx-search input:focus { background: #fff; color: var(--fx-ink); border-color: #fff; }
.fx-search input:focus + i, .fx-search:focus-within i { color: var(--fx-muted); }
.fx-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fx-right > a, .fx-right .dropdown > a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border-radius: 10px; color: #fff; font-size: 13px; white-space: nowrap; text-decoration: none; }
.fx-right .dropdown > a:hover, .fx-right .dropdown.open > a { background: rgba(255,255,255,.08); color: #fff; }
.fx-right .dropdown-menu { margin-top: 6px; border-radius: 12px; border: 1px solid var(--fx-line); box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 6px; min-width: 220px; }
.fx-right .dropdown-menu > li > a { border-radius: 8px; padding: 8px 12px; color: var(--fx-ink); }
.fx-right .dropdown-menu > li > a:hover { background: var(--fx-soft); }
.fx-right .dropdown-menu i { width: 18px; color: var(--fx-muted); }
.fx-right .dropdown-header { padding: 8px 12px 6px; font-size: 11px; color: var(--fx-muted); }

.fx-day { border: 1px solid rgba(255,255,255,.14); }
.fx-day .dot { width: 9px; height: 9px; border-radius: 50%; background: #9CA3AF; flex: none; }
.fx-day.ok .dot { background: #32D583; box-shadow: 0 0 0 3px rgba(50,213,131,.2); }
.fx-day.warn { border-color: rgba(253,176,34,.55); }
.fx-day.warn .dot { background: #FDB022; }
.fx-day.bad { border-color: rgba(249,112,102,.6); background: rgba(217,45,32,.18); }
.fx-day.bad .dot { background: #F97066; }
.fx-day:hover { background: rgba(255,255,255,.08); color: #fff; }
.fx-new { background: var(--fx-green); font-weight: 600; }
.fx-new:hover, .fx-new:focus { background: #12844a; color: #fff; }
.fx-avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--fx-navy); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }

/* -------------------------------------------------------------- sidebar */
.side-menu.left { background: var(--fx-navy); box-shadow: none; }
#sidebar-menu.fx-nav { padding: 14px 12px 24px; }
#sidebar-menu.fx-nav > ul > li > a { background: transparent !important; color: rgba(255,255,255,.72); border-radius: 10px;
  padding: 10px 14px; margin: 1px 0; border-left: 0; font-size: 14px; display: flex; align-items: center; gap: 2px; }
#sidebar-menu.fx-nav > ul > li > a > i { width: 26px; font-size: 16px; color: rgba(255,255,255,.55); }
#sidebar-menu.fx-nav > ul > li > a:hover { background: rgba(255,255,255,.06) !important; color: #fff; }
#sidebar-menu.fx-nav > ul > li > a.active { background: rgba(255,255,255,.1) !important; color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--fx-green); }
#sidebar-menu.fx-nav > ul > li > a.active > i { color: #32D583; }
#sidebar-menu .fx-section { color: rgba(255,255,255,.4); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 18px 14px 6px; }
#wrapper.enlarged #sidebar-menu .fx-section { display: none; }

/* --------------------------------------------------- page header + footer */
.page-header-title { background: transparent; border: 0; padding: 6px 0 14px; margin: 0 0 4px; min-height: 0; box-shadow: none; }
.page-header-title .page-title { font-size: 22px; font-weight: 700; color: var(--fx-ink); margin: 0; line-height: 1.4; }
.page-header-title .breadcrumb { background: transparent; padding: 0; margin: 8px 0 0; font-size: 12px; }
.page-header-title .breadcrumb a { color: var(--fx-muted); }
.fx-footer { background: transparent; border-top: 1px solid #E5E9EF; color: var(--fx-muted); font-size: 12px; }

/* ------------------------------------------------------------ components */
.vr-card { background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(15,23,42,.07); padding: 22px; margin-bottom: 20px; }
.vr-title { font-size: 17px; font-weight: 600; color: var(--fx-ink); margin: 0 0 1rem; }
.vr-muted { color: var(--fx-muted); }
.vr-big { font-size: 26px; font-weight: 700; color: var(--fx-ink); }
.vr-kpis { display: flex; flex-wrap: wrap; gap: 16px; }
.vr-kpi { border: 1px solid #E5E9EF; border-radius: 12px; padding: 12px 16px; min-width: 200px; }
.vr-scroll { overflow-x: auto; }
.vr-presets a { display: inline-block; margin: 0 6px 6px 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fx-line); color: var(--fx-ink); font-size: 13px; }
.vr-presets a:hover { background: var(--fx-soft); text-decoration: none; }
.vr-presets a.on { background: var(--fx-ink); border-color: var(--fx-ink); color: #fff; }
.vr-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vr-table th { background: var(--fx-soft); color: var(--fx-ink); font-size: 12px; font-weight: 700; padding: 8px; border: 1px solid var(--fx-line); white-space: nowrap; }
.vr-table td { padding: 8px; border: 1px solid var(--fx-line); font-size: 13px; vertical-align: middle; }
.vr-table .r { text-align: right; white-space: nowrap; }
.vr-table tr.total td { font-weight: 700; background: #F8FAFC; }
.vr-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #EEF2F6; color: #374151; white-space: nowrap; }
.vr-tag.ok { background: #ECFDF3; color: #05603A; }
.vr-tag.bad, .vr-tag.cn { background: #FEF3F2; color: #B42318; }
.vr-tag.warn { background: #FFFAEB; color: #B54708; }
.btn-vr { background: var(--fx-ink); color: #fff; border-radius: 8px; padding: 8px 16px; border: 0; }
.btn-vr:hover, .btn-vr:focus { color: #fff; opacity: .9; }
.btn-vr-green { background: var(--fx-green); }
.btn-vr-light { background: #fff; color: var(--fx-ink); border: 1px solid var(--fx-line); }
.btn-vr-light:hover, .btn-vr-light:focus { color: var(--fx-ink); background: var(--fx-bg); opacity: 1; }
.btn-vr-danger { background: #fff; color: #B42318; border: 1px solid #FECDCA; }
.btn-vr-danger:hover, .btn-vr-danger:focus { background: #FEF3F2; color: #B42318; opacity: 1; }
.vr-spacer { display: inline-block; visibility: hidden; }
.vr-go { display: block; width: 100%; height: 38px; padding-top: 0; padding-bottom: 0; }
.vr-err { color: #D92D20; font-size: 12px; margin-top: 4px; }
.has-err .form-control { border-color: #D92D20; }
.vr-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; align-items: center; }
.vr-pages a, .vr-pages span { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--fx-line); color: var(--fx-ink); font-size: 13px; }
.vr-pages a:hover { background: var(--fx-soft); text-decoration: none; }
.vr-pages .on { background: var(--fx-ink); border-color: var(--fx-ink); color: #fff; }
.vr-pages .gap { border: 0; }
.vr-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.vr-head .vr-title { margin: 0; }
.vr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vr-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 13px; }
.vr-dl dt { color: var(--fx-muted); font-weight: 400; }
.vr-dl dd { margin: 0; color: var(--fx-ink); font-weight: 500; word-break: break-word; }
.vr-empty { text-align: center; padding: 28px; color: var(--fx-muted); }

/* Old template pieces restyled to match, so pages not yet rebuilt still fit in */
.content .panel { border: 0; border-radius: 14px; box-shadow: 0 6px 24px rgba(15,23,42,.07); }
.content .panel-primary > .panel-heading { background: #fff; color: var(--fx-ink); border-bottom: 1px solid #EEF1F5; border-radius: 14px 14px 0 0; }
.content .panel-primary > .panel-heading .panel-title { color: var(--fx-ink); font-weight: 600; }
.content .form-control { border-radius: 8px; }
.content .table > thead > tr > th { background: var(--fx-soft); color: var(--fx-ink); font-size: 12px; border-bottom: 1px solid var(--fx-line); }

/* -------------------------------------------------------------- phones */
@media (max-width: 991px) {
  .vr-spacer { display: none; }
  .fx-right .txt { display: none; }
  .fx-right > a, .fx-right .dropdown > a { padding: 0 10px; }
}
@media (max-width: 767px) {
  .fx-bar { gap: 8px; padding-right: 10px; }
  .fx-search { display: none; }
  .fx-search.open { display: block; }
  .fx-device { display: none; }
}
@media print {
  .side-menu, .topbar, .vr-noprint, footer { display: none !important; }
  .content-page { margin: 0 !important; }
  .vr-card { box-shadow: none; border: 1px solid var(--fx-line); }
}

/* ------------------------------------------------------------- forms */
.fx-field { margin-bottom: 16px; }
.fx-field > label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.fx-field .form-control { height: 40px; border-radius: 8px; border: 1px solid var(--fx-line); box-shadow: none; font-size: 14px; color: var(--fx-ink); background: #fff; }
.fx-field textarea.form-control { height: auto; min-height: 90px; }
.fx-field .form-control:focus { border-color: var(--fx-ink); box-shadow: 0 0 0 3px rgba(30,47,69,.12); }
.fx-field.has-err .form-control { border-color: #D92D20; }
.fx-field .fx-file { padding: 8px; height: auto; }
.fx-req { color: #D92D20; }
.fx-hint { font-size: 12px; color: var(--fx-muted); margin-top: 5px; }
.fx-check label { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; color: var(--fx-ink); cursor: pointer; margin: 0; }
.fx-check input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--fx-ink); }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.fx-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .fx-grid .span-2 { grid-column: auto; } }
.fx-form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; padding-top: 16px; border-top: 1px solid #EEF1F5; }
.fx-form-actions .btn { height: 40px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; }
.fx-sub { font-size: 13px; color: var(--fx-muted); margin: -8px 0 16px; }

/* alerts (messages) */
.fx-alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.fx-alert > i { font-size: 17px; margin-top: 1px; }
.fx-alert > div { flex: 1; }
.fx-alert.ok { background: #ECFDF3; border-color: #ABEFC6; color: #05603A; }
.fx-alert.bad { background: #FEF3F2; border-color: #FECDCA; color: #912018; }
.fx-alert.warn { background: #FFFAEB; border-color: #FEDF89; color: #93370D; }
.fx-alert.info { background: #EFF8FF; border-color: #B2DDFF; color: #194185; }
.fx-alert-x { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; opacity: .6; padding: 0 2px; }
.fx-alert-x:hover { opacity: 1; }

/* detail pages */
.fx-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.fx-cols > .vr-card { margin: 0; }
.fx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fx-card-head .vr-title { margin: 0; }
.fx-icon-btn { color: var(--fx-muted); font-size: 13px; border: 1px solid var(--fx-line); border-radius: 8px; padding: 5px 10px; background: #fff; }
.fx-icon-btn:hover { background: var(--fx-bg); color: var(--fx-ink); text-decoration: none; }
.fx-big-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--fx-ink); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.fx-person { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.fx-person .n { font-size: 18px; font-weight: 700; color: var(--fx-ink); }
.vr-table a.fx-row-link { color: var(--fx-ink); font-weight: 600; }
.vr-table tbody tr:hover td { background: #FAFBFC; }
.fx-empty { text-align: center; padding: 36px 16px; color: var(--fx-muted); }
.fx-empty i { font-size: 30px; color: #C0C7D0; display: block; margin-bottom: 10px; }

/* ------------------------------------------------------------- sign-in pages */
.fx-auth { min-height: 100vh; display: flex; background: var(--fx-bg); }
.fx-auth-side { flex: 0 0 46%; background: linear-gradient(160deg, #1E2F45 0%, #142a40 55%, #0d1d2e 100%); color: #fff; padding: 48px 56px 36px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.fx-auth-side::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 70%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%); }
.fx-auth-side::after { content: ''; position: absolute; width: 560px; height: 560px; right: -220px; top: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(22,157,83,.30), rgba(22,157,83,0) 70%); }
.fx-auth-side > * { position: relative; z-index: 1; }

/* logo lockup: mark + wordmark */
.fx-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none !important; align-self: flex-start; }
.fx-lockup img { display: block; }
.fx-lockup span { display: flex; flex-direction: column; line-height: 1; }
.fx-lockup b { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.fx-lockup small { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 5px; }
.fx-lockup--light b { color: #fff; }
.fx-lockup--light small { color: #6CE9A6; }
.fx-lockup--dark b { color: #1B3652; }
.fx-lockup--dark small { color: #169D53; }

/* product preview */
.fx-auth-preview { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 300px; margin: 24px 0; }
.fx-stage { position: relative; padding: 34px 48px 44px 30px; }
.fx-rcpt { width: 300px; background: #fff; color: #1B2A3B; border-radius: 16px; padding: 20px 20px 18px; box-shadow: 0 30px 60px rgba(0,0,0,.35); transform: rotate(-3deg); }
.fx-rcpt-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #667085; font-weight: 600; }
.fx-rcpt-ok { background: #E7F6EE; color: #0F7A3F; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; }
.fx-rcpt-no { font-size: 20px; font-weight: 800; margin: 10px 0 14px; letter-spacing: -.3px; }
.fx-rcpt-rows div { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: #475467; }
.fx-rcpt-rows .tot { border-top: 1px dashed #D0D5DD; margin-top: 4px; padding-top: 9px; color: #1B2A3B; font-weight: 800; font-size: 15px; }
.fx-rcpt-foot { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid #EAECF0; }
.fx-rcpt-foot small { display: block; font-size: 10px; color: #98A2B3; }
.fx-rcpt-foot code { display: block; background: none; padding: 2px 0; color: #1B2A3B; font-size: 12px; font-weight: 700; }
.fx-qr { width: 56px; height: 56px; flex: 0 0 56px; display: grid; grid-template-columns: repeat(5,1fr); gap: 2px; padding: 5px; border: 1px solid #EAECF0; border-radius: 6px; }
.fx-qr i { border-radius: 1px; }
.fx-qr i.on { background: #1B2A3B; }
.fx-qr i:nth-child(13).on { background: #169D53; }
.fx-chip { position: absolute; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.96); color: #1B2A3B; border-radius: 12px; padding: 10px 14px; box-shadow: 0 16px 34px rgba(0,0,0,.28); font-size: 13px; font-weight: 600; }
.fx-chip span { display: flex; flex-direction: column; }
.fx-chip small { font-size: 11px; color: #667085; font-weight: 500; }
.fx-chip b { font-size: 16px; font-weight: 800; }
.fx-chip--vat { right: 0; bottom: 0; transform: rotate(2deg); }
.fx-chip--vat > i { width: 32px; height: 32px; border-radius: 9px; background: #E7F6EE; color: #169D53; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.fx-chip--day { left: 0; top: 0; }
.fx-chip--day .dot { width: 9px; height: 9px; border-radius: 50%; background: #32D583; box-shadow: 0 0 0 4px rgba(50,213,131,.2); }

.fx-auth-side h2 { font-size: 30px; line-height: 1.22; font-weight: 800; margin: 0 0 16px; max-width: 470px; color: #fff; letter-spacing: -.3px; }
.fx-auth-side ul { list-style: none; padding: 0; margin: 0 0 32px; font-size: 15px; color: rgba(255,255,255,.82); }
.fx-auth-side li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; }
.fx-auth-side li i { color: #32D583; margin-top: 3px; }
.fx-auth-side .foot { font-size: 12px; color: rgba(255,255,255,.5); }
.fx-auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.fx-auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; box-shadow: 0 12px 40px rgba(15,23,42,.08); padding: 36px 34px; }
.fx-auth-card .fx-lockup { display: none; margin-bottom: 26px; }
.fx-auth-card h1 { font-size: 24px; font-weight: 800; color: var(--fx-ink); margin: 0 0 6px; }
.fx-auth-card .lead-t { color: var(--fx-muted); font-size: 14px; margin: 0 0 24px; }
.fx-auth-card .btn-vr { width: 100%; height: 44px; font-size: 15px; font-weight: 600; }
.fx-auth-card .fx-field .form-control { height: 44px; }
.fx-auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; }
.fx-auth-links a { color: var(--fx-ink); font-weight: 600; }
.fx-pass { position: relative; }
.fx-pass .form-control { padding-right: 44px; }
.fx-pass-toggle { position: absolute; right: 6px; bottom: 6px; height: 32px; width: 34px; border: 0; background: none; color: var(--fx-muted); }
.fx-auth-big { font-size: 46px; color: var(--fx-green); margin-bottom: 10px; }
@media (max-width: 900px) {
  .fx-auth-side { display: none; }
  .fx-auth-card .fx-lockup { display: inline-flex; }
  .fx-auth-card { padding: 28px 22px; }
}

/* page heading used by rebuilt pages */
.fx-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 4px 0 18px; }
.fx-h1 { font-size: 24px; font-weight: 800; color: var(--fx-ink); margin: 0; line-height: 1.3; }
.fx-head .vr-muted { margin-top: 2px; }
.fx-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fx-muted); margin-bottom: 4px; }
.fx-back:hover { color: var(--fx-ink); text-decoration: none; }
.fx-search-inline { position: relative; max-width: 360px; flex: 1 1 240px; }
.fx-search-inline i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fx-muted); }
.fx-search-inline input { padding-left: 34px; height: 40px; border-radius: 8px; }
/* short screens: shrink the preview instead of hiding it */
@media (max-height: 860px) {
  .fx-auth-side { padding-top: 34px; padding-bottom: 26px; }
  .fx-auth-preview { min-height: 0; margin: 10px 0; }
  .fx-stage { zoom: .82; }
  .fx-auth-side h2 { font-size: 26px; margin-bottom: 12px; }
  .fx-auth-side ul { margin-bottom: 20px; font-size: 14px; }
  .fx-auth-side li { margin-bottom: 8px; }
}
@media (max-height: 720px) {
  .fx-stage { zoom: .66; }
  .fx-auth-side h2 { font-size: 23px; }
  .fx-auth-side li { margin-bottom: 6px; }
}
@media (max-height: 600px) {
  .fx-stage { zoom: .54; }
  .fx-auth-side ul { display: none; }
}
@media (max-height: 470px) { .fx-auth-preview { display: none; } .fx-auth-side h2 { margin-top: auto; } }
