.np-page { width: min(1760px, calc(100% - 48px)); margin: 0 auto 48px; display: grid; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 128px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-label, .metric-note { color: var(--muted); }
.metric-value { font-size: 30px; line-height: 1; }
.metric-date { font-size: 18px; line-height: 1.2; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.section-heading h2, .dialog-header h2 { margin: 0 0 4px; font-size: 20px; }
.section-heading p, .dialog-header p { margin: 0; }
.account-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; padding: 18px 24px 24px; }
.account-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
.account-card-head { display: flex; justify-content: space-between; gap: 12px; }
.account-card h3 { margin: 0; font-size: 17px; }
.account-id { color: var(--muted); font: 12px/1.3 ui-monospace, monospace; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.off { background: #f1f5f9; color: #64748b; }
.account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.account-meta span { display: block; color: var(--muted); font-size: 12px; }
.account-meta strong { display: block; margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sync-error { padding: 9px 11px; border-radius: 9px; background: #fef2f2; color: #b91c1c; font-size: 12px; }
.filters { padding: 16px 24px; display: grid; grid-template-columns: 190px minmax(240px, 1fr) 160px auto auto; align-items: end; gap: 12px; border-bottom: 1px solid var(--border); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
input, select { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: #fff; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid rgba(37, 99, 235, .18); border-color: var(--primary); }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.shipments-table { min-width: 1080px; table-layout: auto; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: #fff; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.shipment-row { cursor: pointer; transition: background-color .12s ease; }
.shipment-row:hover { background: #f8fafc; }
.shipment-row.row-closed { color: #64748b; background: #fbfcfd; }
.shipment-row.row-draft { background: #fffbeb; }
.shipment-row.row-pending { background: #f8fafc; }
.shipment-row.row-deleted { opacity: .68; }
.shipment-link { color: var(--primary); font: 650 13px/1.3 ui-monospace, monospace; text-decoration: none; white-space: nowrap; }
.shipment-link:hover { text-decoration: underline; }
.cell-main { display: block; font-weight: 650; color: var(--text); white-space: nowrap; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.date-cell { min-width: 128px; white-space: nowrap; }
.recipient-cell { min-width: 185px; max-width: 260px; }
.recipient-cell .cell-main { overflow: hidden; text-overflow: ellipsis; }
.phone-value { font-family: ui-monospace, monospace; }
.status-cell { min-width: 230px; max-width: 330px; }
.status-line { display: flex; align-items: center; gap: 7px; }
.status-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-badge.draft { background: #fef3c7; color: #92400e; }
.status-badge.closed { background: #e2e8f0; color: #475569; }
.status-badge.pending { background: #f1f5f9; color: #64748b; }
.status-badge.deleted { background: #fee2e2; color: #b91c1c; }
.status-text { display: block; margin-top: 5px; font-size: 12px; line-height: 1.35; }
.money-column, .money-cell { text-align: right; }
.money-cell { min-width: 92px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.loading-overlay { padding: 24px; text-align: center; color: var(--muted); }
.empty-state { padding: 34px 24px; text-align: center; color: var(--muted); }
.load-more-row { display: flex; justify-content: center; padding: 16px; }
.notice { position: sticky; top: 12px; z-index: 50; padding: 12px 15px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; color: #1d4ed8; box-shadow: var(--shadow); }
.notice.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.notice.success { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 5vh 20px; overflow: auto; background: rgba(15, 23, 42, .48); }
.dialog { width: min(760px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(15, 23, 42, .28); }
.settings-dialog { width: min(1180px, 100%); }
.settings-heading { padding-top: 18px; padding-bottom: 16px; }
.shipment-dialog { width: min(980px, 100%); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--border); background: #fff; }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f1f5f9; cursor: pointer; font-size: 24px; line-height: 1; }
.account-form { padding: 20px 22px 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-wide { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--text); }
.check-row input { width: 17px; min-height: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-error { margin-top: 16px; padding: 10px 12px; border-radius: 9px; background: #fef2f2; color: #b91c1c; }
.shipment-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 22px; }
.detail-item { min-height: 72px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.detail-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.detail-item strong { overflow-wrap: anywhere; }
.detail-item.detail-wide { grid-column: span 2; }
.detail-item a { color: var(--primary); text-decoration: none; }
.detail-item a:hover { text-decoration: underline; }
.detail-section { padding: 0 22px 20px; }
.detail-section h3 { margin: 0 0 12px; font-size: 15px; }
.relations-list { display: grid; gap: 8px; }
.relation { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: #f8fafc; font: 12px ui-monospace, monospace; }
.relation a { color: var(--primary); text-decoration: none; }
.relation a:hover { text-decoration: underline; }
.relation-type { color: var(--muted); font-family: inherit; }
.relation-check { color: var(--muted); font: 11px/1.3 system-ui, sans-serif; white-space: nowrap; }
.raw-details { margin: 0 22px 14px; border: 1px solid var(--border); border-radius: 10px; }
.raw-details summary { padding: 12px; cursor: pointer; font-weight: 600; }
.raw-details pre { max-height: 380px; margin: 0; padding: 14px; overflow: auto; border-top: 1px solid var(--border); background: #0f172a; color: #dbeafe; font: 12px/1.5 ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; }
body.modal-open { overflow: hidden; }
@media (max-width: 1050px) { .overview-grid { grid-template-columns: 1fr 1fr; } .filters { grid-template-columns: 1fr 1fr; } .filter-search { grid-column: span 2; } }
@media (max-width: 700px) { .np-page { width: min(100% - 24px, 1760px); } .overview-grid, .form-grid, .shipment-details { grid-template-columns: 1fr; } .filters { grid-template-columns: 1fr; } .filter-search, .form-wide, .detail-item.detail-wide { grid-column: auto; } .account-list { grid-template-columns: 1fr; padding: 14px; } .section-heading { align-items: flex-start; padding: 18px; } }
