:root{color-scheme:light dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--tg-theme-bg-color, #f3f4f6);color:var(--tg-theme-text-color, #17212b)}*{box-sizing:border-box}body{margin:0;min-width:0;min-height:100vh;background:linear-gradient(180deg,rgba(16,185,129,.08),transparent 220px),var(--tg-theme-bg-color, #f3f4f6)}button,input,textarea{font:inherit}button:disabled{cursor:not-allowed;opacity:.52}.app-shell{min-height:100vh;padding:calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 24px)}.topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;max-width:1040px;margin:0 auto 20px}.topbar-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.brand{display:grid;gap:2px;min-width:0}.brand-title{margin:0;font-size:24px;line-height:1.1}.brand-subtitle{margin:0;color:var(--tg-theme-hint-color, #6b7280);font-size:14px}.auth-pill{display:inline-flex;max-width:100%;min-height:36px;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--tg-theme-section_separator_color, #d1d5db);border-radius:8px;color:var(--tg-theme-hint-color, #6b7280);background:var(--tg-theme-secondary-bg-color, #ffffff);font-size:13px;font-weight:750;white-space:nowrap}.wallet-pill{display:inline-flex;min-height:36px;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--tg-theme-section_separator_color, #d1d5db);border-radius:8px;font-size:13px;font-weight:750;text-decoration:none;white-space:nowrap}.wallet-ready{color:#065f46;background:#d1fae5;border-color:#a7f3d0}.wallet-missing{color:#854d0e;background:#fef3c7;border-color:#fde68a}.auth-ok{color:#065f46;background:#d1fae5;border-color:#a7f3d0}.auth-error{color:#991b1b;background:#fee2e2;border-color:#fecaca}.icon-button,.primary-button,.secondary-button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;cursor:pointer;font-weight:650}.icon-button{width:44px;color:#fff;background:#17212b}.primary-button{width:100%;color:#fff;background:#0f766e}.secondary-button{width:100%;color:#17212b;background:#e5e7eb}.main-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;max-width:1040px;margin:0 auto}.marketplace-panel,.seller-panel,.seller-profile-panel,.admin-listing-panel,.admin-seller-panel,.admin-report-panel,.admin-outbox-panel{grid-column:1 / -1}.operations-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0 16px 16px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-secondary-bg-color, #f8fafc)}.operations-summary div{display:grid;gap:4px;min-width:0}.operations-summary span,.operations-summary small{color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.operations-summary strong{overflow-wrap:anywhere;font-size:16px}.operations-summary-clear{border-color:#bbf7d0;background:#f0fdf4}.operations-summary-attention{border-color:#fde68a;background:#fffbeb}.operations-summary-critical{border-color:#fecaca;background:#fef2f2}.wallet-panel{grid-column:1 / -1}.panel{border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-secondary-bg-color, #ffffff)}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--tg-theme-section_separator_color, #e5e7eb)}.panel-title{margin:0;font-size:16px}.panel-caption{margin:4px 0 0;color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.search-strip{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:16px;padding:11px 12px;border:1px solid var(--tg-theme-section_separator_color, #d1d5db);border-radius:8px;color:var(--tg-theme-hint-color, #6b7280);background:var(--tg-theme-bg-color, #ffffff)}.search-strip input,.search-strip select{min-width:0;min-height:38px;border:0;color:var(--tg-theme-text-color, #17212b);background:transparent;font:inherit}.search-strip input{flex:1 1 220px}.search-strip select{flex:0 1 170px}.search-strip input:focus,.search-strip select:focus{outline:2px solid #14b8a6;outline-offset:3px}.search-strip input::placeholder{color:var(--tg-theme-hint-color, #6b7280)}.search-button{width:38px;min-height:38px;color:#fff;background:#17212b}.search-button:disabled{cursor:not-allowed;color:#9ca3af;background:#e5e7eb}.listing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0 16px 16px}.pagination-footer{display:grid}.marketplace-panel>.pagination-footer{padding:0 16px 16px}.listing-card{display:grid;gap:14px;min-height:212px;padding:14px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.listing-image,.selected-listing-image,.moderation-listing-image{display:block;width:100%;aspect-ratio:16 / 10;border-radius:8px;object-fit:cover;background:#e5e7eb}.seller-profile-grid{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;padding:16px}.seller-profile-summary{display:grid;align-content:start;gap:12px;min-width:0}.selected-listing-image{aspect-ratio:4 / 3}.seller-profile-summary>div:first-child{display:grid;gap:4px}.seller-profile-summary strong{font-size:18px}.seller-profile-summary span,.seller-profile-summary p,.seller-profile-summary small{color:var(--tg-theme-hint-color, #6b7280)}.seller-profile-summary p{margin:0;line-height:1.45}.seller-rating-block{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.seller-reviews{display:grid;gap:10px;min-width:0}.seller-review-row{display:grid;gap:8px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.seller-review-row p{margin:0;color:var(--tg-theme-text-color, #17212b);line-height:1.45}.listing-footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.rating{display:inline-flex;align-items:center;gap:4px;color:#854d0e;font-size:13px;font-weight:750}.compact-button{min-height:38px}.selected-listing{display:grid;gap:4px;padding:12px;border:1px solid #99f6e4;border-radius:8px;background:#ccfbf1}.selected-listing span,.selected-listing small{color:#0f766e;font-size:12px;font-weight:700}.selected-listing strong{color:#134e4a}.deal-list{display:grid;gap:0}.empty-state{display:grid;gap:6px;padding:16px;color:var(--tg-theme-hint-color, #6b7280)}.empty-state strong{color:var(--tg-theme-text-color, #17212b)}.compact-empty{padding:8px 0 0}.inline-loading{display:inline-flex;align-items:center;gap:8px;color:var(--tg-theme-hint-color, #6b7280);font-size:13px;font-weight:700}.listing-empty{grid-column:1 / -1}.deal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px;border-bottom:1px solid var(--tg-theme-section_separator_color, #e5e7eb)}.deal-row:last-child{border-bottom:0}.deal-title{margin:0 0 6px;font-size:15px}.deal-meta{margin:0;color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.amount{font-weight:750;text-align:right;white-space:nowrap}.status{display:inline-flex;align-items:center;gap:6px;width:fit-content;margin-top:10px;padding:4px 8px;border-radius:8px;font-size:12px;font-weight:700}.status-funded{color:#065f46;background:#d1fae5}.status-payment{color:#854d0e;background:#fef3c7}.status-dispute{color:#991b1b;background:#fee2e2}.status-neutral{color:#374151;background:#f3f4f6}.create-form{display:grid;gap:14px;padding:16px}.seller-dashboard{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);gap:16px;padding:16px}.seller-form,.seller-list{display:grid;gap:14px;align-content:start}.seller-profile-form{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.8fr) auto;gap:12px;align-items:end;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.seller-profile-form-copy{display:grid;gap:4px;min-width:0}.seller-profile-form-copy span{color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.seller-form-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.seller-form-header .secondary-button{width:auto}.wallet-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);gap:16px;padding:16px}.wallet-form,.wallet-list{display:grid;gap:14px;align-content:start}.wallet-default{display:grid;gap:4px;padding:12px;border:1px solid #99f6e4;border-radius:8px;background:#ccfbf1}.wallet-default span,.wallet-default small{color:#0f766e;font-size:12px;font-weight:700}.wallet-default strong{color:#134e4a}.wallet-row{display:grid;gap:10px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.wallet-row-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.wallet-row-header>div{min-width:0}.wallet-row-header strong{overflow-wrap:anywhere}.wallet-meta,.wallet-address{margin:0;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;line-height:1.4}.wallet-address{color:var(--tg-theme-text-color, #17212b);overflow-wrap:anywhere}.default-badge{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:8px;color:#065f46;background:#d1fae5;font-size:12px;font-weight:800}.report-queue{display:grid;gap:12px;padding:16px}.report-row{display:grid;gap:10px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.report-row-header,.report-meta,.report-actions{display:flex;align-items:center;gap:10px}.report-row-header{justify-content:space-between}.report-meta{flex-wrap:wrap;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.report-row p{margin:0;line-height:1.45}.seller-verification-box{display:grid;gap:10px;padding-top:10px;border-top:1px solid var(--tg-theme-section_separator_color, #e5e7eb)}.seller-verification-header{display:flex;align-items:center;gap:10px}.seller-verification-header>div{display:grid;gap:2px;min-width:0;margin-right:auto}.seller-verification-header small{overflow-wrap:anywhere;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.seller-verification-controls{display:grid;grid-template-columns:180px minmax(0,1fr) 180px;gap:10px;align-items:end}.seller-verification-controls textarea{min-height:58px}.seller-history-button{margin-top:10px}.seller-history-box{display:grid;gap:10px;padding-top:10px;border-top:1px solid var(--tg-theme-section_separator_color, #e5e7eb)}.seller-history-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.seller-history-header button{display:inline-flex;min-height:32px;align-items:center;gap:6px;padding:0 10px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;color:var(--tg-theme-text-color, #17212b);background:var(--tg-theme-secondary-bg-color, #f8fafc);font-weight:800}.seller-history-list{display:grid;gap:8px;padding:0;margin:0;list-style:none}.seller-history-item{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.seller-history-item strong,.seller-history-item span,.seller-history-item small{overflow-wrap:anywhere}.seller-history-item span,.seller-history-item small{color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.seller-history-empty{margin:0}.moderation-listing-image{max-height:240px}.report-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.outbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:16px}.outbox-column{display:grid;align-content:start;gap:12px}.outbox-column-header{display:flex;align-items:center;gap:8px;color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.outbox-row{display:grid;gap:10px;min-width:0;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.outbox-details{display:grid;gap:6px;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;line-height:1.35}.outbox-details span{overflow-wrap:anywhere}.outbox-actions{display:grid;gap:8px;padding-top:2px}.field-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.seller-listing-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.seller-listing-thumb{display:block;width:68px;aspect-ratio:1;border-radius:8px;object-fit:cover;background:#e5e7eb}.seller-listing-thumb-empty{border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);background:linear-gradient(135deg,rgba(15,118,110,.12),transparent 45%),var(--tg-theme-secondary-bg-color, #ffffff)}.seller-listing-actions{grid-column:1 / -1;display:grid}.order-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:0 16px 16px}.order-events{display:grid;gap:12px;padding:0 16px 16px}.order-events-header{display:inline-flex;align-items:center;gap:8px;color:var(--tg-theme-text-color, #17212b)}.order-events-header h3{margin:0;font-size:15px}.order-event-list{display:grid;gap:0;margin:0;padding:0;list-style:none}.order-event{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;padding:10px 0;border-top:1px solid var(--tg-theme-section_separator_color, #e5e7eb)}.order-event-marker{width:10px;height:10px;margin-top:4px;border-radius:999px;background:#0f766e}.order-event-marker-alert{background:#dc2626}.order-event-marker-muted{background:#9ca3af}.order-event strong,.order-event span,.order-event small{display:block}.order-event strong{font-size:13px}.order-event span,.order-event small{color:var(--tg-theme-hint-color, #6b7280)}.order-event span{margin-top:3px;line-height:1.4}.order-event small{margin-top:5px;font-size:12px}.dispute-box{padding:0 16px 16px}.dispute-evidence-box{display:grid;gap:12px;margin:0 16px 16px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.dispute-evidence-list{display:grid;gap:8px;padding:0;margin:0;list-style:none}.dispute-evidence-item{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-secondary-bg-color, #f8fafc)}.dispute-evidence-item span,.dispute-evidence-item small{overflow-wrap:anywhere;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.dispute-evidence-form{display:grid;gap:10px}.admin-resolution-box{display:grid;gap:12px;margin:0 16px 16px;padding:12px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff}.admin-resolution-header{display:inline-flex;align-items:center;gap:8px;color:#1e40af;font-weight:800}.resolution-toggle{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.resolution-option{min-height:40px;border:1px solid #bfdbfe;border-radius:8px;color:#1e3a8a;background:#fff;cursor:pointer;font-weight:750}.resolution-option-active{color:#fff;background:#2563eb;border-color:#2563eb}.order-history{display:grid;gap:8px;padding:0 16px 16px}.order-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;color:var(--tg-theme-text-color, #17212b);background:var(--tg-theme-bg-color, #ffffff);text-align:left}.order-history-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-history-row strong{color:var(--tg-theme-hint-color, #6b7280);font-size:12px}.order-history-row-active{border-color:#5eead4;background:#ccfbf1}.payment-box{display:grid;gap:5px;margin:0 16px 16px;padding:12px;border:1px solid #99f6e4;border-radius:8px;background:#ccfbf1;overflow-wrap:anywhere}.payment-box span,.payment-box small{color:#0f766e;font-size:12px;font-weight:700}.payment-box strong{color:#134e4a;font-size:13px}.review-box{display:grid;gap:12px;margin:0 16px 16px;padding:12px;border:1px solid #fde68a;border-radius:8px;background:#fffbeb}.review-header{display:inline-flex;align-items:center;gap:8px;color:#92400e;font-weight:800}.review-saved{display:grid;gap:4px;color:#78350f}.report-box{display:grid;gap:10px;padding:12px;border:1px solid #fecaca;border-radius:8px;background:#fef2f2}.compact-report-box{padding:10px}.compact-report-box textarea{min-height:72px}.order-report-box{margin-top:12px}.report-header{display:inline-flex;align-items:center;gap:8px;color:#991b1b;font-weight:800}.field{display:grid;gap:6px}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid var(--tg-theme-section_separator_color, #d1d5db);border-radius:8px;padding:11px 12px;color:var(--tg-theme-text-color, #17212b);background:var(--tg-theme-bg-color, #ffffff)}.field textarea{min-height:88px;resize:vertical}.checkbox-field{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700}.checkbox-field input{width:18px;height:18px;accent-color:#0f766e}.notice{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:8px;color:#78350f;background:#fef3c7;font-size:13px;line-height:1.45}.settlement-warning{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #fde68a;border-radius:8px;color:#78350f;background:#fffbeb;font-size:13px;line-height:1.45}.order-settlement-warning{margin:0 16px 16px}.danger-button{color:#991b1b;background:#fee2e2}.chat-panel{display:grid;gap:14px;padding:16px}.conversation-list{display:grid;gap:8px}.conversation-list-header{display:flex;align-items:center;justify-content:space-between;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:800;text-transform:uppercase}.conversation-item{display:grid;min-width:0;gap:4px;padding:10px 12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;color:var(--tg-theme-text-color, #17212b);background:var(--tg-theme-bg-color, #ffffff);text-align:start;cursor:pointer}.conversation-item-active{border-color:#0f766e;background:#ecfdf5}.conversation-item-top{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px}.conversation-item-top strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-unread{display:inline-flex;min-width:22px;height:22px;align-items:center;justify-content:center;padding:0 6px;border-radius:999px;color:#fff;background:#0f766e;font-size:12px;font-weight:800}.conversation-item span,.conversation-item small{overflow-wrap:anywhere;color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.conversation-item .conversation-unread{color:#fff;font-weight:800;overflow-wrap:normal}.conversation-item .conversation-item-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-history{display:grid;gap:10px}.chat-empty{display:flex;align-items:center;gap:8px;color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.chat-message{display:grid;justify-self:start;max-width:min(100%,460px);gap:4px;padding:10px 12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.chat-message-own{justify-self:end;border-color:#0f766e;background:#ecfdf5}.chat-message span,.chat-message small{color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.chat-message p{margin:0;overflow-wrap:anywhere;font-size:13px;line-height:1.45}.chat-status,.message-preview,.read-receipt{display:grid;gap:4px;padding:12px;border:1px solid var(--tg-theme-section_separator_color, #e5e7eb);border-radius:8px;background:var(--tg-theme-bg-color, #ffffff)}.chat-status span,.message-preview span,.message-preview small,.read-receipt span{color:var(--tg-theme-hint-color, #6b7280);font-size:12px;font-weight:700}.message-preview p{margin:0;font-size:13px;line-height:1.45}.timeline{display:grid;gap:12px;padding:16px}.timeline-step{display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:start}.timeline-step p{margin:0;color:var(--tg-theme-hint-color, #6b7280);font-size:13px}.action-state{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:8px;font-size:13px;line-height:1.45}.action-busy{color:#164e63;background:#cffafe}.action-success{color:#065f46;background:#d1fae5}.action-error{color:#991b1b;background:#fee2e2}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:820px){.main-grid,.listing-grid,.seller-dashboard,.seller-profile-form,.seller-profile-grid,.wallet-grid,.outbox-grid,.operations-summary,.field-row,.seller-verification-controls,.order-actions,.report-actions{grid-template-columns:1fr}}
