:root {
    --brand: #f45b16;
    --brand-dark: #d94708;
    --brand-soft: #fff3ec;
    --ink: #17202b;
    --ink-soft: #44505f;
    --muted: #6f7782;
    --surface: #ffffff;
    --canvas: #f6f5f2;
    --line: #e5e2dd;
    --line-strong: #d7d3cd;
    --success: #168653;
    --success-soft: #eaf8f1;
    --danger: #c73f36;
    --danger-soft: #fff0ee;
    --warning: #9a5b0b;
    --warning-soft: #fff7e7;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(23, 32, 43, .05);
    --shadow: 0 14px 40px rgba(23, 32, 43, .08);
    --focus: 0 0 0 4px rgba(244, 91, 22, .16);
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body.customer-page,
body.success-page,
body.preview-page,
body.admin-page,
body.admin-subpage {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

body.customer-page *,
body.success-page *,
body.preview-page *,
body.admin-page *,
body.admin-subpage * {
    box-sizing: border-box;
}

body.customer-page button,
body.customer-page input,
body.customer-page select,
body.customer-page textarea,
body.admin-page button,
body.admin-page input,
body.admin-page select,
body.admin-page textarea,
body.admin-subpage button,
body.admin-subpage input,
body.admin-subpage select,
body.admin-subpage textarea {
    font: inherit;
}

a,
button,
input,
select,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.hat-item:focus-within {
    outline: none;
    box-shadow: var(--focus) !important;
}

.brand-mark {
    display: inline-flex;
    align-items: baseline;
    color: var(--ink);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: 1;
    text-decoration: none;
}

.brand-mark em {
    color: var(--brand);
    font-size: .7em;
    font-style: normal;
    letter-spacing: -.035em;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(215, 211, 205, .9);
    background: rgba(255, 255, 255, .92);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    min-height: 68px;
    margin: 0 auto;
}

.header-help {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.header-help:hover {
    border-color: #a9d9bc;
    color: #08743c;
    background: #f2fbf6;
}

/* Customer flow */
body.customer-page .page {
    display: block;
    min-height: auto;
    padding: 34px 20px 48px;
}

body.customer-page .card {
    width: min(1180px, 100%);
    max-width: none;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.customer-layout {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
    gap: 34px;
    align-items: start;
}

.customer-intro {
    position: sticky;
    top: 24px;
}

.intro-copy {
    padding: 8px 6px 24px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-intro h1 {
    max-width: 520px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 4.4vw, 54px);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.02;
}

.customer-intro h1 span {
    color: var(--brand);
}

.customer-intro .lead {
    max-width: 540px;
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.65;
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.trust-list li {
    position: relative;
    padding-left: 18px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.trust-list li::before {
    position: absolute;
    top: 4px;
    left: 0;
    width: 9px;
    height: 9px;
    border: 2px solid var(--brand);
    border-radius: 50%;
    content: "";
}

.product-hero {
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #eee9e2;
    box-shadow: var(--shadow);
}

.product-hero img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-hero figcaption {
    position: absolute;
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(7px);
}

.customer-form-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-heading {
    padding: 26px 28px 0;
}

.panel-heading .step-kicker {
    margin: 0 0 7px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.panel-heading h2 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -.035em;
}

.panel-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

body.customer-page .order-check-box {
    margin: 0;
    padding: 24px 28px 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.customer-page label.title {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.order-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

body.customer-page input[type="text"] {
    height: 54px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    font-weight: 650;
}

body.customer-page input[type="text"]:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: var(--focus);
}

body.customer-page button {
    min-height: 54px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 850;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

body.customer-page button:hover {
    background: var(--brand-dark);
}

body.customer-page button:active {
    transform: translateY(1px);
}

body.customer-page button:disabled {
    background: #b8b6b2;
    cursor: wait;
}

body.customer-page .field-note {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 550;
}

body.customer-page .field-error {
    min-height: 20px;
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 750;
}

.quick-guide {
    border-top: 1px solid var(--line);
    background: #fbfaf8;
}

.quick-guide summary {
    position: relative;
    padding: 16px 28px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.quick-guide summary::-webkit-details-marker {
    display: none;
}

.quick-guide summary::after {
    position: absolute;
    right: 28px;
    content: "+";
    color: var(--brand);
    font-size: 18px;
    line-height: 1;
}

.quick-guide[open] summary::after {
    content: "−";
}

.quick-guide-content {
    padding: 0 28px 20px;
}

.quick-guide-content p {
    margin: 0 0 8px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.55;
}

.quick-guide-content p:last-child {
    margin-bottom: 0;
}

body.customer-page .whatsapp-contact {
    display: none;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding: 18px 28px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fbfaf8;
    counter-reset: flow-step;
}

.flow-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #8b9098;
    font-size: 12px;
    font-weight: 750;
}

.flow-step::before {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: #fff;
    counter-increment: flow-step;
    content: counter(flow-step);
    font-size: 11px;
}

.flow-step.active {
    color: var(--ink);
}

.flow-step.active::before,
.flow-step.done::before {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.flow-step:not(:last-child)::after {
    position: absolute;
    top: 12px;
    right: 10px;
    left: calc(100% - 26px);
    height: 1px;
    background: var(--line-strong);
    content: "";
}

body.customer-page .verified-box {
    margin: 20px 28px 0;
    padding: 16px;
    border: 1px solid #b7dfca;
    border-radius: var(--radius);
    background: var(--success-soft);
    color: #126c43;
    text-align: left;
}

.verified-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 850;
}

.verified-heading::before {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    content: "✓";
    font-size: 15px;
}

body.customer-page #limitText {
    margin-top: 9px !important;
    color: #275f49;
    font-size: 13px !important;
    font-weight: 650;
}

body.customer-page .edit-notice {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #efc879;
    border-radius: var(--radius-sm);
    background: var(--warning-soft);
    color: #76500d;
    font-size: 13px;
}

.edit-countdown-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.edit-countdown-value {
    color: var(--brand-dark);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

body.customer-page .form-content {
    padding: 24px 28px 28px;
}

.contact-field {
    margin-bottom: 22px;
}

.product-section {
    margin: 0 0 22px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.product-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfaf8;
}

body.customer-page .product-section h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 19px;
    letter-spacing: -.02em;
}

.product-section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.product-quantity {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid #ffd0bb;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 850;
}

.product-block {
    padding: 20px;
}

.product-block + .product-block {
    border-top: 1px solid var(--line);
}

.block-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.block-heading strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.block-heading span {
    color: var(--muted);
    font-size: 12px;
}

.selection-counter {
    color: var(--brand-dark) !important;
    font-weight: 850;
    white-space: nowrap;
}

.photo-progress {
    height: 5px;
    overflow: hidden;
    margin: -5px 0 16px;
    border-radius: 4px;
    background: #ece9e5;
}

.photo-progress > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    transition: width .2s ease;
}

body.customer-page .photo-upload-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

body.customer-page .photo-upload-item {
    position: relative;
    min-width: 0;
    min-height: 126px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaf8;
    text-align: left;
}

body.customer-page .photo-upload-item.has-file,
body.customer-page .photo-upload-item.has-existing {
    border-color: #a7d7bd;
    background: #f4fbf7;
}

.photo-slot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

body.customer-page .photo-slot-top label {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.photo-slot-status {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.photo-slot-preview {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.photo-thumb {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px dashed #c8c4be;
    border-radius: 7px;
    background: #fff;
    color: #99938b;
    font-size: 20px;
}

.photo-thumb::before {
    content: "+";
}

.photo-thumb img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-item.has-file .photo-thumb::before,
.photo-upload-item.has-existing .photo-thumb::before {
    display: none;
}

.photo-upload-item.has-file .photo-thumb img,
.photo-upload-item.has-existing .photo-thumb img {
    display: block;
}

.photo-input-wrap {
    min-width: 0;
}

body.customer-page input[type="file"].photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.photo-pick-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--ink) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    cursor: pointer;
}

.photo-pick-button:hover {
    border-color: var(--brand);
    color: var(--brand-dark) !important;
}

body.customer-page .selected-file-name {
    min-height: 18px;
    margin-top: 6px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clear-photo {
    display: none;
    min-height: 28px !important;
    width: auto !important;
    margin-top: 5px;
    padding: 0 !important;
    background: transparent !important;
    color: var(--danger) !important;
    font-size: 11px !important;
    text-align: left;
}

.photo-upload-item.has-file .clear-photo {
    display: inline-block;
}

.photo-guidance {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.55;
}

.edit-preserve-note {
    margin: 0 0 14px;
    padding: 11px 12px;
    border: 1px solid #efc879;
    border-radius: var(--radius-sm);
    background: var(--warning-soft);
    color: #76500d;
    font-size: 12px;
    line-height: 1.5;
}

body.customer-page .hat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

body.customer-page .hat-item {
    position: relative;
    min-width: 0;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

body.customer-page .hat-item:hover {
    border-color: #f6ad8c;
}

body.customer-page .hat-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 5px;
}

body.customer-page .hat-number {
    top: 4px;
    left: 4px;
    min-width: 21px;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-size: 10px;
    font-weight: 850;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.hat-check {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

body.customer-page .hat-item:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 2px rgba(244, 91, 22, .12);
    transform: none;
}

body.customer-page .hat-item:has(input:checked) .hat-check {
    display: grid;
}

.hat-picker {
    max-height: 520px;
    padding: 2px 4px 2px 2px;
    overflow-y: auto;
    scrollbar-color: #c8c4be transparent;
    scrollbar-width: thin;
}

body.customer-page .consent-area {
    margin: 18px 0;
}

body.customer-page .check {
    gap: 10px;
    margin: 9px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaf8;
    color: var(--ink-soft);
    font-size: 12px;
}

body.customer-page .check input {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
}

body.customer-page .check a {
    color: var(--brand-dark);
}

.submit-bar button {
    width: 100%;
}

body.customer-page .note {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 12px;
}

body.customer-page .loading-overlay {
    background: rgba(246, 245, 242, .94);
    backdrop-filter: blur(4px);
}

body.customer-page .loading-box {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

body.customer-page .spinner {
    width: 44px;
    height: 44px;
    border-width: 4px;
    border-color: #fbd2bf;
    border-top-color: var(--brand);
}

body.customer-page .loading-box h2 {
    color: var(--ink);
    font-size: 22px;
}

body.customer-page .loading-box p {
    color: var(--muted);
    font-size: 14px;
}

/* Success */
body.success-page {
    display: block;
    min-height: 100vh;
    padding: 0;
}

.success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.success-wrap {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 68px);
    padding: 30px 20px;
}

body.success-page .box {
    width: min(520px, 100%);
    max-width: none;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

body.success-page .icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border: 9px solid #d8f1e4;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 0;
}

body.success-page .icon::after {
    content: "✓";
    font-size: 26px;
    font-weight: 900;
}

body.success-page h1 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 30px;
    letter-spacing: -.035em;
}

body.success-page p {
    color: var(--ink-soft);
    font-size: 15px;
}

.success-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaf8;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
}

.success-order strong {
    color: var(--ink);
    font-size: 15px;
}

body.success-page .preview-link,
body.success-page .edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 850;
}

body.success-page .preview-link {
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
}

body.success-page .edit-box {
    margin-top: 14px;
    padding: 17px;
    border: 1px solid #efc879;
    border-radius: var(--radius);
    background: var(--warning-soft);
    color: #76500d;
    font-size: 13px;
}

body.success-page .countdown {
    margin: 7px 0 0;
    color: var(--brand-dark);
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}

body.success-page .edit-btn {
    background: var(--brand);
    color: #fff;
}

.new-order-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 750;
}

/* Preview */
body.preview-page .wrapper {
    width: min(1040px, 100%);
    max-width: none;
    padding: 28px 20px 48px;
}

body.preview-page .header,
body.preview-page .section {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

body.preview-page .header {
    padding: 28px;
}

body.preview-page .brand-mark {
    margin-bottom: 20px;
}

body.preview-page h1 {
    color: var(--ink);
    font-size: 30px;
    letter-spacing: -.035em;
}

body.preview-page .desc {
    color: var(--muted);
    font-size: 15px;
}

body.preview-page .info {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaf8;
}

body.preview-page .section h2 {
    color: var(--ink);
}

body.preview-page .item {
    border-color: var(--line);
    border-radius: var(--radius);
    background: #fbfaf8;
}

body.preview-page .footer-note {
    border: 1px solid #efc879;
    border-radius: var(--radius);
    background: var(--warning-soft);
}

/* Admin shell */
body.admin-page {
    padding: 0;
    background: #f3f4f5;
}

.admin-shell {
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 16px 16px;
    background: #17212b;
    color: #fff;
}

.admin-sidebar .brand-mark {
    margin: 2px 10px 28px;
    color: #fff;
}

.admin-nav-toggle {
    display: none;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: #cbd2d9;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #26333f;
    color: #fff;
}

.admin-nav a.active {
    box-shadow: inset 3px 0 0 var(--brand);
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 16px 10px 4px;
    border-top: 1px solid #2c3945;
}

.admin-user {
    display: block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.admin-sidebar .logout {
    display: block;
    padding: 0;
    background: transparent;
    color: #cbd2d9;
    font-size: 12px;
}

.admin-main {
    min-width: 0;
}

body.admin-page .container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 24px;
}

body.admin-page .header {
    align-items: flex-end;
    margin-bottom: 16px;
}

body.admin-page .header h1 {
    color: var(--ink);
    font-size: 26px;
    letter-spacing: -.035em;
}

.admin-heading-copy p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.mobile-admin-exit {
    display: none;
}

body.admin-page .filter-box,
body.admin-page .bulk-box,
body.admin-page .chart-box,
body.admin-page .card,
body.admin-page .empty {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

body.admin-page .filter-box {
    margin-bottom: 14px;
    padding: 16px;
}

.filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.filter-heading h2 {
    margin: 0;
    font-size: 15px;
}

body.admin-page .filter-form {
    grid-template-columns: minmax(145px, .8fr) minmax(145px, .8fr) minmax(220px, 1.5fr) minmax(170px, .9fr) auto auto;
    gap: 9px;
}

body.admin-page .filter-form label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 750;
}

body.admin-page .filter-form input[type="date"],
body.admin-page .filter-form input[type="text"],
body.admin-page .filter-form select,
body.admin-page select,
body.admin-page textarea,
body.admin-page input[type="text"] {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 13px;
}

body.admin-page .btn {
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
}

body.admin-page .btn.save {
    background: #17212b;
}

body.admin-page .btn.download {
    background: var(--brand);
}

body.admin-page .btn.gray {
    border-color: var(--line);
    background: #fff;
    color: var(--ink-soft);
}

body.admin-page .btn.design {
    border-color: #c9d7e6;
    background: #f4f8fb;
    color: #2d5d86;
}

body.admin-page .btn.excel {
    border-color: #b9dfc9;
    background: #f0faf4;
    color: #137346;
}

body.admin-page .btn.danger {
    border-color: #efc5c1;
    background: var(--danger-soft);
    color: var(--danger);
}

body.admin-page .summary {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #ffd6c3;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--ink-soft);
    font-size: 12px;
}

.report-panel {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaf8;
}

.report-panel summary {
    padding: 11px 12px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.report-panel-content {
    padding: 0 12px 12px;
}

body.admin-page .chart-box {
    margin: 0 0 10px;
    padding: 12px;
    box-shadow: none;
}

body.admin-page .daily-report {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 12px;
}

body.admin-page .filter-actions {
    gap: 7px;
    margin-top: 12px;
}

body.admin-page .bulk-box {
    position: sticky;
    top: 10px;
    z-index: 15;
    gap: 7px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.selection-summary {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-right: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 750;
}

.selection-summary strong {
    margin-right: 4px;
    color: var(--brand-dark);
    font-size: 15px;
}

body.admin-page .bulk-status-select {
    min-width: 190px;
    width: auto;
}

.orders-column-head {
    display: grid;
    grid-template-columns: 38px minmax(120px, 1fr) minmax(150px, 1.25fr) minmax(120px, 1fr) 70px minmax(150px, 1.1fr) 88px 170px;
    gap: 10px;
    align-items: center;
    padding: 0 15px 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

body.admin-page .card {
    margin-bottom: 7px;
    padding: 0;
    overflow: visible;
    border-left: 3px solid transparent;
    border-radius: 9px;
    background: #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

body.admin-page .card:hover {
    transform: none;
    box-shadow: 0 5px 16px rgba(23, 32, 43, .07);
}

body.admin-page .card.is-selected {
    border-color: var(--brand);
    background: #fffaf7;
    box-shadow: 0 0 0 1px rgba(244, 91, 22, .12);
}

body.admin-page .compact-header {
    display: grid;
    grid-template-columns: 38px minmax(120px, 1fr) minmax(150px, 1.25fr) minmax(120px, 1fr) 70px minmax(150px, 1.1fr) 88px 170px;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: default;
    font-size: 12px;
}

body.admin-page .compact-header:hover {
    border-color: transparent;
    background: #fcfbf9;
}

.order-cell {
    min-width: 0;
}

.order-cell small {
    display: none;
}

.order-check-cell {
    display: grid;
    place-items: center;
}

body.admin-page .compact-left input[type="checkbox"],
body.admin-page .bulk-check {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.order-number-cell strong {
    color: #1769c2;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.order-customer-cell strong,
.order-platform-cell strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-customer-cell a {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #08743c;
    font-size: 10px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item-mini {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-date-cell {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.order-date-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.order-date-cell span,
.order-date-cell time {
    display: block;
    line-height: 1.25;
    white-space: nowrap;
}

.order-date-cell time {
    color: #89929d;
    font-size: 9px;
}

.order-quantity-cell {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

body.admin-page .badge,
body.admin-page .downloaded-badge,
body.admin-page .admin-note-mini,
body.admin-page .toggle-icon,
body.admin-page .new-label {
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 10px;
}

body.admin-page .card.status-yeni .badge {
    background: #fff0e7;
    color: #b7440e;
}

body.admin-page .card.status-onaya .badge {
    background: #edf4fb;
    color: #2d5d86;
}

body.admin-page .card.status-whatsapp .badge,
body.admin-page .card.status-tamam .badge {
    background: #eaf8f1;
    color: #137346;
}

body.admin-page .card.status-baski .badge {
    background: #f3eff9;
    color: #65428b;
}

body.admin-page .card.status-sorun .badge {
    background: #fff0ee;
    color: #b63b33;
}

body.admin-page .card.status-iptal .badge {
    background: #f0f1f2;
    color: #59616b;
}

.order-status-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.order-status-cell .downloaded-badge {
    background: #f0f1f2;
    color: #59616b;
}

.order-status-cell .downloaded-new {
    background: #fff0ee;
    color: #b63b33;
}

body.admin-page .order-status-cell .admin-note-mini {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
}

.admin-note-marquee {
    display: flex;
    width: max-content;
    min-width: 100%;
    gap: 32px;
    animation: admin-note-marquee 14s linear infinite;
    will-change: transform;
}

.admin-note-marquee > span {
    display: block;
    flex: 0 0 auto;
    white-space: nowrap;
}

@keyframes admin-note-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .admin-note-marquee {
        animation: none;
    }
}

.order-actions-cell {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.row-action:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.row-action.whatsapp-row {
    border-color: #b9dfc9;
    color: #137346;
}

body.admin-page .order-details {
    border-top: 1px solid transparent;
}

body.admin-page .order-details.open {
    margin: 0;
    padding: 18px;
    border-top-color: var(--line);
    background: #fbfaf8;
}

body.admin-page .top,
body.admin-page .preview-section,
body.admin-page .design-upload {
    border-color: var(--line);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

body.admin-page .grid {
    gap: 10px;
}

body.admin-page .actions {
    gap: 7px;
}

/* Admin supporting pages */
body.admin-subpage {
    padding: 24px;
}

body.admin-subpage .container {
    width: min(1320px, 100%);
    max-width: none;
    margin: 0 auto;
}

body.admin-subpage .header h1 {
    color: var(--ink);
    font-size: 26px;
    letter-spacing: -.035em;
}

body.admin-subpage .back {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-soft);
}

body.admin-subpage .box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

body.admin-subpage input[type="date"] {
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

body.admin-subpage button {
    min-height: 44px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    font-size: 13px;
}

body.admin-subpage th {
    background: #f7f6f3;
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.admin-subpage td {
    color: var(--ink-soft);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1180px) {
    .customer-layout {
        grid-template-columns: minmax(0, .78fr) minmax(500px, 1.22fr);
        gap: 24px;
    }

    body.customer-page .hat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .orders-column-head,
    body.admin-page .compact-header {
        grid-template-columns: 34px minmax(110px, 1fr) minmax(135px, 1.15fr) minmax(110px, .9fr) 56px minmax(110px, .9fr) 82px 155px;
        gap: 7px;
    }
}

@media (max-width: 1024px) {
    .customer-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 760px;
        margin: 0 auto;
    }

    .customer-form-panel {
        order: 1;
    }

    .customer-intro {
        position: static;
        order: 2;
    }

    .intro-copy {
        padding-top: 14px;
    }

    .customer-intro h1 {
        font-size: 38px;
    }

    .admin-shell {
        grid-template-columns: 188px minmax(0, 1fr);
    }

    .admin-sidebar {
        padding-right: 12px;
        padding-left: 12px;
    }

    body.admin-page .container {
        padding: 18px;
    }

    body.admin-page .filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-column-head {
        display: none;
    }

    body.admin-page .compact-header {
        grid-template-columns: 30px minmax(92px, .85fr) minmax(112px, 1.2fr) minmax(90px, .9fr) 42px minmax(105px, .9fr) 122px;
        gap: 5px;
    }

    .order-date-cell {
        display: none;
    }
}

@media (max-width: 820px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        display: block;
        width: 100%;
        height: auto;
        padding: 12px 16px;
        border-bottom: 1px solid #2c3945;
    }

    .admin-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .admin-sidebar .brand-mark {
        margin: 0;
        font-size: 21px;
    }

    .admin-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 40px;
        border: 1px solid #3d4a56;
        border-radius: var(--radius-sm);
        background: #26333f;
        color: #fff;
        font-size: 12px;
        font-weight: 800;
    }

    .admin-nav {
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 12px;
    }

    .admin-sidebar.nav-open .admin-nav {
        display: grid;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .mobile-admin-exit {
        display: inline-flex;
    }

    body.admin-page .bulk-box {
        top: auto;
        bottom: 0;
        flex-direction: row !important;
        align-items: center !important;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    body.admin-page .bulk-box > * {
        flex: 0 0 auto;
    }

    body.admin-page .bulk-box .btn {
        width: auto !important;
    }

    body.admin-page .compact-header {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 9px 12px;
        padding: 12px;
    }

    .order-check-cell {
        grid-row: 1 / span 2;
    }

    .order-number-cell {
        grid-column: 2;
        grid-row: 1;
    }

    .order-status-cell {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
    }

    .order-customer-cell {
        grid-column: 2;
        grid-row: 2;
    }

    .order-platform-cell {
        grid-column: 2 / span 2;
        grid-row: 3;
    }

    .order-quantity-cell {
        display: block;
        grid-row: 4;
        padding: 8px;
        border-radius: 7px;
        background: #f6f5f2;
        text-align: left;
    }

    .order-quantity-cell {
        grid-column: 2 / span 2;
    }

    .order-actions-cell {
        grid-column: 2 / span 2;
        grid-row: 5;
        justify-content: stretch;
    }

    .order-actions-cell .row-action {
        flex: 1 1 0;
        min-height: 38px;
    }

    .order-cell small {
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .order-status-cell small,
    .order-actions-cell small,
    .order-check-cell small {
        display: none;
    }
}

@media (max-width: 680px) {
    .site-header-inner {
        width: calc(100% - 28px);
        min-height: 60px;
    }

    .brand-mark {
        font-size: 21px;
    }

    .header-help {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }

    body.customer-page .page {
        padding: 14px 12px 34px;
    }

    .customer-layout {
        gap: 18px;
    }

    .customer-form-panel {
        border-radius: 14px;
    }

    .panel-heading {
        padding: 22px 18px 0;
    }

    .panel-heading h2 {
        font-size: 24px;
    }

    body.customer-page .order-check-box {
        padding: 20px 18px 22px;
    }

    .order-input-row {
        grid-template-columns: 1fr;
    }

    .order-input-row button {
        width: 100%;
    }

    .quick-guide summary {
        padding-right: 48px;
        padding-left: 18px;
    }

    .quick-guide summary::after {
        right: 18px;
    }

    .quick-guide-content {
        padding: 0 18px 18px;
    }

    .flow-steps {
        padding: 14px 18px;
    }

    .flow-step {
        gap: 5px;
        font-size: 10px;
    }

    .flow-step::before {
        width: 22px;
        height: 22px;
    }

    body.customer-page .verified-box {
        margin: 16px 18px 0;
    }

    body.customer-page .form-content {
        padding: 20px 18px 22px;
    }

    .product-section-header,
    .product-block {
        padding: 16px;
    }

    body.customer-page .hat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .hat-picker {
        max-height: 430px;
    }

    .customer-intro h1 {
        font-size: 33px;
    }

    .customer-intro .lead {
        font-size: 15px;
    }

    body.admin-page .container {
        padding: 14px 10px 24px;
    }

    body.admin-page .header {
        align-items: center;
    }

    body.admin-page .header h1 {
        font-size: 22px;
    }

    body.admin-page .filter-form {
        grid-template-columns: 1fr;
    }

    body.admin-page .filter-form .btn,
    body.admin-page .filter-form a.btn {
        width: 100%;
        min-height: 44px;
    }

    body.admin-page .filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-page .filter-actions form,
    body.admin-page .filter-actions .btn {
        width: 100%;
    }

    body.admin-page .filter-actions .btn {
        min-height: 42px;
        white-space: normal;
        text-align: center;
    }

    body.admin-page .order-details.open {
        padding: 12px;
    }

    body.admin-page .top {
        display: block;
    }

    body.admin-page .grid {
        grid-template-columns: 1fr;
    }

    body.admin-subpage {
        padding: 14px 10px 28px;
    }

    body.admin-subpage .header {
        gap: 10px;
    }

    body.admin-subpage .header h1 {
        font-size: 21px;
    }

    body.admin-subpage .table-wrap {
        overflow: visible;
    }

    body.admin-subpage table,
    body.admin-subpage tbody,
    body.admin-subpage tr,
    body.admin-subpage td {
        display: block;
        width: 100%;
    }

    body.admin-subpage thead {
        display: none;
    }

    body.admin-subpage tr {
        margin-bottom: 12px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        background: #fff;
    }

    body.admin-subpage td {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 10px;
        padding: 8px;
        border-bottom: 1px solid #efede9;
        white-space: normal;
    }

    body.admin-subpage td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

    body.admin-subpage td:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 430px) {
    body.customer-page .photo-upload-list {
        grid-template-columns: 1fr;
    }

    body.customer-page .photo-upload-item {
        min-height: 112px;
    }

    body.customer-page .hat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .flow-step span {
        max-width: 72px;
        line-height: 1.2;
        white-space: normal;
    }

    .product-section-header {
        gap: 10px;
    }

    .block-heading {
        align-items: flex-start;
    }

    .success-order {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    body.success-page .box {
        padding: 26px 18px;
    }

    body.preview-page .grid {
        grid-template-columns: 1fr;
    }

    body.preview-page .item img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .order-status-cell .downloaded-badge {
        display: none;
    }

    body.admin-page .filter-actions {
        grid-template-columns: 1fr;
    }
}

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