.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); display: none; z-index: 10000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
.modal-content { background: #1c2128; width: 100%; max-width: 450px; border-radius: 20px; padding: 20px; border: 1px solid #30363d; max-height: 85vh; overflow-y: auto; }
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-track { background: #0d1117; border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

/* Кнопки документов */
.modal-content .legal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-content .btn-doc { background: #0d1117; border: 1px solid #30363d; border-radius: 10px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; width: 100%; cursor: pointer; text-align: left; color: #e3b341; transition: all 0.2s; }
.modal-content .btn-doc:active { background: #161b22; transform: scale(0.98); }
.modal-content .btn-doc i:first-child { font-size: 18px; margin-right: 8px; }
.modal-content .btn-doc i:last-child { color: #6e7681; font-size: 18px; }

/* Детальная карточка аудита (открывается из Истории) */
.premium-trip-details { display: flex; flex-direction: column; gap: 16px; }
.pt-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #30363d; }
.pt-date { font-size: 13px; color: #8b949e; font-weight: 600; }
.pt-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: flex; align-items: center; gap: 6px; }
.status-confirmed .pt-badge { background: rgba(46, 160, 67, 0.15); color: #2ea043; border: 1px solid rgba(46, 160, 67, 0.3); }
.status-unconfirmed .pt-badge { background: rgba(218, 54, 51, 0.15); color: #da3633; border: 1px solid rgba(218, 54, 51, 0.3); }

.pt-finance-hero { background: linear-gradient(145deg, #161b22, #0d1117); border: 1px solid #30363d; border-radius: 16px; padding: 20px; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
.pt-hero-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; color: #c9d1d9; }
.pt-hero-row strong { font-size: 18px; font-family: monospace; }
.pt-hero-divider { height: 1px; background: #30363d; margin: 12px 0; }
.pt-hero-loss { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: #fff; }
.pt-hero-loss strong { font-size: 24px; font-weight: 900; }
.pt-hero-net { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #30363d; text-align: center; font-size: 12px; color: #8b949e; }
.pt-hero-net span { font-weight: 800; font-size: 14px; }

.pt-param-box { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 16px; text-align: center; position: relative; overflow: hidden; }
.pt-param-box.pickup { border-bottom: 3px solid #e3b341; }
.pt-param-box.ride { border-bottom: 3px solid #2ea043; }
.pt-param-box .val { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.2; font-family: monospace; }
.pt-param-box .val small { font-size: 10px; color: #8b949e; }
.pt-param-box .lbl { font-size: 10px; color: #8b949e; text-transform: uppercase; margin-top: 8px; font-weight: 600;}

.pt-digital-trace { background: rgba(46, 160, 67, 0.05); border: 1px solid #2ea043; border-radius: 12px; padding: 15px; }
.pt-no-trace { background: rgba(218, 54, 51, 0.05); border: 1px solid rgba(218, 54, 51, 0.3); border-radius: 12px; padding: 12px; font-size: 11px; color: #da3633; display: flex; gap: 8px; align-items: center; line-height: 1.4;}

/* Тосты (Уведомления) */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999999; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 400px; pointer-events: none; }
.premium-toast { background: rgba(22, 27, 34, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 12px; animation: toastSlideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; pointer-events: auto; }
.premium-toast.closing { animation: toastFadeOut 0.3s ease-in forwards; }
.toast-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; flex-shrink: 0; }
.toast-success .toast-icon { background: rgba(46, 160, 67, 0.15); color: #2ea043; }
.toast-error .toast-icon { background: rgba(218, 54, 51, 0.15); color: #da3633; }
.toast-info .toast-icon { background: rgba(227, 179, 65, 0.15); color: #e3b341; }
.toast-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.toast-message { font-size: 12px; color: #8b949e; line-height: 1.3; }

/* Ожидание подписи (внутри Дашборда) */
.signature-waiting-block { background: linear-gradient(135deg, #1c2128 0%, #161b22 100%); border: 1px solid #e3b341; border-radius: 20px; margin-bottom: 20px; overflow: hidden; animation: fadeInUp 0.4s ease-out; }
.waiting-header-block { background: rgba(227, 179, 65, 0.1); padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(227, 179, 65, 0.2); font-size: 13px; font-weight: 600; color: #e3b341; }
.waiting-body-block { padding: 24px; text-align: center; }
.qr-code-block { background: #fff; padding: 16px; border-radius: 20px; display: inline-block; margin-bottom: 20px; }
.qr-code-block img, .qr-code-block canvas { width: 160px !important; height: 160px !important; }
.waiting-timer-block { background: rgba(0, 0, 0, 0.3); border-radius: 30px; padding: 8px 16px; display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }