@font-face {
  font-family: "Manrope";
  src: url("../vendor/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../vendor/fonts/manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BB-02BC, U+02BD-02C5, U+1E00-1E9F, U+2020, U+20A0-20C0, U+2113;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../vendor/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root, [data-bs-theme="light"] {
  --app-bg: #f2f3f6;
  --app-card: #ffffff;
  --app-ink: #11131a;
  --app-muted: #5b6170;
  --app-line: #e6e8ee;
  --app-soft: #f2f3f6;
  --app-hover: #f7f8fa;
  --app-link: #4a5a12;
  --app-shadow: 0 2px 10px rgba(17, 19, 26, .05);
  --app-bar: #11131a;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--app-ink);
  --bs-border-color: var(--app-line);
  --bs-secondary-color: var(--app-muted);
  --bs-link-color-rgb: 74, 90, 18;
  --bs-link-hover-color-rgb: 17, 19, 26;
}
[data-bs-theme="dark"] {
  --app-bg: #0b0c11;
  --app-card: #1a1c25;
  --app-ink: #f4f5f8;
  --app-muted: #a7acba;
  --app-line: #2b2e3a;
  --app-soft: #262934;
  --app-hover: #20222c;
  --app-link: #c8f169;
  --app-shadow: none;
  --app-bar: #c8f169;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--app-ink);
  --bs-border-color: var(--app-line);
  --bs-secondary-color: var(--app-muted);
  --bs-tertiary-bg: var(--app-soft);
  --bs-link-color-rgb: 200, 241, 105;
  --bs-link-hover-color-rgb: 244, 245, 248;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  background: var(--app-bg);
  color: var(--app-ink);
}
h1, h2, h3, .h4, .h5 { letter-spacing: -.2px; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
code { color: var(--app-ink); }
:focus-visible { outline: 2px solid #4a5a12; outline-offset: 2px; }
[data-bs-theme="dark"] :focus-visible { outline-color: #c8f169; }

/* Yon menyu */
.sidebar {
  /* offcanvas-lg katta ekranda fonni !important bilan shaffof qiladi */
  background-color: #11131a !important;
  color: #fff;
  --bs-offcanvas-bg: #11131a;
  --bs-offcanvas-width: 270px;
  display: flex;
  flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 10px; font-weight: 800; font-size: 16px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #c8f169; color: #11131a;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 16px; letter-spacing: -1px;
}
.sidebar-nav { padding: 6px 12px 24px; overflow-y: auto; flex: 1; width: 100%; }
.sidebar-group { color: #8d93a3; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; padding: 14px 10px 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; margin-bottom: 2px;
  border-radius: 12px; color: #c6cad4; text-decoration: none; font-weight: 600;
}
.sidebar-link:hover { background: #1f222c; color: #fff; }
.sidebar-link.active { background: #c8f169; color: #11131a; font-weight: 800; }
.sidebar-link i { font-size: 17px; }
.sidebar-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: #ffd27a; color: #11131a; font-size: 11.5px; font-weight: 800; text-align: center; }
.sidebar-nav :focus-visible, .sidebar-brand :focus-visible { outline-color: #c8f169; }

@media (min-width: 992px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 1020; }
  .app-main { margin-left: 250px; }
}

/* Asosiy qism */
.topbar {
  position: sticky; top: 0; z-index: 1010;
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 24px;
  background: var(--app-bg); border-bottom: 1px solid var(--app-line);
}
.topbar-title { margin: 0; font-size: 20px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-content { padding: 22px 24px 40px; max-width: 1400px; }
@media (max-width: 575.98px) {
  .topbar { padding: 8px 12px; }
  .app-content { padding: 16px 12px 32px; }
}

.btn-icon, .btn-icon-sm {
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--app-ink);
}
.btn-icon { width: 44px; height: 44px; font-size: 19px; }
.btn-icon:hover, .btn-icon-sm:hover { background: var(--app-soft); color: var(--app-ink); }
.btn-icon-sm { width: 36px; height: 36px; font-size: 15px; color: var(--app-muted); }
.btn-icon-danger:hover { background: #fce9e9; color: #b3161b; }
[data-bs-theme="dark"] .btn-icon-danger:hover { background: #3a1617; color: #ff8a8d; }
.btn-user { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; border: 0; color: var(--app-ink); }
.btn-user:hover, .btn-user.show { background: var(--app-soft); color: var(--app-ink); }

.btn { font-weight: 700; border-radius: 12px; }
.btn-brand { background: #11131a; color: #fff; border: 0; }
.btn-brand:hover, .btn-brand:focus { background: #2a2d38; color: #fff; }
[data-bs-theme="dark"] .btn-brand { background: #c8f169; color: #11131a; }
[data-bs-theme="dark"] .btn-brand:hover { background: #d7f78c; color: #11131a; }
.btn-light { background: var(--app-soft); border: 0; color: var(--app-ink); }
.btn-light:hover { background: var(--app-line); color: var(--app-ink); }

.card-panel { background: var(--app-card); border-radius: 20px; box-shadow: var(--app-shadow); padding: 18px; }
.panel-title { font-size: 15px; font-weight: 800; margin: 0 0 12px; }

/* Sarlavha va filtrlar */
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.page-actions .hint { color: var(--app-muted); }
.page-actions .filter-bar { flex: 1 1 420px; min-width: 0; }
.page-actions > .btn { flex: none; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 150px; min-height: 42px; border-radius: 12px; }
.filter-bar .filter-search { flex: 1 1 220px; min-width: 200px; }
.form-control, .form-select { border-radius: 12px; min-height: 42px; background-color: var(--app-card); color: var(--app-ink); }
.form-control:focus, .form-select:focus { background-color: var(--app-card); color: var(--app-ink); border-color: var(--app-ink); box-shadow: 0 0 0 3px rgba(17, 19, 26, .12); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { border-color: #c8f169; box-shadow: 0 0 0 3px rgba(200, 241, 105, .2); }
.form-check-input:checked { background-color: #11131a; border-color: #11131a; }
.form-check-input:focus { border-color: #11131a; box-shadow: 0 0 0 3px rgba(17, 19, 26, .15); }
[data-bs-theme="dark"] .form-check-input:checked { background-color: #6f8f2a; border-color: #6f8f2a; }
.form-switch .form-check-input { min-height: 0; }
textarea.form-control { min-height: 90px; }
.form-label { font-weight: 700; margin-bottom: 5px; }
.form-control-color { padding: 4px; width: 56px; }

/* Jadvallar */
.table-wrap { background: var(--app-card); border-radius: 20px; box-shadow: var(--app-shadow); overflow-x: auto; }
.app-table { width: 100%; margin: 0; --bs-table-bg: transparent; --bs-table-color: var(--app-ink); --bs-table-border-color: var(--app-line); }
.app-table th { font-size: 12px; font-weight: 700; color: var(--app-muted); padding: 13px 14px; white-space: nowrap; border-bottom: 1px solid var(--app-line); }
.app-table td { padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid var(--app-line); }
.app-table tbody tr:last-child td { border-bottom: 0; }
.app-table tbody tr:hover td { background: var(--app-hover); }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--app-ink); }
.cell-title { font-weight: 700; }
.cell-sub { color: var(--app-muted); font-size: 12.5px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.drag-handle { cursor: grab; color: var(--app-muted); font-size: 17px; }
tr.dragging td { opacity: .45; }
.code-chip { display: inline-block; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 13px; background: var(--app-soft); padding: 4px 9px; border-radius: 9px; white-space: nowrap; }
.list-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 4px 0; }
.pagination { --bs-pagination-bg: var(--app-card); --bs-pagination-color: var(--app-ink); --bs-pagination-border-color: var(--app-line); --bs-pagination-active-bg: #11131a; --bs-pagination-active-border-color: #11131a; --bs-pagination-disabled-bg: var(--app-soft); --bs-pagination-hover-color: var(--app-ink); --bs-pagination-focus-color: var(--app-ink); }
[data-bs-theme="dark"] .pagination { --bs-pagination-active-bg: #c8f169; --bs-pagination-active-border-color: #c8f169; --bs-pagination-active-color: #11131a; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--app-muted); }
.empty-state i { font-size: 34px; display: block; margin-bottom: 10px; }

/* Belgilar */
.badge { font-weight: 700; border-radius: 8px; padding: 5px 8px; font-size: 11.5px; }
.badge-soft-good { background: #e1f3e6; color: #17602f; }
.badge-soft-warn { background: #fff4db; color: #6d4900; }
.badge-soft-muted { background: var(--app-soft); color: var(--app-muted); }
.badge-soft-danger { background: #fce9e9; color: #a0141a; }
.badge-soft-info { background: #e6eef8; color: #0a4286; }
[data-bs-theme="dark"] .badge-soft-good { background: #123022; color: #8fe0a9; }
[data-bs-theme="dark"] .badge-soft-warn { background: #3a2c0c; color: #ffd27a; }
[data-bs-theme="dark"] .badge-soft-danger { background: #3a1617; color: #ff9b9e; }
[data-bs-theme="dark"] .badge-soft-info { background: #17263c; color: #a6c9f5; }

/* Logo va rang */
.logo-tile { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid #e6e8ee; display: inline-flex; align-items: center; justify-content: center; padding: 5px; flex: none; overflow: hidden; font-weight: 800; font-size: 13px; color: #11131a; }
.logo-tile img { max-width: 100%; max-height: 100%; display: block; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(17, 19, 26, .15); vertical-align: -4px; }
.icon-tile { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--app-soft); font-size: 17px; flex: none; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { display: block; background: var(--app-card); border-radius: 20px; box-shadow: var(--app-shadow); padding: 16px; color: inherit; text-decoration: none; }
.stat-card:hover { background: var(--app-hover); color: inherit; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--app-muted); font-weight: 600; font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-note { color: var(--app-muted); font-size: 12px; margin-top: 3px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.dash-7 { grid-column: span 7; }
.dash-5 { grid-column: span 5; }
@media (max-width: 991.98px) { .dash-7, .dash-5 { grid-column: span 12; } }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 54px; align-items: center; gap: 10px; min-height: 30px; }
.bar-track { height: 10px; }
.bar-fill { height: 100%; min-width: 2px; background: var(--app-bar); border-radius: 0 4px 4px 0; }
.bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--app-line); color: inherit; text-decoration: none; }
.feed-row:last-child { border-bottom: 0; }
.feed-time { margin-left: auto; color: var(--app-muted); font-size: 12px; white-space: nowrap; flex: none; }

/* Forma */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.col-12f { grid-column: span 12; }
.col-8f { grid-column: span 8; }
.col-6f { grid-column: span 6; }
.col-4f { grid-column: span 4; }
.col-3f { grid-column: span 3; }
@media (max-width: 767.98px) { .col-8f, .col-6f, .col-4f { grid-column: span 12; } .col-3f { grid-column: span 6; } }
.form-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.icon-picker label { width: 46px; height: 46px; border-radius: 12px; background: var(--app-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; cursor: pointer; margin: 0; }
.icon-picker input:checked + label { background: #11131a; color: #c8f169; }
.icon-picker input:focus-visible + label { outline: 2px solid #4a5a12; outline-offset: 2px; }
.dyn-row { display: grid; gap: 8px; margin-bottom: 8px; align-items: center; }
.dyn-attr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
.dyn-param { grid-template-columns: 130px minmax(0, 1fr) 150px 44px; }
@media (max-width: 575.98px) { .dyn-param { grid-template-columns: minmax(0, 1fr) 44px; } }

/* Banner */
.banner-thumb { width: 120px; height: 60px; border-radius: 10px; object-fit: cover; display: block; background: var(--app-soft); }
.phone-preview { max-width: 340px; background: #11131a; border-radius: 24px; padding: 14px; }
.phone-banner { aspect-ratio: 2 / 1; border-radius: 16px; background: #2b2e3a; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; color: #b4b9c6; font-size: 13px; }
.phone-banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.phone-chip { position: absolute; left: 10px; top: 10px; background: #fff; color: #11131a; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; z-index: 1; }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.media-card { background: var(--app-card); border-radius: 18px; box-shadow: var(--app-shadow); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.media-image { height: 120px; border-radius: 12px; background: #fff; border: 1px solid #e6e8ee; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px; }
.media-image img { max-width: 100%; max-height: 100%; }
.media-name { font-weight: 700; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.json-view { font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; margin: 0; max-width: 420px; color: var(--app-muted); }

/* Kirish sahifasi */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: #11131a; }
.login-card { width: 100%; max-width: 420px; background: var(--app-card); color: var(--app-ink); border-radius: 24px; padding: 28px; }
