/* ---------- Dialogs ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fade .15s ease-out; }
.backdrop.light { background: rgba(255,255,255,.5); }
.dlg { max-height: calc(100vh - 32px); overflow: auto; animation: pop .18s ease-out; width: 100%; }
.dlg-prompt { background: #EDE9DC; border-radius: 24px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); max-width: 610px; padding: 28px; color: #363A3A; }
.pr-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.c56 { width: 56px; height: 56px; border-radius: 50%; background: var(--pl); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pr-head h1 { font-size: 24px; font-weight: 600; color: #363A3A; }
.pr-body { display: flex; flex-direction: column; gap: 20px; font-size: 16px; }
.stable { display: flex; flex-direction: column; gap: 16px; }
.st-row { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; color: #363A3A; }
.st-row.head { font-size: 18px; font-weight: 700; }
.st-row.total { padding-top: 36px; }
.st-row.total span:first-child { font-size: 18px; font-weight: 700; }
.pr-actions { display: flex; justify-content: center; gap: 24px; padding-top: 24px; }
.pr-loading { display: flex; justify-content: center; align-items: center; gap: 12px; padding-top: 24px; color: var(--pl); font-size: 16px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner.sm { width: 16px; height: 16px; }

.dlg-inv { background: #EDE9DC; border-radius: 24px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); max-width: 610px; padding: 36px; color: #363A3A; }
.inv-ic { width: 90px; height: 90px; border-radius: 50%; background: var(--pl); color: #fff; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; }
.inv-r { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; }
.inv-r b { font-size: 18px; font-weight: 700; }
.inv-r span { font-size: 16px; text-align: right; }
.inv-div { border-top: 1px solid #D9D9D9; margin: 16px 0; }
.inv-items { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 10px 16px; font-size: 16px; }
.inv-items .h { font-size: 18px; font-weight: 700; }
.inv-items .r { text-align: right; }
.inv-items .c { text-align: center; }
.inv-actions { display: flex; justify-content: center; padding-top: 24px; }

.dlg-pay { position: relative; background: #FBF9F5; border-radius: 16px; padding: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); text-align: center; }
.dlg-pay.w576 { max-width: 576px; }
.dlg-pay.w512 { max-width: 512px; }
.dlg-pay.w448 { max-width: 448px; }
.pm-icon { width: 80px; height: 80px; border-radius: 50%; margin: 8px auto 24px; display: flex; align-items: center; justify-content: center; color: #fff; }
.dlg-pay h2 { font-size: 24px; font-weight: 700; color: #101828; margin-bottom: 16px; }
.pm-text { color: #364153; font-size: 16px; margin-bottom: 16px; line-height: 1.5; }
.pm-text.soft { color: #4a5565; }
.pm-warn { color: #ff6467; font-size: 14px; margin-bottom: 12px; line-height: 1.5; }
.pm-actions { display: flex; justify-content: center; gap: 16px; margin: 24px 0 8px; flex-wrap: wrap; }
.pm-gift { width: 96px; height: auto; margin: 4px auto 16px; display: block; }
.tbtn { padding: 12px 32px; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: background .15s; display: inline-flex; align-items: center; gap: 8px; }
.tbtn:disabled { opacity: .7; cursor: not-allowed; }
.tbtn-white { background: #fff; border-color: #d1d5dc; color: #364153; }
.tbtn-white:hover { background: #f9fafb; }
.tbtn-red { background: #fb2c36; color: #fff; }
.tbtn-red:hover:not(:disabled) { background: #e7000b; }
.tbtn-teal { background: var(--brand); color: #fff; padding: 12px 48px; }
.tbtn-teal:hover:not(:disabled) { background: var(--brand-dark); }

.dlg-mui { background: #fff; border-radius: 12px; padding: 24px; max-width: 880px; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12); }
.mui-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.mui-head h2 { font-size: 20px; font-weight: 600; color: var(--primary); }
.mui-head p { color: var(--muted); }
.icon-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: rgba(0,0,0,.54); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.icon-close:hover { background: rgba(0,0,0,.04); }
.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.det-block { border: 1px solid var(--divider); border-radius: 12px; padding: 16px; }
.det-block h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.det-note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.mui-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Tracking */
.dlg-track { background: #fbf6e9; border: 1px solid #acb0b0; border-radius: 16px; max-width: 896px; }
.tr-head { margin: 16px 16px 0; border-radius: 16px; padding: 24px 32px; text-align: center; background: linear-gradient(90deg, #213f3d 0%, #509892 100%); }
.tr-head .c90 { width: 90px; height: 90px; border-radius: 50%; background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.tr-head h2 { color: #fff; font-size: 24px; font-weight: 700; }
.tr-body { position: relative; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.tr-line { position: absolute; top: 205px; left: 80px; right: 80px; height: 2px; display: flex; z-index: 0; }
.tr-line .pad { flex-basis: 38px; background: #0D9488; }
.tr-line .dash { flex: 1; border-top: 2px dashed #d1d5dc; }
.tr-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.tr-img { display: flex; justify-content: center; }
.tr-img img { width: 150px; height: 150px; object-fit: contain; }
.tr-num { display: flex; justify-content: center; }
.tr-num .c { width: 32px; height: 32px; border-radius: 50%; background: #509892; color: #fff; display: flex; align-items: center; justify-content: center; }
.tr-num .c.idle { background: #fff; border: 2px solid #D1D5DB; color: #6B7280; font-size: 14px; font-weight: 700; }
.tr-card { border-radius: 12px 64px 12px 64px; padding: 16px; text-align: center; min-height: 120px; display: flex; flex-direction: column; justify-content: center; background: #ede9dc; color: #d2d5d5; transition: background .3s, color .3s; }
.tr-card.on { background: var(--brand); color: #fff; }
.tr-card .tm { font-size: 12px; margin-bottom: 8px; opacity: .8; height: 20px; }
.tr-card .tt { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.tr-card .ex { font-size: 12px; opacity: .8; height: 20px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.tr-status { text-align: center; padding: 0 16px 24px; }
.tr-status .a { font-size: 18px; font-weight: 500; color: #374151; margin-bottom: 8px; }
.tr-status .b { font-size: 16px; color: #6B7280; min-height: 24px; }
.tr-thanks { display: flex; justify-content: center; padding: 0 16px; margin-bottom: 24px; }
.tr-thanks div { padding: 16px 32px; border-radius: 8px; color: #fff; font-weight: 700; background: linear-gradient(90deg, #509892 0%, #213f3d 100%); }
.tr-save { margin: 0 16px 24px; padding: 16px; border-radius: 12px; background: #a7f3d0; color: #065f46; }
.tr-save div { display: flex; justify-content: space-between; align-items: center; }
.tr-save div + div { margin-top: 12px; }
.tr-save span { font-weight: 500; }
.tr-save b { font-weight: 700; }
.tr-close { text-align: center; padding: 0 16px 24px; }
.tr-close button { padding: 12px 32px; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-weight: 500; border: 0; cursor: pointer; }
.tr-close button:hover { background: var(--brand-dark); }
