/* 16-shell-2026.css — The 2026 shell restyle: sidebar and top bar, the «+ Yangi» and Excel menus,
   the settings hub. Overrides 02-layout.css.
   Part of the CRM stylesheet: the files load in number order (components/app_styles.html) and later
   rules win, exactly as when this was one file. */

/* ==========================================================================
   2026 shell: short menu, search in the top bar, one "+ Yangi" menu, settings hub
   ========================================================================== */
.sidebar { padding: 20px 14px 14px; overflow-y: auto; scrollbar-width: thin; }
.brand { padding: 4px 12px 22px; }
.nav-group { margin-bottom: 14px; }
.nav-title { padding: 8px 12px 6px; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--faint); }
.nav-link svg { width: 18px; height: 18px; color: var(--muted); }
.nav-link.active::before { left: -14px; }
.nav-bottom { margin-top: auto; margin-bottom: 8px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.nav-bottom + .sidebar-prefs, .nav-bottom ~ .sidebar-prefs { margin-top: 0; }
.sidebar-prefs { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; }
.sidebar-user { padding: 8px 8px 8px 10px; }
.sidebar-user-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; border-radius: 8px; }
.sidebar-user-link .meta { display: block; min-width: 0; line-height: 1.25; }
.sidebar-user-link .meta b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-link .meta span { display: block; font-size: 12px; color: var(--muted); }

.topbar { height: 64px; gap: 10px; padding: 0 28px; }
.topbar-search { position: relative; margin-right: auto; width: min(460px, 100%); }
.topbar-search input { width: 100%; height: 40px; padding: 0 44px 0 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.topbar-search input::placeholder { color: var(--faint); }
.topbar-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft-2); }
.topbar-search svg { position: absolute; left: 13px; top: 13px; color: var(--faint); pointer-events: none; }
.topbar-search kbd { position: absolute; right: 10px; top: 10px; height: 20px; min-width: 20px; padding: 0 6px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; }
.topbar-avatar { display: grid; place-items: center; border-radius: 50%; }
.topbar-avatar .avatar { width: 36px; height: 36px; }

.create-menu { position: relative; }
.create-menu > summary { list-style: none; }
.create-menu > summary::-webkit-details-marker { display: none; }
.create-menu[open] > summary { background: var(--primary-strong); }
.create-menu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 300px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); animation: menu-in .14s ease; }
.create-menu-list > a, .create-menu-list > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.create-menu-list > :hover, .create-menu-list > :focus-visible { background: var(--surface-3); }
.create-menu-list b { display: block; font-size: 14px; font-weight: 650; }
.create-menu-list small { display: block; font-size: 12.5px; color: var(--muted); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

/* The list pages' Excel menu: a quiet capsule beside the main action; its list looks like the «Yangi» menu's. */
.excel-menu { position: relative; }
.excel-menu > summary { list-style: none; }
.excel-menu > summary::-webkit-details-marker { display: none; }
.excel-menu > summary svg:last-child { color: var(--muted); }
.excel-menu[open] > summary { background: var(--surface-3); }
.create-menu-list.excel-menu-list { position: absolute; top: calc(100% + 8px); right: 0; left: auto; width: 290px; }
@media (max-width: 640px) {
  .page-actions > .excel-menu { flex: none; }
  .create-menu-list.excel-menu-list { left: 0; right: auto; width: min(290px, calc(100vw - 24px)); }
}

/* The settings hub */
.settings-groups { display: grid; gap: 28px; max-width: 1080px; }
.settings-group-title { margin-bottom: 12px; font-size: 13px; font-weight: 650; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.settings-card { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.settings-card:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.settings-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; }
.settings-icon svg { width: 20px; height: 20px; }
.create-menu-list .settings-icon { width: 36px; height: 36px; border-radius: 10px; }
.settings-text { flex: 1; min-width: 0; }
.settings-text b { display: block; font-size: 14.5px; font-weight: 650; }
.settings-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.settings-go { color: var(--faint); }
a.settings-card:hover .settings-go { color: var(--accent); }
/* A settings page opened from the hub: a way back to it. */
.back-to-settings { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.back-to-settings:hover { color: var(--accent-strong); }

@media (max-width: 820px) {
  .topbar { height: 56px; padding: 0 12px; gap: 6px; }
  .create-label { display: none; }
  .create-menu > summary { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
  .create-menu-list { position: fixed; left: 12px; right: 12px; top: calc(60px + var(--tg-safe-top, 0px)); width: auto; }
  .nav-bottom { margin-top: 8px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

