/* Connsole Returns — Warm Leather palette, scoped to .crt */
.crt {
	--crt-ink: #3B2A20;
	--crt-accent: #A9642C;
	--crt-paper: #F7F2E9;
	--crt-card: #FFFFFF;
	--crt-line: #E6DCCB;
	--crt-muted: #7A6657;
	--crt-ok: #4F7A4A;
	--crt-bad: #A33A2B;
	max-width: 780px;
	margin: 0 auto;
	padding: 8px 0 48px;
	color: var(--crt-ink);
	font-size: 16px;
	line-height: 1.55;
}
.crt *, .crt *::before, .crt *::after { box-sizing: border-box; }
.crt [hidden] { display: none !important; }

.crt-head { text-align: center; margin-bottom: 28px; }
.crt-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--crt-accent); font-weight: 600; }
.crt-title { margin: 0 0 8px; font-size: clamp(28px, 5vw, 38px); line-height: 1.15; color: var(--crt-ink); }
.crt-sub { margin: 0 auto; max-width: 46ch; color: var(--crt-muted); }

.crt-card { background: var(--crt-card); border: 1px solid var(--crt-line); border-radius: 14px; padding: 28px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(59,42,32,.04), 0 8px 24px rgba(59,42,32,.05); }
.crt-card h2 { margin: 0 0 14px; font-size: 18px; color: var(--crt-ink); }
.crt-narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

/* Tabs */
.crt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--crt-paper); border-radius: 10px; margin-bottom: 22px; }
.crt-tab { appearance: none; border: 0; background: transparent; padding: 10px 8px; border-radius: 7px; font: inherit; font-size: 15px; font-weight: 600; color: var(--crt-muted); cursor: pointer; }
.crt-tab[aria-selected="true"] { background: var(--crt-card); color: var(--crt-ink); box-shadow: 0 1px 3px rgba(59,42,32,.14); }

/* Forms */
.crt-field { margin-bottom: 16px; }
.crt-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.crt input[type="text"], .crt input[type="email"], .crt select, .crt textarea {
	width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--crt-ink);
	background: #fff; border: 1px solid #CDBFAA; border-radius: 9px; transition: border-color .15s, box-shadow .15s;
}
.crt input:focus, .crt select:focus, .crt textarea:focus { outline: none; border-color: var(--crt-accent); box-shadow: 0 0 0 3px rgba(169,100,44,.2); }
.crt textarea { min-height: 120px; resize: vertical; }
.crt-code { text-align: center; font-size: 26px !important; letter-spacing: .45em; font-variant-numeric: tabular-nums; padding-left: .45em !important; }
.crt-hint { margin: 6px 0 0; font-size: 13px; color: var(--crt-muted); }

.crt-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 20px; border: 1px solid var(--crt-ink); border-radius: 9px; background: var(--crt-ink); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.crt-btn:hover { background: #2A1D16; color: #fff; }
.crt-btn:active { transform: translateY(1px); }
.crt-btn:focus-visible, .crt-tab:focus-visible, .crt-link:focus-visible, .crt-row:focus-visible { outline: 3px solid rgba(169,100,44,.45); outline-offset: 2px; }
.crt-btn[disabled] { opacity: .6; cursor: progress; }
.crt-btn--ghost { background: transparent; color: var(--crt-ink); }
.crt-btn--ghost:hover { background: var(--crt-paper); color: var(--crt-ink); }
.crt-btn--auto { width: auto; }
.crt-link { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--crt-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.crt-link:hover { color: var(--crt-ink); }

.crt-msg { margin: 0 0 16px; padding: 11px 14px; border-radius: 9px; font-size: 14.5px; }
.crt-msg--bad { background: #FBEDEA; color: var(--crt-bad); border: 1px solid #EBC9C2; }
.crt-msg--ok { background: #EDF4EB; color: #35592F; border: 1px solid #CADDC6; }

/* Order header */
.crt-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; font-size: 14.5px; }
.crt-orderhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.crt-orderhead h2 { margin: 0; font-size: 24px; }
.crt-orderhead p { margin: 2px 0 0; color: var(--crt-muted); font-size: 14.5px; }
.crt-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--crt-paper); color: var(--crt-ink); border: 1px solid var(--crt-line); white-space: nowrap; }
.crt-pill--completed { background: #EDF4EB; border-color: #CADDC6; color: #35592F; }
.crt-pill--processing { background: #FBF1E4; border-color: #EBD3B4; color: #8A4E1E; }
.crt-pill--cancelled, .crt-pill--failed, .crt-pill--refunded { background: #FBEDEA; border-color: #EBC9C2; color: var(--crt-bad); }


/* Items */
.crt-items { list-style: none; margin: 0; padding: 0; }
.crt-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--crt-line); }
.crt-item:first-child { border-top: 0; padding-top: 0; }
.crt-thumb { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; background: var(--crt-paper); border: 1px solid var(--crt-line); }
.crt-item-name { margin: 0; font-weight: 600; line-height: 1.35; }
.crt-item-meta { margin: 2px 0 0; font-size: 13.5px; color: var(--crt-muted); }
.crt-item-total { font-weight: 600; white-space: nowrap; }
.crt-totals { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--crt-line); }
.crt-totals div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14.5px; color: var(--crt-muted); }
.crt-totals .crt-grand:not(:first-child) { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--crt-line); }
.crt-totals .crt-grand { font-size: 17px; font-weight: 700; color: var(--crt-ink); }

.crt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.crt-grid h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--crt-accent); }
.crt-grid p { margin: 0; font-size: 14.5px; }

/* Verify prompt */
.crt-lock { background: var(--crt-paper); border-style: dashed; }
.crt-lock h2 { display: flex; align-items: center; gap: 8px; }
.crt-lock > p { margin: 0 0 16px; color: var(--crt-muted); font-size: 14.5px; }
.crt-inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

/* Order list */
.crt-row { appearance: none; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; text-align: left; padding: 16px; margin-bottom: 10px; background: #fff; border: 1px solid var(--crt-line); border-radius: 11px; font: inherit; color: var(--crt-ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.crt-row:hover { border-color: var(--crt-accent); box-shadow: 0 4px 14px rgba(59,42,32,.08); background: #fff; color: var(--crt-ink); }
.crt-row strong { font-size: 16px; }
.crt-row small { color: var(--crt-muted); font-size: 13.5px; }
.crt-row .crt-right { text-align: right; }

/* Past requests */
.crt-req { padding: 12px 14px; margin-top: 10px; background: var(--crt-paper); border-radius: 9px; font-size: 14.5px; }
.crt-req b { display: block; font-size: 13px; color: var(--crt-muted); font-weight: 600; margin-bottom: 2px; }
.crt-req p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.crt-foot { text-align: center; font-size: 14px; color: var(--crt-muted); margin-top: 22px; }
.crt-foot a { color: var(--crt-accent); }

@media (max-width: 600px) {
	.crt-card { padding: 20px 16px; border-radius: 12px; }
	.crt-grid { grid-template-columns: 1fr; }
	.crt-inline { grid-template-columns: 1fr; }
	.crt-item { grid-template-columns: 52px 1fr auto; gap: 10px; }
	.crt-thumb { width: 52px; height: 52px; }
	.crt-step { font-size: 12px; }
	.crt-step span { display: none; }
	.crt-btn--auto { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .crt * { transition: none !important; } }

/* ---------- Returns additions ---------- */
.crt-pill--pending { background: #FBF1E4; border-color: #EBD3B4; color: #8A4E1E; }
.crt-pill--approved { background: #E9F0F8; border-color: #C6D6EA; color: #23497A; }
.crt-pill--received { background: #F1ECF7; border-color: #D8CBE8; color: #55367F; }
.crt-pill--rejected { background: #FBEDEA; border-color: #EBC9C2; color: var(--crt-bad); }
.crt-row .crt-note { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.crt-note--ok { color: var(--crt-ok); }
.crt-note--no { color: var(--crt-muted); }

.crt-choose { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--crt-line); }
.crt-choose:first-child { border-top: 0; padding-top: 0; }
.crt-choose input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--crt-ink); }
.crt-choose select { width: auto; min-width: 74px; padding: 8px 10px; }
.crt-tag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--crt-paper); color: var(--crt-accent); }

.crt-radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; border: 1px solid #CDBFAA; border-radius: 9px; cursor: pointer; font-weight: 400 !important; }
.crt-radio input { margin-top: 4px; accent-color: var(--crt-ink); }
.crt-radio:has(input:checked) { border-color: var(--crt-ink); background: var(--crt-paper); }
.crt-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; font-weight: 400 !important; }
.crt-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--crt-ink); flex: none; }
.crt-file { display: block; width: 100%; padding: 14px; border: 1px dashed #CDBFAA; border-radius: 9px; background: #fff; font: inherit; font-size: 14.5px; }
.crt-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.crt-previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--crt-line); }

.crt-return { border-left: 4px solid var(--crt-line); }
.crt-return--pending { border-left-color: #D9A464; }
.crt-return--approved { border-left-color: #5E86B8; }
.crt-return--received { border-left-color: #8D6CB8; }
.crt-return--completed { border-left-color: var(--crt-ok); }
.crt-return--rejected, .crt-return--cancelled { border-left-color: #C98A80; }
.crt-return .crt-orderhead { margin-bottom: 12px; }
.crt-return-text { margin: 0 0 14px; color: var(--crt-muted); font-size: 14.5px; }
.crt-box { padding: 14px 16px; margin: 0 0 14px; background: var(--crt-paper); border-radius: 10px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.crt-box b { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--crt-accent); white-space: normal; }
.crt-hist { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13.5px; color: var(--crt-muted); }
.crt-hist li { padding: 3px 0; }
.crt-hist strong { color: var(--crt-ink); font-weight: 600; }
.crt-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--crt-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.crt-or::before, .crt-or::after { content: ""; flex: 1; height: 1px; background: var(--crt-line); }

/* WooCommerce sign-in form moved inside the card */
.crt .crt-login form.login { margin: 0; padding: 0; border: 0; }
.crt .crt-login .form-row { margin: 0 0 14px; padding: 0; }
.crt .crt-login input.input-text { width: 100%; padding: 13px 14px; font-size: 16px; border: 1px solid #CDBFAA; border-radius: 9px; }
.crt .crt-login button[type="submit"] { width: 100%; padding: 14px 20px; border-radius: 9px; background: var(--crt-ink); color: #fff; border: 1px solid var(--crt-ink); font-weight: 600; }

@media (max-width: 600px) {
	.crt-choose { grid-template-columns: auto 52px 1fr; }
	.crt-choose select { grid-column: 3; justify-self: start; }
}
