:root {
    --bg: #f1f3f5;
    --panel: #ffffff;
    --line: #dde1e6;
    --text: #111111;
    --muted: #5f6875;
    --gold: #b99235;
    --gold-dark: #8f6f24;
    --danger: #cc4b4b;
    --ink-soft: #2a2f36;
    --surface: #f8fafc;
    --focus: #111111;
    --shadow: 0 18px 44px rgba(24, 32, 44, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Noto Sans KR", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.page-customer {
    max-width: 820px;
}

.page-login {
    max-width: 480px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}

h1,
h2 {
    margin: 0 0 12px;
    letter-spacing: 0;
    color: var(--text);
}

.lead {
    margin: 0 0 24px;
    color: var(--muted);
}

.order-panel {
    padding: 28px;
}

.customer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
}

.customer-top h1 {
    margin-bottom: 8px;
    font-size: 32px;
    line-height: 1.16;
}

.customer-top .lead {
    margin-bottom: 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.mini-link:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 800;
}

.wide {
    grid-column: 1 / -1;
}

input,
textarea,
button {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 14px 15px;
    font: inherit;
}

input,
textarea {
    min-height: 52px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

input::placeholder,
textarea::placeholder {
    color: #9098a3;
    font-weight: 600;
}

input[type="file"] {
    min-height: 76px;
    padding: 20px;
    border-style: dashed;
    background: #ffffff;
    cursor: pointer;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.checkbox input {
    width: 18px;
    height: 18px;
}

button,
.primary {
    border: 0;
    background: var(--gold);
    color: #14110a;
    font-weight: 700;
    cursor: pointer;
    min-height: 52px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

button:hover,
.primary:hover {
    background: var(--gold-dark);
    color: #ffffff;
}

button:active,
.primary:active {
    transform: translateY(1px);
}

.order-wizard {
    display: grid;
    gap: 20px;
}

.step-indicator {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0 0 26px;
    list-style: none;
}

.step-indicator li {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.step-indicator li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
}

.step-indicator li.active {
    border-color: var(--gold);
    background: #fff8e5;
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(185, 146, 53, 0.16);
}

.step-indicator li.active span {
    background: var(--gold);
    color: #14110a;
}

.wizard-step {
    display: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.wizard-step.active {
    display: block;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.wizard-step legend {
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.wizard-step legend span {
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
}

.wizard-actions button {
    width: auto;
    min-width: 120px;
}

.secondary-button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
}

.secondary-button:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 8px;
    min-width: 320px;
}

.admin-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat {
    display: grid;
    gap: 8px;
}

.stat span {
    font-size: 32px;
    color: var(--gold);
    font-weight: 700;
}

.empty {
    padding: 32px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.summary {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 16px;
    margin: 24px 0;
}

.summary dt {
    color: var(--muted);
}

.summary dd {
    margin: 0;
    font-weight: 700;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--gold);
    color: #14110a;
    font-weight: 700;
    text-decoration: none;
}

.button-link.secondary {
    margin-left: 8px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.sub-link {
    margin: -12px 0 24px;
}

.sub-link a {
    color: var(--gold);
    text-decoration: none;
}

.error-text {
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.nickname {
    color: var(--gold);
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(200, 162, 74, 0.14);
    color: var(--gold);
    font-weight: 700;
}

.alert {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--danger);
    border-radius: 6px;
    color: var(--danger);
}

.text-link {
    color: var(--muted);
    text-decoration: none;
}

.text-link:hover {
    color: var(--gold);
}

@media (max-width: 720px) {
    body {
        background: #f4f6f8;
    }

    .page {
        width: 100%;
        padding: 0;
    }

    .page-customer {
        max-width: none;
    }

    .panel {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .order-panel {
        padding: 22px 16px 18px;
    }

    .customer-top {
        align-items: flex-start;
        padding-bottom: 18px;
    }

    .customer-top h1 {
        font-size: 27px;
    }

    .customer-top .lead {
        font-size: 14px;
    }

    .mini-link {
        min-height: 36px;
        padding: 0 11px;
        font-size: 13px;
    }

    .form-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .step-indicator {
        position: sticky;
        top: 0;
        z-index: 2;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin: 0 -16px 18px;
        padding: 10px 16px;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
    }

    .step-indicator li {
        min-height: 54px;
        display: grid;
        gap: 4px;
        padding: 6px 2px;
        font-size: 11px;
        line-height: 1.15;
    }

    .step-indicator li span {
        width: 22px;
        height: 22px;
        margin: 0 auto;
    }

    .wizard-step.active {
        padding: 18px 14px;
    }

    .wizard-step legend {
        font-size: 22px;
    }

    input,
    textarea,
    button {
        font-size: 16px;
    }

    .admin-header {
        display: grid;
    }

    .search-box {
        min-width: 0;
    }

    .wizard-actions {
        display: grid;
        position: sticky;
        bottom: 0;
        margin: 0 -16px;
        padding: 12px 16px 14px;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
    }

    .wizard-actions button {
        width: 100%;
    }

    .button-link {
        width: 100%;
        margin-top: 8px;
    }

    .button-link.secondary {
        margin-left: 0;
    }
}
