:root {
    --tr-green: #006838;
    --tr-green-dark: #004d2a;
    --tr-green-deep: #1a5319;
    --tr-green-soft: #e8f3eb;
    --tr-green-muted: #c5e1c8;
    --tr-green-pale: #f3faf4;
    --tr-gold: #c4a35a;
    --tr-gold-dark: #765c24;
    --tr-text: #1f2937;
    --tr-text-muted: #6b7280;
    --tr-border: #e5e7eb;
    --tr-bg: #f6f7f9;
    --tr-white: #ffffff;
    --tr-radius: 16px;
    --tr-radius-sm: 12px;
    --tr-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    --tr-header-h: 76px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.tr-body {
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--tr-bg);
    color: var(--tr-text);
    min-height: 100vh;
}

a {
    color: var(--tr-green);
    text-decoration: none;
}

button {
    font-family: inherit;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(0, 104, 56, 0.3);
    outline-offset: 3px;
}

.tr-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--tr-header-h);
    background: var(--tr-white);
    border-bottom: 1px solid var(--tr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 16px;
}

.tr-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    color: var(--tr-gold-dark);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.tr-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(180deg, #e8c56b 0%, #c4a35a 100%);
    color: #5b4314;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(196, 163, 90, 0.35);
}

.tr-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tr-step {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d1d5db;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
}

.tr-step.is-active {
    color: var(--tr-green-dark);
    background: var(--tr-green-soft);
    border-color: var(--tr-green);
    box-shadow: 0 2px 8px rgba(0, 104, 56, 0.12);
}

.tr-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4b5563;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.tr-step.is-active .tr-step-num {
    background: var(--tr-green);
    color: #fff;
}

.tr-step.is-complete {
    color: var(--tr-green-dark);
    border-color: var(--tr-green-muted);
    background: var(--tr-green-pale);
}

.tr-step.is-complete .tr-step-num {
    background: var(--tr-green);
    color: #fff;
}

.tr-step:disabled {
    cursor: default;
}

.tr-step:not(:disabled):hover {
    border-color: var(--tr-green);
    color: var(--tr-green-dark);
}

.tr-step-line {
    width: 40px;
    height: 3px;
    background: #d1d5db;
    border-radius: 2px;
}

.tr-step-line.is-complete {
    background: var(--tr-green-muted);
}

.tr-header-links {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 180px;
    justify-content: flex-end;
}

.tr-header-links a,
.tr-header-links button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tr-text-muted);
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.tr-header-links a:hover,
.tr-header-links button:hover {
    color: var(--tr-green);
}

.tr-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.tr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.tr-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tr-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 340px;
    background: #0b1a12 url("../image/nbqsa-hero-stage.jpg") center center / cover no-repeat;
    box-shadow: var(--tr-shadow);
    color: #fff;
}

.tr-hero-trophy {
    position: absolute;
    right: 20px;
    bottom: 0;
    height: 96%;
    width: auto;
    max-width: 48%;
    object-fit: contain;
    object-position: right bottom;
    z-index: 1;
    pointer-events: none;
}

.tr-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 34%, rgba(255, 255, 255, 0.22) 52%, rgba(255, 255, 255, 0) 68%);
    pointer-events: none;
    z-index: 2;
}

.tr-hero-content {
    position: relative;
    z-index: 3;
    max-width: 56%;
    padding: 36px 40px 32px;
}

.tr-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tr-green);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.tr-hero h1 {
    margin: 14px 0 4px;
    font-size: 34px;
    line-height: 1.15;
    color: #16351f;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.tr-hero h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--tr-gold-dark);
}

.tr-hero p {
    margin: 0 0 22px;
    color: #4b5563;
    font-size: 14px;
}

.tr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
}

.tr-btn-primary {
    background: var(--tr-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 104, 56, 0.22);
}

.tr-btn-primary:hover {
    background: var(--tr-green-dark);
}

.tr-btn-primary:disabled,
.tr-btn-primary.is-disabled {
    background: var(--tr-green-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.tr-btn-primary:not(:disabled):not(.is-disabled) {
    background: var(--tr-green);
    color: #fff;
}

.tr-btn-block {
    width: 100%;
}

.tr-btn-muted {
    background: #f3f4f6;
    color: var(--tr-text);
}

.tr-btn-muted:hover {
    background: #e5e7eb;
}

.tr-card {
    background: var(--tr-white);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius);
    box-shadow: var(--tr-shadow);
}

.tr-card-pad {
    padding: 22px;
}

.tr-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tr-section-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.tr-section-head p {
    margin: 4px 0 0;
    color: var(--tr-text-muted);
    font-size: 13px;
}

.tr-lkr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tr-green);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tr-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tr-ticket {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--tr-border);
    border-radius: 14px;
    background: #fff;
    position: relative;
}

.tr-ticket:hover,
.tr-ticket:focus-within {
    z-index: 3;
}

.tr-ticket.is-selected {
    border-color: #b7d7c0;
    background: #f7fbf8;
}

.tr-ticket-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tr-green-soft);
    color: var(--tr-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tr-ticket-copy h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.tr-ticket-copy span,
.tr-ticket-note {
    display: block;
    margin-top: 3px;
    color: var(--tr-text-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.tr-ticket-price {
    text-align: right;
    min-width: 110px;
}

.tr-ticket-price strong {
    display: block;
    font-size: 16px;
    color: var(--tr-text);
}

.tr-ticket-price s {
    color: var(--tr-text-muted);
    font-size: 12px;
}

.tr-off {
    display: inline-block;
    margin-top: 4px;
    background: var(--tr-green);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 3px 8px;
}

.tr-off-wrap {
    position: relative;
    display: inline-block;
    margin-top: 4px;
}

.tr-off-wrap .tr-off {
    margin-top: 0;
    cursor: help;
}

.tr-off-popover {
    position: fixed;
    z-index: 4000;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.18);
    pointer-events: none;
}

.tr-off-popover[hidden] {
    display: none !important;
}

.tr-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--tr-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.tr-qty button {
    width: 34px;
    height: 36px;
    border: 0;
    background: #fff;
    color: var(--tr-text);
    cursor: pointer;
    font-size: 16px;
}

.tr-qty button:hover {
    background: var(--tr-green-pale);
    color: var(--tr-green);
}

.tr-qty input {
    width: 42px;
    height: 36px;
    border: 0;
    border-left: 1px solid var(--tr-border);
    border-right: 1px solid var(--tr-border);
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--tr-text);
    -moz-appearance: textfield;
}

.tr-qty input::-webkit-outer-spin-button,
.tr-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tr-ticket-extra {
    grid-column: 1 / -1;
    display: none;
    padding-top: 8px;
}

.tr-ticket-extra.is-open {
    display: block;
}

.tr-ticket-extra .tr-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tr-ticket-extra .tr-input {
    max-width: 100%;
}

.tr-ref-hint {
    margin: 6px 0 0;
    color: var(--tr-text-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.tr-ref-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.tr-ref-row .tr-input {
    flex: 1 1 160px;
    min-width: 0;
}

.tr-ref-row .tr-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
    box-shadow: none;
    white-space: nowrap;
}

.tr-otp-row {
    margin-top: 8px;
}

.tr-otp-status {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--tr-text-muted);
}

.tr-ticket.is-otp-verified .tr-otp-status {
    color: var(--tr-green);
}

.tr-input,
.tr-textarea,
.tr-select {
    width: 100%;
    border: 1px solid var(--tr-border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--tr-text);
    background: #fff;
}

.tr-input:focus,
.tr-textarea:focus,
.tr-select:focus {
    outline: 2px solid rgba(0, 104, 56, 0.18);
    border-color: var(--tr-green);
}

.tr-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tr-req {
    color: #dc2626;
}

.tr-policy-item {
    border-top: 1px solid var(--tr-border);
}

.tr-policy-item:first-child {
    border-top: 0;
}

.tr-policy-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 4px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.tr-policy-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--tr-green-soft);
    color: var(--tr-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tr-policy-toggle strong {
    display: block;
    font-size: 14px;
}

.tr-policy-toggle small {
    color: var(--tr-text-muted);
    font-size: 12px;
}

.tr-policy-toggle .fa-chevron-down {
    margin-left: auto;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.tr-policy-item.is-open .fa-chevron-down {
    transform: rotate(180deg);
}

.tr-policy-body {
    display: none;
    padding: 0 8px 16px 52px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.6;
}

.tr-policy-item.is-open .tr-policy-body {
    display: block;
}

.tr-sidebar {
    position: sticky;
    top: calc(var(--tr-header-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tr-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tr-order-head h3 {
    margin: 0;
    font-size: 18px;
}

.tr-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    color: var(--tr-green);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.tr-empty {
    border: 1.5px dashed #d1d5db;
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    color: var(--tr-text-muted);
    margin-bottom: 16px;
}

.tr-empty i {
    font-size: 28px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.tr-empty p {
    margin: 8px 0 0;
    font-size: 13px;
}

.tr-cart-items {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.tr-cart-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.tr-cart-item span {
    color: var(--tr-text-muted);
}

.tr-cart-note {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--tr-green);
    font-weight: 600;
}

.tr-totals {
    border-top: 1px solid var(--tr-border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.tr-total-row {
    display: flex;
    justify-content: space-between;
    color: var(--tr-text-muted);
}

.tr-total-row.is-grand {
    color: var(--tr-green);
    font-size: 22px;
    font-weight: 800;
    margin-top: 6px;
}

.tr-secure-note {
    margin: 10px 0 0;
    text-align: center;
    color: var(--tr-text-muted);
    font-size: 12px;
}

.tr-deadline {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--tr-green-pale);
    border: 1px solid #d7eadb;
    border-radius: 14px;
    padding: 14px 16px;
    color: #245c32;
    font-size: 13px;
    line-height: 1.45;
}

.tr-deadline i {
    color: var(--tr-green);
    margin-top: 2px;
}

.tr-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    padding: 8px 4px 4px;
}

.tr-trust i {
    color: var(--tr-green);
    font-size: 16px;
    margin-bottom: 4px;
}

.tr-trust strong {
    display: block;
    font-size: 12px;
}

.tr-trust span {
    display: block;
    color: var(--tr-text-muted);
    font-size: 11px;
}

.tr-history {
    display: none;
}

.tr-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow: auto;
}

.tr-history-item {
    border: 1px solid var(--tr-border);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
}

.tr-history-item.is-selectable {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tr-history-item.is-selectable:hover,
.tr-history-item.is-selectable:focus-visible {
    border-color: var(--tr-green);
}

.tr-history-item.is-selected {
    border-color: var(--tr-green);
    background: var(--tr-green-pale);
    box-shadow: 0 0 0 2px rgba(0, 104, 56, 0.16);
}

.tr-history-hint {
    margin: -4px 0 12px;
    font-size: 12px;
    color: var(--tr-green);
    font-weight: 600;
}

.tr-history-status {
    margin-top: 6px;
}

.tr-lookup-status {
    min-height: 18px;
    margin: 8px 0 0;
    color: var(--tr-text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.tr-lookup-status.is-error {
    color: #b91c1c;
}

.tr-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}

.tr-badge-info { background: #e0f2fe; color: #075985; }
.tr-badge-ok { background: #dcfce7; color: #166534; }
.tr-badge-warning { background: #fef3c7; color: #854d0e; }
.tr-badge-primary { background: #dbeafe; color: #1d4ed8; }
.tr-badge-danger { background: #fee2e2; color: #b91c1c; }

.tr-mini-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    margin-right: 4px;
    border: 0;
    cursor: pointer;
}

.tr-mini-pay { background: var(--tr-green); color: #fff; }
.tr-mini-upload { background: #f59e0b; color: #fff; }

.tr-pay-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tr-btn-upload {
    background: #f59e0b;
    color: #fff;
}

.tr-btn-upload:hover {
    background: #d97706;
}

.tr-footer {
    text-align: center;
    color: var(--tr-text-muted);
    font-size: 12px;
    padding: 8px 16px 28px;
}

.tr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tr-overlay.is-open {
    display: flex;
}

.tr-modal {
    width: min(720px, 100%);
    background: #fff;
    border-radius: 18px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.tr-modal-sm { width: min(480px, 100%); }
.tr-modal-lg { width: min(860px, 100%); }

.tr-modal-head,
.tr-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--tr-border);
}

.tr-modal-foot {
    border-bottom: 0;
    border-top: 1px solid var(--tr-border);
    justify-content: flex-end;
}

.tr-modal-head h3 {
    margin: 0;
    font-size: 18px;
}

.tr-modal-body {
    padding: 20px;
}

.tr-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.tr-field { margin-bottom: 4px; }

.tr-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
}

.tr-pay-panel,
.tr-applicant-panel {
    display: none;
}

.tr-pay-guide {
    display: none;
}

body.is-pay-mode .tr-hero,
body.is-pay-mode #section-policy {
    display: none;
}

body.is-pay-mode .tr-pay-guide {
    display: block;
}

body.is-pay-mode #alreadyReservedWrap {
    display: none;
}

body.is-pay-mode #payPanel {
    order: -2;
    display: block;
}

body.is-pay-mode #divHistory {
    order: -1;
}

body.is-pay-mode #order-card.is-pay-waiting {
    display: none;
}

body.is-pay-mode #order-card .tr-total-row:not(.is-grand) {
    display: none;
}

.tr-pay-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--tr-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tr-pay-kicker span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tr-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.tr-pay-guide h3,
.tr-pay-panel h3 {
    margin: 0 0 6px;
}

.tr-pay-guide p,
.tr-pay-panel .tr-section-head p {
    margin: 0;
    color: var(--tr-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.tr-pay-steps {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tr-pay-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tr-text);
}

.tr-pay-steps li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tr-green);
    flex-shrink: 0;
}

.tr-pay-panel.is-attention {
    border: 2px solid var(--tr-green);
    background: var(--tr-green-pale);
    box-shadow: 0 10px 28px rgba(0, 104, 56, 0.16);
    animation: tr-pay-pulse 1.6s ease 2;
}

#btnFindReservation {
    margin-top: 12px;
}

@keyframes tr-pay-pulse {
    0%, 100% { box-shadow: 0 10px 28px rgba(0, 104, 56, 0.16); }
    50% { box-shadow: 0 0 0 6px rgba(0, 104, 56, 0.18); }
}

.tr-hidden { display: none !important; }

.tr-hint {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

.tr-guest-table {
    width: 100%;
    border-collapse: collapse;
}

.tr-guest-table td {
    padding: 0;
    vertical-align: top;
}

.tr-guest-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--tr-border);
}

.tr-guest-row.has-qr {
    grid-template-columns: auto 44px minmax(0, 1fr);
    align-items: start;
}

.tr-btn-qr {
    margin-top: 26px;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 13px;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    box-sizing: border-box;
}

a.tr-btn-qr:hover {
    color: #fff;
}

.tr-guest-table tr:last-child .tr-guest-row {
    border-bottom: 0;
}

.tr-guest-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tr-green-soft);
    color: var(--tr-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    margin-top: 26px;
}

.tr-guest-fields {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.1fr) minmax(180px, 1.3fr);
    gap: 12px;
}

.tr-guest-note {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--tr-text-muted);
}

.tr-order-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.tr-order-meta div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--tr-text-muted);
}

.tr-order-meta span {
    min-width: 0;
}

.tr-order-meta strong {
    color: var(--tr-text);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.tr-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 980px) {
    .tr-layout {
        grid-template-columns: 1fr;
    }

    .tr-sidebar {
        position: static;
    }

    .tr-hero {
        min-height: 300px;
    }

    .tr-hero-trophy {
        max-width: 42%;
        height: 90%;
        right: 12px;
    }

    .tr-hero-content {
        max-width: 100%;
        padding: 28px 22px 24px;
        background: linear-gradient(90deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.55) 70%, rgba(255,255,255,0.12) 100%);
    }

    .tr-header {
        padding: 0 14px;
        height: auto;
        min-height: var(--tr-header-h);
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .tr-brand,
    .tr-header-links {
        min-width: 0;
    }

    .tr-step-line {
        width: 20px;
    }

    .tr-step {
        font-size: 13px;
        padding: 4px 10px 4px 4px;
        gap: 6px;
    }

    .tr-step-num {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
}

@media (max-width: 720px) {
    .tr-page {
        padding: 20px 14px 40px;
    }

    .tr-ticket {
        grid-template-columns: auto 1fr;
    }

    .tr-ticket-price,
    .tr-qty {
        grid-column: 2;
    }

    .tr-ticket-price {
        text-align: left;
    }

    .tr-grid-2 {
        grid-template-columns: 1fr;
    }

    .tr-hero h1 {
        font-size: 26px;
    }

    .tr-header-links span {
        display: none;
    }

    .tr-qty button {
        width: 40px;
        height: 40px;
    }

    .tr-qty input {
        height: 40px;
        width: 46px;
    }

    .tr-guest-row {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 0;
    }

    .tr-guest-row.has-qr {
        grid-template-columns: 1fr;
    }

    .tr-guest-row.has-qr .tr-btn-qr {
        margin-top: 0;
        width: 100%;
    }

    .tr-guest-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-top: 4px;
    }

    .tr-guest-fields {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
