/**
 * Paket .51. Light shell for the whole backend.
 * Dark mode is a later package: [data-theme="dark"] repeats the light tokens
 * so that package only has to replace this block.
 */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-theme="light"],
[data-theme="dark"] {
  color-scheme: light;
  --sopo-brand: #233162;
  --sopo-brand-rgb: 35, 49, 98;
  --sopo-accent: #3c95ce;
  --sopo-accent-soft: #e9ecf6;
  --sopo-text: #3f4254;
  --sopo-text-2: #5e6278;
  --sopo-muted: #7e8299;
  --sopo-subtle: #a1a5b7;
  --sopo-help: #8b90a5;
  --sopo-line: #e9ecf3;
  --sopo-line-soft: #f1f3f7;
  --sopo-control-border: #dde1ea;
  --sopo-dash: #cfd5e3;
  --sopo-surface: #ffffff;
  --sopo-surface-2: #f4f6fa;
  --sopo-surface-hint: #f0f3fa;
  --sopo-surface-empty: #fafbfd;
  --sopo-surface-day: #f8f9fc;
  --sopo-overlay: rgba(20, 24, 40, .72);
  --sopo-ok: #1f8a4c;
  --sopo-ok-bg: #e8f6ee;
  --sopo-ok-dot: #2fb36b;
  --sopo-bad: #c0392b;
  --sopo-bad-bg: #fdecea;
  --sopo-bad-dot: #e5484d;
  --sopo-warn: #b7791f;
  --sopo-warn-bg: #fff4d6;
  --sopo-warn-dot: #f0b429;
  --sopo-warn-box-bg: #fffaf0;
  --sopo-warn-box-line: #f1c27a;
  --sopo-net-facebook: #3b5998;
  --sopo-net-instagram: #d62976;
  --sopo-net-linkedin: #0d77b7;
  --sopo-net-gbp: #4b88ef;
  --sopo-net-gbp-chart: #4b88ef;
  --sopo-net-pinterest: #cd2029;
  --sopo-net-tiktok: #010101;
  --sopo-net-threads: #010101;
  --sopo-net-x: #000000;
  --sopo-net-youtube: #ff0000;
  --sopo-net-whatsapp: #25d366;
  --sopo-chart-axis: #7e8299;
  --sopo-chart-grid: #eef1f6;
  --sopo-font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sopo-fs-xs: 11px;
  --sopo-fs-sm: 12px;
  --sopo-fs-crumb: 13px;
  --sopo-fs: 14px;
  --sopo-fs-h2: 16px;
  --sopo-fs-h1: 24px;
  --sopo-fs-kpi: 28px;
  --sopo-fw: 400;
  --sopo-fw-bold: 700;
  --sopo-radius: 12px;
  --sopo-radius-md: 10px;
  --sopo-radius-sm: 8px;
  --sopo-radius-xs: 6px;
  --sopo-radius-pill: 20px;
  --sopo-control-h: 38px;
  --sopo-control-h-sm: 32px;
  --sopo-gap: 16px;
  --sopo-gap-kpi: 14px;
  --sopo-pad-card: 18px 20px;
  --sopo-pad-page: 28px 32px 72px;
  --sopo-pad-page-m: 16px 14px 88px;
  --sopo-shadow-pop: 0 12px 32px rgba(20, 24, 40, .12);
  --sopo-focus: 2px solid var(--sopo-accent);
  --sp-ds-primary: var(--sopo-brand);
  --sp-ds-surface: var(--sopo-surface);
  --sp-ds-muted: var(--sopo-surface-2);
  --sp-ds-border: var(--sopo-line);
  --sp-ds-text: var(--sopo-text);
  --sp-ds-text-muted: var(--sopo-muted);
  --sp-ds-shadow: none;
  --sp-ds-control-h: var(--sopo-control-h);
}

html,
body {
  color-scheme: light;
  background: var(--sopo-surface-2);
  color: var(--sopo-text);
  font-family: var(--sopo-font);
  font-weight: 400;
}

h1, h2, h3, h4,
.card-title,
.card-header .card-title,
.sub-header h1 {
  color: var(--sopo-brand);
  font-weight: 700;
}

.sub-header h1 {
  font-size: var(--sopo-fs-h1);
}

.sub-header h1 > i {
  display: none;
}

h2, .card-title, .card-header .card-title {
  font-size: var(--sopo-fs-h2);
}

a {
  color: var(--sopo-accent);
}

.btn {
  font-weight: 700;
  border-radius: var(--sopo-radius-sm);
  min-height: var(--sopo-control-h);
}

.btn-primary {
  background: var(--sopo-brand);
  border-color: var(--sopo-brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #1b274e;
  border-color: #1b274e;
  color: #fff;
}

.btn-light,
.btn-secondary,
.btn-outline-primary,
.btn-light-primary,
.btn-white {
  background: var(--sopo-surface);
  color: var(--sopo-brand);
  border: 1px solid var(--sopo-control-border);
}

.btn-icon,
.btn.btn-icon {
  width: var(--sopo-control-h-sm);
  min-width: var(--sopo-control-h-sm);
  height: var(--sopo-control-h-sm);
  min-height: var(--sopo-control-h-sm);
  padding: 0;
}

.card,
.card-shadow,
.card.border {
  background: var(--sopo-surface);
  border: 1px solid var(--sopo-line) !important;
  box-shadow: none !important;
  border-radius: var(--sopo-radius) !important;
}

.modal-content,
.dropdown-menu,
.popover,
.sopo-account-menu,
.sopo-news-panel,
.sopo-topup-card,
.iziToast {
  box-shadow: var(--sopo-shadow-pop);
}

.form-control,
.form-select,
.select2-container .select2-selection--single {
  min-height: var(--sopo-control-h);
  border-color: var(--sopo-control-border);
  border-radius: var(--sopo-radius-sm);
  color: var(--sopo-text);
  font-family: inherit;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.page-link:focus-visible,
.nav-link:focus-visible,
.sopo-tool:focus-visible,
.sopo-lang-tab:focus-visible {
  outline: var(--sopo-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.form-check-input:checked {
  background-color: var(--sopo-brand);
  border-color: var(--sopo-brand);
}

.nav-tabs {
  border: 0;
  background: var(--sopo-surface-2);
  border-radius: var(--sopo-radius-sm);
  padding: 3px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-tabs .nav-link {
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--sopo-text-2);
  font-weight: 700;
  background: transparent;
}

.nav-tabs .nav-link.active {
  background: var(--sopo-surface);
  color: var(--sopo-brand) !important;
}

.table thead th {
  background: transparent;
  color: var(--sopo-muted);
  font-size: var(--sopo-fs-sm);
  font-weight: 700;
  border-bottom: 1px solid var(--sopo-line);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--sopo-line-soft);
}

.table td.num, .table th.num {
  text-align: right;
}

.badge {
  font-weight: 700;
  border-radius: var(--sopo-radius-xs);
}

.sp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  border: 1px dashed var(--sopo-dash);
  border-radius: var(--sopo-radius-md);
  padding: 18px;
  color: var(--sopo-text-2);
  background: var(--sopo-surface-empty);
}

.sp-empty i {
  display: block;
  font-size: 22px;
  color: var(--sopo-brand);
}

.sp-empty b {
  display: block;
  color: var(--sopo-brand);
}

.sp-skeleton {
  background: linear-gradient(90deg, var(--sopo-surface-2), #e9ecf3, var(--sopo-surface-2));
  background-size: 200% 100%;
  border-radius: var(--sopo-radius);
  min-height: 120px;
  animation: sp-shimmer 1.2s infinite;
}

.sp-warn, .alert-warning {
  background: var(--sopo-warn-box-bg);
  border: 1px solid var(--sopo-warn-box-line);
  color: var(--sopo-text);
  border-radius: var(--sopo-radius-md);
}

.alert-success {
  background: var(--sopo-ok-bg);
  color: var(--sopo-ok);
  border-color: transparent;
}

.alert-danger {
  background: var(--sopo-bad-bg);
  color: var(--sopo-bad);
  border-color: transparent;
}

.sidebar,
.header,
.sub-sidebar {
  background: var(--sopo-surface);
}

.sidebar {
  border-right: 1px solid var(--sopo-line);
}

.header {
  border-bottom: 1px solid var(--sopo-line);
  box-shadow: none;
}

.sidebar .nav-link i,
.sidebar .menu-link i {
  color: var(--sopo-brand) !important;
}

.sidebar .nav-link span,
.sidebar .sidebar-footer .nav-link span {
  color: var(--sopo-text-2);
  font-weight: 700;
}

.sidebar .nav-link.active,
.sidebar .nav-link.active span,
.sidebar .nav-link.active i,
.sidebar .nav-link:hover span,
.sidebar .nav-link:hover i,
.sidebar .menu-link.text-primary,
.sidebar-nav .active {
  color: var(--sopo-brand) !important;
}

.sidebar-nav .active,
.sidebar .nav-link.active {
  background: var(--sopo-accent-soft) !important;
  border-radius: var(--sopo-radius-sm);
}

.sub-sidebar {
  border-right: 1px solid var(--sopo-line);
}

.sub-sidebar h3,
.sub-sidebar .text-gray-800 {
  color: var(--sopo-brand) !important;
  font-weight: 700;
}

.container > .row.px-2.py-5 {
  padding: var(--sopo-pad-page) !important;
}

.sopo-theme {
  display: none !important;
}

.sopo-account-block {
  border-color: var(--sopo-brand);
}

.sopo-topup-open,
.sopo-header-account {
  background: var(--sopo-brand);
}

.sopo-account-avatar,
.sopo-avatar-initials,
.sopo-avatar-preview {
  background: var(--sopo-brand);
}

@media (max-width: 1199px) {
  .container > .row.px-2.py-5 {
    padding: 22px 20px 72px !important;
  }
  .sopo-news-admin-grid,
  .sp-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .container > .row.px-2.py-5 {
    padding: var(--sopo-pad-page-m) !important;
  }
  .sub-header h1 {
    font-size: 22px;
  }
  .card .table {
    display: block;
    overflow-x: auto;
  }
  .sp-mobile-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--sopo-surface);
    border-top: 1px solid var(--sopo-line);
  }
}
