/* NovaVision V2 — task 1 additions only. The previous design files (styles.css,
   login.css) are used unmodified; this file styles the new menu behaviour and
   the home quick links with the same design tokens. */

/* Раскрытие раскрывающейся темы: поворот прежней стрелки ▾ */
nav .nav-parent[aria-expanded="true"] .caret{transform:rotate(180deg)}

.dev-btns{display:flex;gap:8px;margin-top:6px}
.card-stack{display:grid;gap:20px}

/* Быстрые переходы на «Главной» и выбор подразделов — карточки в прежнем стиле */
.quick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:14px}
.quick-card{display:flex;align-items:center;gap:14px;background:white;border:1px solid var(--line);border-radius:12px;padding:18px 20px;text-decoration:none;color:var(--ink)}
.quick-card:hover{border-color:#e5b3b8;background:#fdf7f8}
.quick-card:focus-visible{outline:3px solid #ec7d86;outline-offset:3px}
.quick-card .module-icon{height:40px;width:40px;flex-shrink:0;border-radius:10px}
.quick-card strong{display:block;font-size:16.1px;line-height:1.35}
.quick-card small{display:block;margin-top:3px;color:var(--muted);font-size:13.22px;line-height:1.4}
.quick-card>svg:last-child{margin-left:auto;width:16px;height:16px;color:#b9bec8;flex-shrink:0}

/* Задача №2 — карточка Uzum Market и «Паспорт SKU» (те же токены дизайна) */
.uz-status{display:inline-flex;align-items:center;gap:7px;font-size:13.8px;font-weight:700;padding:8px 13px;border-radius:999px;border:1px solid var(--line);white-space:nowrap}
.uz-status svg{width:15px;height:15px}
.uz-status.on{background:#eef7ee;border-color:#cfe6cf;color:#2f7d3b}
.uz-status.busy{background:#fff7df;border-color:#ecd9a0;color:#8a6d1f}
.uz-status.off{background:#f4f5f7;border-color:var(--line);color:var(--muted)}
.key-row{display:flex;gap:8px;margin-top:6px}
.key-row input{flex:1;min-width:0;font-family:ui-monospace,Consolas,monospace;letter-spacing:.4px}
.uz-shop{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-top:8px;background:white;cursor:pointer}
.uz-shop:hover{background:#fafbfd}
.uz-shop input[type=checkbox]{width:16px;height:16px;accent-color:var(--red);flex-shrink:0}
.uz-shop-name{font-size:14.95px;font-weight:650;display:flex;flex-direction:column;min-width:0}
.uz-shop-name small{color:var(--muted);font-weight:500;margin-top:2px}
.uz-shop-meta{margin-left:auto;text-align:right;max-width:55%}
.uz-shop-meta small{display:block;color:var(--muted);line-height:1.45;font-size:12.65px}
.uz-shop-off .uz-shop-name{opacity:.6}
.uzum-head{display:flex;gap:14px;align-items:center}
.sku-pager{justify-content:space-between}
th.th-r{text-align:right}
/* Диалог карточки товара (id #nv-dialog — прежний из приложения) */

/* Existing tokens, only new deliveries controls and reachable expanded navigation. */
.delivery-toolbar{align-items:flex-end}
.delivery-toolbar .field{margin:0}
.delivery-toolbar .primary{height:44px;align-self:flex-end}
.table-wrap{overflow-x:auto}
.sidebar{overflow-y:auto}
.sku-technical{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.sku-technical summary{cursor:pointer;font-size:13.8px;color:var(--muted)}
.sku-tech-item{margin-top:12px;font-size:13.8px}
.passport-card{background:white;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:14px;overflow-wrap:anywhere}
.passport-head{display:flex;justify-content:space-between;gap:16px;margin-bottom:16px}
.passport-head h3{font-size:17.25px;margin:0 0 8px}.passport-head p{font-size:14.95px;margin:0}
.passport-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.passport-fields span{display:block;color:var(--muted);font-size:13.8px;margin-bottom:5px}
.passport-fields strong{font-size:14.95px}
.passport-edit{margin-top:16px;font-size:13.8px}.passport-edit summary{cursor:pointer;color:var(--muted);margin-bottom:12px}
.passport-edit form{margin-bottom:12px}.passport-edit .field{margin:0}.passport-edit input{min-width:0;max-width:100%}
.purchase-card{background:white;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:16px;overflow-wrap:anywhere}
.purchase-card h2{font-size:19.55px;margin:0 0 16px}.purchase-card h3{font-size:17.25px;margin:20px 0 12px}
.purchase-card p{margin:8px 0;font-size:14.95px;line-height:1.5}.purchase-card a.secondary{display:inline-flex;margin-bottom:8px}
.purchase-card .table-wrap .inv-table{min-width:620px}
.batch-heading{margin-bottom:16px}
.batch-payment-tabs{display:flex;gap:28px;border-bottom:1px solid #dfe2e7;margin-bottom:24px}
.batch-payment-tabs button{position:relative;background:none;color:var(--muted);font-size:20.7px;font-weight:600;padding:0 0 14px;border-bottom:3px solid transparent;margin-bottom:-1px;white-space:nowrap}
.batch-payment-tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--red)}
.batch-pay-editor{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.batch-pay-editor summary{cursor:pointer;font-weight:650;font-size:14.95px}
.batch-payment-history{margin-top:20px;border-top:1px solid var(--line);padding-top:10px}
@media(max-width:580px){.batch-payment-tabs{gap:22px}.batch-payment-tabs button{font-size:17.25px}}
.purchase-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.purchase-line{display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)) auto;gap:12px;align-items:end;margin:16px 0}
.purchase-line .field{margin:0}.purchase-line input{min-width:0;width:100%}.purchase-line button{align-self:end}
.purchase-card .btn-row{flex-wrap:wrap}.purchase-card [data-draft]{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.purchase-line,.purchase-fields{grid-template-columns:1fr}.purchase-card{padding:16px}}
@media(max-width:600px){.passport-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.passport-head{flex-direction:column}.passport-card{padding:16px}}

/* Existing NovaVision dialog/tokens; wide purchase forms scroll inside viewport. */
#nv-dialog:has(#purchase-draft) .dlg-card,#nv-dialog:has(#batch-payment-form) .dlg-card{width:min(1100px,96vw);max-width:1100px;max-height:92vh;overflow:hidden}
[hidden]{display:none!important}
.purchase-line select{width:100%;min-width:0}
.batch-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
/* Text action buttons stay readable on phones (the legacy heading rule hides text). */
@media(max-width:580px){.page-heading>#batch-create,.page-heading>#passport-create{font-size:14.95px;flex-shrink:0;padding:11px 15px;margin-top:7px}}

.home-goal-card{margin-top:24px}.goal-metrics{margin:20px 0}.goal-quality{font-weight:650}.goal-chart{width:100%;height:auto;max-height:200px;margin:12px 0}
#goal-form .passport-fields{margin:16px 0}#goal-form input{width:100%;min-width:0}
#nv-dialog:has(#goal-form) .dlg-card{width:min(900px,96vw)}
@media(max-width:580px){.page-heading>#goal-create{font-size:14.95px;padding:11px 15px;flex-shrink:0}.goal-metrics{grid-template-columns:1fr}}
.goal-source-meta{overflow-wrap:anywhere}

.goal-table{min-width:960px!important}.goal-table th,.goal-table td{word-break:normal;overflow-wrap:normal}.goal-table td:first-child{white-space:nowrap}
#settings-integrations{display:inline-flex;margin-top:12px}

/* Finance source workspace: readable operations, honest snapshot summary. */
.uf-layout{min-width:0}.uf-heading{align-items:center}.uf-heading .field{min-width:180px}
.uf-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 32px}
.uf-summary article{background:#fff;border:1px solid var(--border,#e5e7eb);border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:12px;min-width:0}
.uf-summary strong{font-size:32.2px;line-height:1.3;font-variant-numeric:tabular-nums}.uf-summary small,.uf-meta,.uf-source-note{color:#7c8290;font-size:14.95px}.uf-summary .uf-unavailable{font-size:21.85px}
.uf-operations h2{font-size:27.6px;margin:0 0 20px}.uf-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.uf-tabs button{border:0;border-radius:24px;box-shadow:none;background:transparent;color:inherit;padding:10px 18px}.uf-tabs button.primary{background:#22252c;color:#fff}
.uf-panel{background:#fff;border:1px solid #e6e8ee;border-radius:20px;overflow:hidden;min-width:0}
.uf-controls{display:flex;align-items:end;gap:12px;padding:20px;flex-wrap:wrap}.uf-controls .field{margin:0;min-width:130px}.uf-search{flex:1}.uf-controls input,.uf-controls select{width:100%}
.uf-filter-panel summary{cursor:pointer;background:#f0f1f4;padding:13px 18px;border-radius:10px;font-weight:650;list-style:none}.uf-date-filters{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.uf-filter-panel[open]{flex-basis:100%;order:2}
.uf-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:0 20px 12px}.uf-meta p{margin:0}.uf-row-count{padding:0 20px;margin:8px 0;font-size:13.8px}
.uf-data-table{min-width:1500px;width:100%;table-layout:fixed}.uf-data-table th,.uf-data-table td{padding:16px!important;vertical-align:top;font-size:14.95px}.uf-data-table th{background:#fafbfc;white-space:normal;font-weight:650;color:#5c6270}
.uf-data-table th:nth-child(1),.uf-data-table th:nth-child(2){width:155px}.uf-data-table th:nth-child(3){width:130px}.uf-data-table th:nth-child(4){width:290px}
.uf-data-table td:nth-child(n+5):nth-child(-n+10){font-variant-numeric:tabular-nums;white-space:nowrap}.uf-data-table td:nth-child(4){overflow-wrap:anywhere}.uf-data-table small{color:#7c8290}
.uf-status-badge{display:inline-flex;align-items:center;gap:7px;white-space:normal}.uf-status-badge:before{content:'';width:8px;height:8px;border-radius:50%;background:#ed9f31;flex-shrink:0}.uf-status-badge[data-status=TO_WITHDRAW]:before,.uf-status-badge[data-status=CONFIRMED]:before{background:#28a66a}.uf-status-badge[data-status=REFUNDED]:before,.uf-status-badge[data-status=CANCELED]:before{background:#de5865}
.uf-panel .sku-pager{padding:16px 20px}.uf-source-note{margin-top:18px}.uf-source-note summary{cursor:pointer}.home-goal-card{margin-bottom:24px}
@media(max-width:700px){.uf-summary{grid-template-columns:1fr;gap:10px;margin-bottom:24px}.uf-summary article{padding:18px}.uf-heading{flex-wrap:wrap}.uf-controls{padding:14px;gap:10px}.uf-controls .field{min-width:0;flex:1 1 130px}.uf-date-filters .field{flex:1;min-width:120px}.uf-summary strong{font-size:27.6px}.uf-layout .page-heading{gap:16px}.uf-data-table{min-width:1450px}}

.uf-data-table{min-width:1800px}.uf-data-table th:nth-child(11){width:170px}.uf-data-table th:nth-child(12){width:180px}.uf-data-table td:last-child summary{white-space:nowrap}.uf-data-table tbody td{padding:14px 16px!important}

/* Readability and shared control rhythm; same POLYGON typefaces and colours. */
body{font-weight:500;line-height:1.45}.field{line-height:1.45}.field input,.field select,.field textarea,.mini-select{min-height:44px}
button.primary,button.secondary,.btn-danger{min-height:44px}.icon-button{min-width:44px;min-height:44px}
.toolbar{align-items:flex-end;gap:12px;flex-wrap:wrap}.toolbar .field{margin-bottom:0}.btn-row{align-items:center;gap:12px;flex-wrap:wrap}
.uf-controls .secondary{height:44px}.uf-controls summary{min-height:44px}.uf-controls .field select{min-width:150px}.uf-meta{line-height:1.5}
@media(max-width:700px){.toolbar>.field{flex:1 1 150px;min-width:0}.btn-row>button{max-width:100%}.page-heading{flex-wrap:wrap}.uf-controls .field select{min-width:0}}

.wordmark img{object-fit:contain;border-radius:0}.login .wordmark img{object-fit:contain}

.passport-cost-info{margin-top:18px;border-top:1px solid var(--line);padding-top:14px;font-size:13.8px;color:var(--muted)}.passport-cost-info summary{cursor:pointer}

.sidebar>nav{margin-top:28px}

#sku-list{max-width:100%;overflow-x:auto}#sku-list>.inv-table{min-width:900px}

@media(max-width:850px){.module-top{flex-wrap:wrap;gap:12px}.uzum-head{flex:1 1 180px;min-width:0}.uzum-head>div{min-width:0}.module-card{min-width:0}.uz-shop{flex-wrap:wrap}.uz-shop-meta{max-width:100%}}

.batch-payment-tabs{max-width:100%;overflow-x:auto;scrollbar-width:thin}.batch-payment-tabs button{flex-shrink:0;min-height:44px}

/* Intrinsic cell sizing: exact int64 IDs and monetary strings must never overlap. */
.uf-data-table{table-layout:auto;width:max-content;min-width:1800px}
.uf-data-table td:nth-child(3){white-space:nowrap}
.uf-data-table td:nth-child(4){width:auto;max-width:none;white-space:nowrap;overflow-wrap:normal}

/* Section links share a left edge and reserve room for complete titles. */
.quick-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
.quick-card{min-width:0;gap:16px}
.quick-card>div{min-width:0;flex:1;text-align:left}
.quick-card strong{overflow-wrap:normal;word-break:normal}
@media(min-width:600px){.quick-card strong{white-space:nowrap}}

.entity-reference{display:inline-block;max-width:100%;font-size:12px;font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--muted,#a8a9b8)}
