/* ============================
   관리자 화면 스타일
============================ */
@import url('/css/common-19417d97e1310779762daac540b6f000.css');

.admin-page {
    color: var(--color-text);
}

/* ============================
   로그인
============================ */

.admin-login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(247, 247, 247, 0.94) 42%, rgba(236, 239, 242, 0.94) 100%);
    overflow: hidden;
    color-scheme: light;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1240px, 100%);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
    height: min(820px, calc(100vh - 48px));
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.admin-login-page .login-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 36px;
    padding: clamp(36px, 6vw, 68px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
}

.admin-login-page .brand-header {
    display: flex;
    align-items: center;
    text-align: left;
}

.admin-login-page .brand-header .s4o-brand-lockup {
    gap: 14px;
}

.admin-login-page .brand-header .s4o-brand-lockup__mark {
    width: 48px;
}

.admin-login-page .brand-header .s4o-brand-lockup__wordmark {
    font-size: 2.1rem;
}

.admin-login-page #loginForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(324px, 100%);
}

.admin-login-page .form-group {
    margin-bottom: 0;
}

.admin-login-page .login-form-options {
    display: flex;
    align-items: center;
    min-height: 24px;
}

.admin-login-page .remember-login-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.admin-login-page .remember-login-id input[type="checkbox"] {
    all: revert;
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 14px;
    min-width: 14px;
    height: 14px;
    min-height: 14px;
    flex: 0 0 14px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    accent-color: var(--color-accent-strong);
    cursor: pointer;
    vertical-align: middle;
}

.admin-login-page input {
    min-height: 52px;
    padding: 21px 14px 7px;
    border-radius: 8px;
}

.admin-login-page .floating-field {
    position: relative;
}

.admin-login-page .floating-field label {
    position: absolute;
    top: 50%;
    left: 14px;
    margin: 0;
    color: #9aa4b2;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: left top;
    transition: color var(--transition-fast), transform var(--transition-fast), font-size var(--transition-fast);
}

.admin-login-page .floating-field input:focus + label,
.admin-login-page .floating-field input:not(:placeholder-shown) + label {
    color: var(--color-muted);
    font-size: 0.74rem;
    transform: translateY(-18px);
}

.admin-login-page .btn-login {
    width: 100%;
    min-height: 54px;
    margin-top: 8px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0;
    background: var(--color-accent-strong);
    box-shadow: none;
}

.login-hero {
    position: relative;
    min-height: 100%;
    background: #dbe2e8;
}

.login-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.08) 42%, rgba(15, 23, 42, 0.52) 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 48%);
}

.login-hero__copy {
    position: absolute;
    right: clamp(28px, 5vw, 52px);
    bottom: clamp(28px, 5vw, 52px);
    left: clamp(28px, 5vw, 52px);
    z-index: 1;
    max-width: 420px;
    color: #ffffff;
}

.login-hero__eyebrow {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-hero__copy h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.login-hero__copy p:last-child {
    max-width: 32rem;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.98rem;
    line-height: 1.7;
}

/* 로그인 레이아웃은 공용 데스크톱 구간(1024~1279px)에서도 2열 비율을 유지하되,
   좌측 패널을 먼저 압축해 와이드 레이아웃에서 좁은 데스크톱으로 자연스럽게 넘어갑니다. */
@media (max-width: 1279px) {
    .login-layout {
        grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    }

    .admin-login-page .login-box {
        gap: 30px;
        padding: clamp(32px, 5vw, 52px);
    }

    .admin-login-page .brand-header .s4o-brand-lockup__mark {
        width: 44px;
    }

    .admin-login-page .brand-header .s4o-brand-lockup__wordmark {
        font-size: 1.95rem;
    }
}

@media (prefers-color-scheme: dark) {
    .admin-login-page[data-s4o-theme="auto"] {
        background:
            radial-gradient(circle at top left, rgba(31, 35, 42, 0.98), rgba(18, 21, 27, 0.98) 44%, rgba(10, 12, 16, 1) 100%);
        color: #f4f7fb;
        color-scheme: dark;
    }

    .admin-login-page[data-s4o-theme="auto"] .login-layout {
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(14, 17, 23, 0.96);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    }

    .admin-login-page[data-s4o-theme="auto"] .login-box {
        background: rgba(14, 17, 23, 0.98);
    }

    .admin-login-page[data-s4o-theme="auto"] .s4o-brand-lockup__wordmark {
        color: #ffffff;
    }

    .admin-login-page[data-s4o-theme="auto"] input {
        border-color: rgba(255, 255, 255, 0.14);
        background: #11151b;
        color: #f7f9fc;
    }

    .admin-login-page[data-s4o-theme="auto"] input::placeholder {
        color: transparent;
    }

    .admin-login-page[data-s4o-theme="auto"] .floating-field label {
        color: rgba(228, 234, 244, 0.58);
    }

    .admin-login-page[data-s4o-theme="auto"] .floating-field input:focus + label,
    .admin-login-page[data-s4o-theme="auto"] .floating-field input:not(:placeholder-shown) + label {
        color: rgba(241, 245, 252, 0.78);
    }

    .admin-login-page[data-s4o-theme="auto"] .remember-login-id {
        color: rgba(228, 234, 244, 0.72);
    }

    .admin-login-page[data-s4o-theme="auto"] .remember-login-id input[type="checkbox"] {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.02);
        accent-color: #f6f8fb;
    }

    .admin-login-page[data-s4o-theme="auto"] .btn-login {
        color: #0a0a0a;
        background: #f6f8fb;
    }

    .admin-login-page[data-s4o-theme="auto"] .login-hero::after {
        background:
            linear-gradient(180deg, rgba(6, 8, 12, 0.12) 0%, rgba(6, 8, 12, 0.16) 42%, rgba(6, 8, 12, 0.68) 100%),
            linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 48%);
    }
}

/* ============================
   관리자 레이아웃
============================ */

.admin-layout {
    min-height: 100vh;
    --admin-sidebar-collapsed-width: 64px;
    --admin-sidebar-expanded-width: 240px;
    --admin-sidebar-width: var(--admin-sidebar-collapsed-width);
}

.admin-sidebar-expanded .admin-layout,
.admin-layout.sidebar-expanded {
    --admin-sidebar-width: var(--admin-sidebar-expanded-width);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--admin-sidebar-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    color: var(--color-text);
    border-right: 1px solid var(--color-line);
    box-shadow: none;
    overflow: hidden;
    z-index: var(--z-sticky);
    transition: none;
}

.admin-sidebar-motion-ready .sidebar {
    transition: width var(--transition-base);
}

.sidebar-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    padding: 18px 8px 16px;
    border-bottom: 1px solid var(--color-line);
}

.sidebar-brand .s4o-brand-lockup {
    justify-content: center;
}

.sidebar-brand .s4o-brand-lockup__mark {
    width: 38px;
}

.sidebar-brand .s4o-brand-lockup__copy {
    display: none;
}

.sidebar-menu-scroll {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar-menu-scroll:hover,
.sidebar-menu-scroll:focus-within {
    scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    background-clip: padding-box;
}

.sidebar-menu-scroll:hover::-webkit-scrollbar-thumb,
.sidebar-menu-scroll:focus-within::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    background-clip: padding-box;
}

.sidebar-menu {
    width: 100%;
    list-style: none;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 12px 8px;
}

.sidebar-menu > li {
    width: 100%;
    display: grid;
    justify-items: center;
}

.menu-item,
.menu-group ul li a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--color-muted);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.menu-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-label {
    display: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item:hover,
.menu-item.active,
.menu-group ul li a:hover,
.menu-group ul li a.active {
    color: var(--color-ink);
    background: var(--color-accent-soft);
    border-color: var(--color-line);
    box-shadow: none;
}

.menu-group {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.menu-group-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}

.menu-group-dot {
    width: 4px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-muted);
}

.menu-group-text {
    display: none;
}

.menu-group ul {
    width: 100%;
    list-style: none;
    display: grid;
    justify-items: center;
    gap: 4px;
}

.menu-group ul li {
    width: 100%;
    display: grid;
    justify-items: center;
}

.menu-group ul li a {
    padding-left: 0;
}

.menu-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sidebar-footer {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    padding: 12px 8px;
    border-top: 1px solid var(--color-line);
}

.sidebar-role-switch {
    display: none;
    width: 100%;
    gap: 8px;
}

.sidebar-role-switch__label {
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
}

.sidebar-role-switch__buttons {
    display: grid;
    gap: 6px;
}

.sidebar-role-switch__button {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-muted);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
}

.sidebar-role-switch__button:hover,
.sidebar-role-switch__button.is-active {
    border-color: var(--color-line-strong);
    background: var(--color-accent-soft);
    color: var(--color-ink);
}

.sidebar-desktop-toggle,
.btn-logout-sidebar {
    width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-line);
    color: var(--color-ink);
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.45;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.sidebar-desktop-toggle:hover,
.btn-logout-sidebar:hover {
    color: var(--color-ink);
    background: var(--color-accent-soft);
    border-color: var(--color-line-strong);
}

.admin-sidebar-motion-ready .sidebar-desktop-toggle .menu-icon {
    transition: transform var(--transition-fast);
}

.admin-sidebar-expanded .admin-layout .sidebar,
.admin-layout.sidebar-expanded .sidebar {
    align-items: stretch;
}

.admin-sidebar-expanded .admin-layout .sidebar-brand,
.admin-layout.sidebar-expanded .sidebar-brand {
    padding: 20px 16px 14px;
    justify-content: flex-start;
}

.admin-sidebar-expanded .admin-layout .sidebar-brand .s4o-brand-lockup,
.admin-layout.sidebar-expanded .sidebar-brand .s4o-brand-lockup {
    justify-content: flex-start;
}

.admin-sidebar-expanded .admin-layout .sidebar-brand .s4o-brand-lockup__copy,
.admin-layout.sidebar-expanded .sidebar-brand .s4o-brand-lockup__copy {
    display: flex;
}

.admin-sidebar-expanded .admin-layout .sidebar-menu,
.admin-layout.sidebar-expanded .sidebar-menu {
    justify-items: stretch;
    padding: 12px;
}

.admin-sidebar-expanded .admin-layout .sidebar-menu > li,
.admin-sidebar-expanded .admin-layout .menu-group,
.admin-sidebar-expanded .admin-layout .menu-group ul,
.admin-sidebar-expanded .admin-layout .menu-group ul li,
.admin-layout.sidebar-expanded .sidebar-menu > li,
.admin-layout.sidebar-expanded .menu-group,
.admin-layout.sidebar-expanded .menu-group ul,
.admin-layout.sidebar-expanded .menu-group ul li {
    justify-items: stretch;
}

.admin-sidebar-expanded .admin-layout .menu-item,
.admin-sidebar-expanded .admin-layout .menu-group ul li a,
.admin-layout.sidebar-expanded .menu-item,
.admin-layout.sidebar-expanded .menu-group ul li a {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
}

.admin-sidebar-expanded .admin-layout .menu-label,
.admin-layout.sidebar-expanded .menu-label {
    display: inline;
}

.admin-sidebar-expanded .admin-layout .menu-group-label,
.admin-layout.sidebar-expanded .menu-group-label {
    justify-content: flex-start;
    min-height: auto;
    padding: 12px 12px 6px;
}

.admin-sidebar-expanded .admin-layout .menu-group-dot,
.admin-layout.sidebar-expanded .menu-group-dot {
    display: none;
}

.admin-sidebar-expanded .admin-layout .menu-group-text,
.admin-layout.sidebar-expanded .menu-group-text {
    display: inline;
}

.admin-sidebar-expanded .admin-layout .sidebar-footer,
.admin-layout.sidebar-expanded .sidebar-footer {
    align-items: stretch;
    padding: 12px;
}

.admin-sidebar-expanded .admin-layout .sidebar-role-switch,
.admin-layout.sidebar-expanded .sidebar-role-switch {
    display: grid;
}

.admin-sidebar-expanded .admin-layout .sidebar-desktop-toggle,
.admin-sidebar-expanded .admin-layout .btn-logout-sidebar,
.admin-layout.sidebar-expanded .sidebar-desktop-toggle,
.admin-layout.sidebar-expanded .btn-logout-sidebar {
    width: 100%;
    min-height: 44px;
    gap: 12px;
    justify-content: flex-start;
    padding: 0 12px;
}

.admin-sidebar-expanded .admin-layout .sidebar-desktop-toggle .menu-icon,
.admin-layout.sidebar-expanded .sidebar-desktop-toggle .menu-icon {
    transform: rotate(180deg);
}

.main-content {
    min-height: 100vh;
    margin-left: var(--admin-sidebar-width);
    padding: 28px;
    transition: none;
}

.admin-sidebar-motion-ready .main-content {
    transition: margin-left var(--transition-base);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 22px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.page-header h2 {
    color: var(--color-ink);
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-actions > .btn-primary,
.header-actions > .btn-outline {
    white-space: nowrap;
}

.header-actions select {
    min-width: 180px;
}

.user-info,
.result-count {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.period-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.period-switch__item {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-line);
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
    background: #ffffff;
}

.period-switch__item.is-active {
    color: var(--color-ink);
    background: var(--color-accent-soft);
    border-color: var(--color-line-strong);
}

.segment-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.segment-card {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
}

.segment-card.is-active {
    border-color: var(--color-line-strong);
    box-shadow: none;
}

.segment-card__main,
.segment-card__delete {
    border: 0;
    background: transparent;
}

.segment-card__main {
    flex: 1;
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    text-align: left;
}

.segment-card__main strong {
    color: var(--color-ink);
    font-size: 0.96rem;
    font-weight: 800;
}

.segment-card__main span,
.segment-card__main small {
    color: var(--color-muted);
    line-height: 1.6;
}

.segment-card__delete {
    width: 74px;
    border-left: 1px solid var(--color-line);
    color: #b42318;
    font-size: 0.84rem;
    font-weight: 800;
}

.customer-filter-panel {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.customer-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(132px, 1fr)) minmax(220px, 1.4fr) auto;
    gap: 10px;
    align-items: end;
}

.customer-filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.customer-filter-field > span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
}

.customer-filter-field select,
.customer-filter-field input {
    min-height: 42px;
    font-size: 0.88rem;
}

.customer-filter-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.customer-filter-panel__actions .btn-primary,
.customer-filter-panel__actions .btn-outline {
    min-height: 42px;
    white-space: nowrap;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card,
.dashboard-card {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: none;
}

.card-label {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-value {
    margin-top: 12px;
    color: var(--color-ink);
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0;
}

.summary-card__value--compact {
    font-size: 20px;
    line-height: 1.4;
}

.card-value--compact-meta {
    font-size: 14px;
    line-height: 1.5;
}

.summary-card__body {
    margin-top: 8px;
    color: var(--color-ink);
    font-size: 18px;
    line-height: 1.4;
    font-weight: 800;
}

.summary-card__tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.summary-card__empty {
    padding: 0;
    text-align: left;
}

/* 주문번호 변경 요청 섹션의 카드형 검토 UI를 정의합니다. */
.order-number-change-panel {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: none;
}

.order-number-change-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-line);
}

.order-number-change-panel__header h3 {
    color: var(--color-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
}

.order-number-change-panel__header p {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.order-number-change-review {
    display: grid;
    gap: 16px;
    padding-top: 16px;
}

.order-number-change-panel .ds-banner span {
    white-space: pre-wrap;
}

.order-line-edit-table__include {
    width: 56px;
}

.order-line-edit-table__style-code {
    width: 160px;
}

.order-line-edit-table__price {
    width: 100px;
}

.order-line-size-summary {
    display: inline-block;
    margin-right: 8px;
}

.order-number-change-review__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.order-number-change-review__meta div {
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.order-number-change-review__meta dt,
.order-number-change-review__field span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5;
}

.order-number-change-review__meta dd {
    margin-top: 8px;
    color: var(--color-ink);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.5;
}

.order-number-change-review__field {
    display: grid;
    gap: 8px;
}

.order-number-change-review__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.order-number-change-empty {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.order-number-change-history {
    margin-top: 16px;
}

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

.dashboard-card h3 {
    margin-bottom: 14px;
    color: var(--color-ink);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0;
}

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

.dashboard-card__head h3 {
    margin-bottom: 0;
}

.dashboard-card__link {
    color: var(--color-accent);
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-card .table-shell {
    margin-top: 14px;
}

.dashboard-card__appointment-item {
    margin-bottom: 8px;
}

.reactivation-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reactivation-metric,
.reactivation-item {
    display: block;
    color: inherit;
    text-decoration: none;
}

.reactivation-metric {
    padding: 16px 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.reactivation-metric:hover,
.reactivation-item:hover {
    transform: none;
    border-color: var(--color-line-strong);
    box-shadow: none;
}

.reactivation-metric strong,
.reactivation-item__head .memo-content {
    color: var(--color-ink);
    font-weight: 800;
    letter-spacing: 0;
}

.reactivation-metric span {
    display: block;
    margin-top: 10px;
    color: var(--color-ink);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
}

.reactivation-metric small {
    display: block;
    margin-top: 8px;
    color: var(--color-muted);
    line-height: 1.5;
}

.reactivation-list {
    display: grid;
    gap: 10px;
}

.reactivation-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.reactivation-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.filter-note {
    margin-bottom: 14px;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.customer-merge-panel {
    display: grid;
    gap: 14px;
}

.customer-merge-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.customer-merge-note {
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

.customer-merge-results {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.customer-merge-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.customer-merge-card__head,
.customer-merge-card__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-merge-card__head strong {
    display: block;
    color: var(--color-ink);
    font-size: 0.96rem;
    font-weight: 800;
}

.customer-merge-card__head p {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.customer-merge-card__meta {
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.customer-merge-card__reason {
    color: var(--color-ink);
    font-size: 0.84rem;
    font-weight: 700;
}

.customer-merge-card .btn-outline {
    justify-self: flex-start;
}

.customer-merge-empty {
    padding: 18px;
    border: 1px dashed rgba(16, 24, 40, 0.14);
    border-radius: var(--radius-lg);
    color: var(--color-muted);
    text-align: center;
}

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

.dashboard-card__header h3 {
    margin: 0;
}

.dashboard-card--spaced {
    margin-bottom: 16px;
}

.dashboard-card--top-spacing {
    margin-top: 16px;
}

.table-shell--spaced {
    margin-bottom: 16px;
}

.detail-record-list {
    display: grid;
    gap: 12px;
}

.detail-record {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.detail-record__head,
.detail-record__meta,
.detail-record__actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-record__meta {
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.detail-record__body,
.detail-record__emphasis {
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.7;
}

.detail-record__emphasis {
    color: var(--color-ink);
    font-weight: 700;
}

.staff-kpi-list {
    display: grid;
    gap: 12px;
}

.staff-kpi-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.staff-kpi-card__head,
.staff-kpi-card__metrics {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.staff-kpi-card__head strong {
    color: var(--color-ink);
    font-size: 0.96rem;
    font-weight: 800;
}

.staff-kpi-card__metrics span {
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.staff-kpi-card__progress-bar {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.08);
}

.staff-kpi-card__progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-ink);
}

.attachment-thumb {
    width: 100%;
    max-width: 220px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 24, 40, 0.08);
    object-fit: cover;
}

.dashboard-stack {
    display: grid;
    gap: 16px;
}

.dashboard-stack__section {
    display: grid;
    gap: 8px;
}

.dashboard-stack__title {
    display: block;
    margin-bottom: 8px;
    color: var(--color-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.dashboard-stack__section .memo-item,
.dashboard-stack__section .empty-msg {
    margin-bottom: 0;
}

.crm-shell-preview {
    display: grid;
    gap: 12px;
}

.crm-shell-preview .crm-header,
.crm-shell-preview .bottom-nav {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
}

.crm-shell-preview .work-queue-panel,
.crm-shell-preview .calling-progress,
.crm-shell-preview .today-banner,
.crm-shell-preview .calendar-view-tabs {
    margin-bottom: 0;
}

.memo-item {
    padding: 14px 16px;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.memo-item .memo-type {
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.memo-item .memo-content {
    color: var(--color-text);
    font-size: 0.92rem;
}

.memo-item .memo-date {
    margin-top: 6px;
    color: #98a2b3;
    font-size: 0.8rem;
}

.product-thumb-sm {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.no-img-sm {
    color: #98a2b3;
    font-size: 0.78rem;
}

.product-row--inactive td {
    opacity: 0.72;
}

.size-chip-sm {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-right: 4px;
    margin-bottom: 4px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.74rem;
    font-weight: 800;
}

.product-row--inactive {
    opacity: 0.7;
}

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

.settings-grid--overview {
    margin-bottom: 20px;
}

.settings-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.settings-card:hover,
.settings-card.is-active {
    transform: none;
    border-color: var(--color-line-strong);
    box-shadow: none;
}

.settings-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-card h3 {
    margin-bottom: 10px;
    color: var(--color-ink);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
}

.settings-card p,
.settings-note p {
    color: var(--color-muted);
    line-height: 1.65;
}

.settings-card ul {
    margin-top: 14px;
    padding-left: 18px;
    color: var(--color-text);
    line-height: 1.7;
}

.settings-note {
    margin-top: 20px;
    padding: 22px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.settings-note h3 {
    margin-bottom: 10px;
    color: var(--color-ink);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
}

.status-muted {
    background: #eef2ff;
    color: #364152;
}

.rfm-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: rgba(16, 24, 40, 0.08);
    color: var(--color-ink);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.settings-section {
    margin-top: 20px;
    padding: 22px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.settings-section__header,
.settings-brand-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.settings-section__header h3,
.settings-brand-card__head h3 {
    color: var(--color-ink);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.settings-section__header p,
.settings-brand-card__head p {
    margin-top: 6px;
    color: var(--color-muted);
    line-height: 1.6;
}

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

.settings-brand-card {
    padding: 22px;
    background: #ffffff;
}

.audit-log-detail {
    color: var(--color-text);
    font-size: 0.84rem;
    line-height: 1.65;
    white-space: pre-line;
}

.table-subtext {
    display: block;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.report-view {
    margin-top: 12px;
}

.credential-sheet {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: rgba(250, 248, 244, 0.92);
}

.credential-sheet p {
    color: var(--color-text);
    font-size: 0.92rem;
    line-height: 1.7;
}

.credential-sheet strong {
    color: var(--color-ink);
}

.report-table th,
.report-table td {
    text-align: center;
}

.report-table th:first-child,
.report-table td:first-child,
.report-table th:nth-child(2),
.report-table td:nth-child(2) {
    text-align: left;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-tableholder {
    /* 발주 관리 그리드는 시즌별 사이즈 컬럼 수가 달라지므로 가로 스크롤을 항상 명확하게 노출한다. */
    overflow-x: scroll;
    scrollbar-color: #737373 #f1f1f1;
    scrollbar-gutter: stable;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-tableholder::-webkit-scrollbar {
    height: 12px;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-tableholder::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-tableholder::-webkit-scrollbar-thumb {
    border: 3px solid #f1f1f1;
    border-radius: var(--radius-sm);
    background: #737373;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-tableholder::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-header .tabulator-col-title,
.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
    padding-inline: 12px;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell {
    padding-inline: 12px;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-header .tabulator-col.tabulator-frozen,
.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell.tabulator-frozen {
    background: var(--color-surface);
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-header .tabulator-col.tabulator-frozen.tabulator-frozen-left,
.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left {
    border-right-color: #c8c8c8;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell[tabulator-field="styleName"] {
    color: var(--color-ink);
    font-weight: 700;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell.production-order-table__size,
.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell.production-order-table__total {
    font-variant-numeric: tabular-nums;
}

.production-order-grid-shell.s4o-grid-shell .tabulator .tabulator-row .tabulator-cell.production-order-table__total {
    color: var(--color-ink);
    font-weight: 700;
}

/* design.md 기준을 확인하는 관리자 디자인 시스템 프리뷰입니다. */
.design-preview-hero,
.design-preview-section {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: none;
}

.design-preview-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.design-preview-hero h3,
.design-preview-section__header h3 {
    color: var(--color-ink);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
}

.design-preview-hero p,
.design-preview-section__header p,
.design-component-panel p,
.design-token-card p,
.design-measure-grid p,
.design-radius-grid p,
.design-depth-grid p,
.design-type-list p {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.design-preview-hero > div:first-child {
    display: grid;
    align-content: center;
    gap: 10px;
}

.design-preview-kicker {
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.design-preview-hero__meta {
    display: grid;
    gap: 12px;
}

.design-preview-hero__meta div,
.design-component-panel,
.design-type-list > div,
.design-measure-grid article {
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.design-preview-hero__meta dt,
.design-type-list span,
.design-token-card span,
.design-measure-grid span,
.design-radius-grid span,
.design-depth-grid span,
.design-component-panel h4,
.design-preview-form label > span {
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5;
}

.design-preview-hero__meta dd,
.design-token-card strong,
.design-measure-grid strong,
.design-radius-grid strong,
.design-depth-grid strong {
    margin-top: 6px;
    color: var(--color-ink);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.4;
}

.design-preview-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.design-token-grid,
.design-component-grid,
.design-measure-grid,
.design-radius-grid,
.design-depth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.design-token-card {
    min-height: 150px;
    display: grid;
    align-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
}

.design-token-card--bg {
    background: var(--color-bg);
}

.design-token-card--surface {
    background: var(--color-surface);
}

.design-token-card--ink {
    background: var(--color-ink);
    color: #ffffff;
}

.design-token-card--ink span,
.design-token-card--ink strong,
.design-token-card--ink p,
.design-token-card--accent span,
.design-token-card--accent strong,
.design-token-card--accent p {
    color: #ffffff;
}

.design-token-card--muted {
    background: var(--color-muted);
    color: #ffffff;
}

.design-token-card--muted span,
.design-token-card--muted strong,
.design-token-card--muted p {
    color: #ffffff;
}

.design-token-card--line {
    border-color: var(--color-line-strong);
    background: #ffffff;
}

.design-token-card--accent {
    background: var(--color-accent);
}

.design-semantic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.design-semantic-card {
    min-height: 188px;
    display: grid;
    align-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.design-semantic-card > div:first-child > span,
.design-semantic-card > div:first-child > strong {
    display: block;
    font-weight: 800;
    line-height: 1.45;
}

.design-semantic-card > div:first-child > span {
    color: var(--color-muted);
    font-size: 0.78rem;
}

.design-semantic-card strong {
    margin-top: 6px;
    color: var(--color-ink);
    font-size: 0.95rem;
}

.design-semantic-card p {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.design-semantic-card--danger {
    border-color: rgba(180, 35, 24, 0.22);
    background: var(--color-danger-soft);
}

.design-semantic-card--warning {
    border-color: rgba(180, 83, 9, 0.24);
    background: var(--color-warning-soft);
}

.design-semantic-card--success {
    border-color: rgba(4, 120, 87, 0.2);
    background: var(--color-success-soft);
}

.design-semantic-card--info {
    border-color: rgba(37, 99, 235, 0.18);
    background: var(--color-info-soft);
}

.design-semantic-message {
    padding: 10px 12px;
    border: 1px solid rgba(180, 35, 24, 0.18);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-danger);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5;
}

.design-semantic-stack {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.design-semantic-card .status-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    line-height: 1;
}

.design-type-list {
    display: grid;
    gap: 12px;
}

.design-type-page,
.design-type-section {
    display: block;
    margin-top: 8px;
    color: var(--color-ink);
}

.design-type-page {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.design-type-section {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
}

.design-type-meta {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.design-measure-grid article {
    min-height: 126px;
}

.design-measure-bar {
    margin: 16px 0 12px;
    height: 36px;
    border: 1px solid var(--color-line-strong);
    background: #ffffff;
}

.design-measure-bar--xs {
    width: 40px;
    border-radius: var(--radius-xs);
}

.design-measure-bar--sm {
    width: 64px;
    border-radius: var(--radius-sm);
}

.design-measure-bar--md {
    width: 96px;
    border-radius: var(--radius-md);
}

.design-measure-bar--lg {
    width: 128px;
    border-radius: var(--radius-lg);
}

.design-radius-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.design-radius-sample,
.design-depth-card {
    min-height: 148px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-line);
    background: #ffffff;
}

.design-radius-sample--xs {
    border-radius: var(--radius-xs);
}

.design-radius-sample--sm {
    border-radius: var(--radius-sm);
}

.design-radius-sample--lg {
    border-radius: var(--radius-lg);
}

.design-radius-sample--pill {
    min-height: 0;
    border-radius: var(--radius-pill);
}

.design-depth-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.design-depth-card {
    border-radius: var(--radius-sm);
}

.design-depth-card--flat {
    border-color: transparent;
    background: var(--color-bg-accent);
}

.design-depth-card--line {
    box-shadow: none;
}

.design-depth-card--raised {
    border-color: var(--color-line);
    box-shadow: none;
}

.design-depth-card--overlay {
    border-color: var(--color-line);
    box-shadow: none;
}

.design-depth-card--focus {
    border-color: var(--color-line);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.design-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 16px;
    align-items: stretch;
}

.design-modal-stage {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(rgba(17, 17, 17, 0.24), rgba(17, 17, 17, 0.24)),
        var(--color-bg-accent);
}

.design-modal-panel-preview {
    width: min(100%, 520px);
    transform: none;
    background: var(--color-surface);
}

.design-modal-rules ul {
    display: grid;
    gap: 8px;
    padding-left: 18px;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.design-component-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 156px;
}

.design-component-actions,
.design-badge-row,
.design-preview-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.design-navigation-grid {
    display: grid;
    grid-template-columns: 80px minmax(220px, 0.62fr) minmax(260px, 1fr);
    gap: 12px;
    align-items: stretch;
}

.design-navigation-rail,
.design-navigation-expanded {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.design-navigation-rail {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 10px;
    min-height: 260px;
    padding: 14px 10px;
}

.design-navigation-rail__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    font-weight: 900;
}

.design-navigation-rail__item,
.design-navigation-expanded a,
.design-navigation-expanded button {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-muted);
    font-weight: 800;
}

.design-navigation-rail__item {
    justify-content: center;
    width: 44px;
    height: 44px;
}

.design-navigation-rail__item--footer {
    margin-top: auto;
}

.design-navigation-rail__item.active,
.design-navigation-expanded .active,
.design-navigation-expanded a:hover,
.design-navigation-expanded button:hover {
    border-color: var(--color-line);
    background: var(--color-bg);
    color: var(--color-ink);
}

.design-navigation-expanded {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 260px;
    padding: 16px;
}

.design-navigation-expanded strong {
    margin-bottom: 8px;
    color: var(--color-ink);
    font-size: 1.1rem;
}

.design-navigation-expanded a,
.design-navigation-expanded button {
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
}

.design-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.design-icon-row .s4o-icon {
    width: 24px;
    height: 24px;
    color: var(--color-ink);
}

.design-preview-summary {
    min-height: 116px;
    margin: 0;
}

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

.design-preview-form label {
    display: grid;
    gap: 8px;
}

.design-preview-form__wide,
.design-preview-form__actions {
    grid-column: 1 / -1;
}

.design-preview-form__actions {
    justify-content: flex-end;
}

@media (max-width: 1279px) {
    .segment-board {
        grid-template-columns: 1fr;
    }

    .summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .reactivation-metrics {
        grid-template-columns: 1fr;
    }

    .customer-merge-search {
        grid-template-columns: 1fr;
    }

    .customer-filter-panel__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-filter-field--keyword {
        grid-column: span 2;
    }

    .customer-filter-panel__actions {
        align-self: end;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-brand-grid {
        grid-template-columns: 1fr;
    }

    .design-preview-hero,
    .design-token-grid,
    .design-semantic-grid,
    .design-component-grid,
    .design-navigation-grid,
    .design-measure-grid,
    .design-radius-grid,
    .design-depth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .admin-sidebar-expanded .admin-layout,
    .admin-layout.sidebar-expanded {
        --admin-sidebar-width: var(--admin-sidebar-collapsed-width);
    }

    .sidebar-desktop-toggle {
        display: none;
    }

    .sidebar-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 120;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 14px;
        gap: 10px;
        border: 1px solid var(--color-line);
        border-radius: var(--radius-sm);
        background: #ffffff;
        color: var(--color-ink);
        font-size: 0.88rem;
        font-weight: 800;
        line-height: 1;
        box-shadow: none;
    }

    .sidebar-toggle__icon {
        display: grid;
        gap: 4px;
        width: 18px;
    }

    .sidebar-toggle__icon span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--color-ink);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: var(--z-drawer);
        display: block;
        background: rgba(17, 17, 17, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: none;
    }

    .admin-sidebar-motion-ready .sidebar-backdrop {
        transition: opacity var(--transition-base);
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: calc(var(--z-drawer) + 1);
        width: min(320px, calc(100vw - 48px));
        max-height: none;
        align-items: stretch;
        border-right: 1px solid var(--color-line);
        border-radius: 0;
        transform: translateX(-100%);
        transition: none;
        outline: none;
        overflow: hidden;
    }

    .admin-sidebar-motion-ready .sidebar {
        transition: transform var(--transition-base);
    }

    .sidebar-close {
        position: absolute;
        top: 18px;
        right: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid var(--color-line);
        border-radius: var(--radius-sm);
        background: #ffffff;
        color: var(--color-ink);
        font-size: 0.8rem;
        font-weight: 800;
    }

    .sidebar-drawer-open {
        overflow: hidden;
    }

    .sidebar-drawer-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-drawer-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-menu {
        justify-items: stretch;
        gap: 4px;
        padding: 12px;
        padding-bottom: 8px;
    }

    .sidebar-menu > li,
    .menu-group,
    .menu-group ul,
    .menu-group ul li {
        justify-items: stretch;
    }

    .menu-item,
    .menu-group ul li a {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        min-height: 44px;
        padding: 0 12px;
    }

    .menu-label {
        display: inline;
    }

    .menu-group-label {
        justify-content: flex-start;
        min-height: auto;
        padding: 12px 12px 6px;
    }

    .menu-group-dot {
        display: none;
    }

    .menu-group-text {
        display: inline;
    }

    .sidebar-brand {
        padding: 22px 18px 16px;
        justify-content: flex-start;
    }

    .sidebar-brand .s4o-brand-lockup {
        justify-content: flex-start;
    }

    .sidebar-brand .s4o-brand-lockup__copy {
        display: flex;
    }

    .sidebar-brand .s4o-brand-lockup__mark {
        width: 40px;
    }

    .sidebar-footer {
        padding: 12px;
    }

    .btn-logout-sidebar {
        width: 100%;
        min-height: 44px;
        gap: 12px;
        justify-content: center;
        padding: 0 12px;
    }

    .main-content {
        margin-left: 0;
        padding-top: 84px;
    }
}

@media (max-width: 767px) {
    .main-content {
        padding: 84px 16px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: var(--radius-lg);
    }

    .page-header h2 {
        max-width: 100%;
    }

    .header-actions,
    .header-actions select {
        width: 100%;
    }

    .header-actions select {
        min-width: 0;
    }

    .settings-section {
        padding: 18px;
        border-radius: var(--radius-lg);
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .order-number-change-panel {
        padding: 16px;
    }

    .order-number-change-panel__header,
    .order-number-change-review__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .order-number-change-review__meta {
        grid-template-columns: 1fr;
    }

    .order-number-change-review__actions .btn-primary {
        width: 100%;
    }

    .customer-filter-panel {
        padding: 12px;
    }

    .customer-filter-panel__grid {
        grid-template-columns: 1fr;
    }

    .customer-filter-field--keyword {
        grid-column: auto;
    }

    .customer-filter-panel__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-filter-panel__actions > * {
        width: 100%;
    }

    .sidebar-brand {
        padding: 22px 18px 16px;
    }

    .design-preview-hero,
    .design-token-grid,
    .design-semantic-grid,
    .design-component-grid,
    .design-navigation-grid,
    .design-modal-grid,
    .design-measure-grid,
    .design-radius-grid,
    .design-depth-grid,
    .design-preview-form {
        grid-template-columns: 1fr;
    }

    .design-preview-hero,
    .design-preview-section {
        padding: 18px;
    }

    .design-preview-section__header {
        flex-direction: column;
    }

    .design-preview-form__actions > * {
        width: 100%;
    }

    .ui-kit-page .page-header,
    .ui-kit-page .header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ui-kit-page .header-actions > * {
        width: 100%;
    }
}

/* 태블릿 구간(768~1023px)부터는 히어로를 배경 레이어로 내리고
   로그인 카드를 전면 오버레이로 전환해 공용 태블릿 토큰과 맞춥니다. */
@media (max-width: 1023px) {
    .login-shell {
        width: min(720px, 100%);
    }

    .login-layout {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
        min-height: max(620px, calc(100dvh - 48px));
        background: #0f141b;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .admin-login-page .login-layout .login-box {
        position: relative;
        z-index: 1;
        width: min(440px, calc(100% - 48px));
        align-items: stretch;
        gap: 26px;
        margin: clamp(20px, 4vw, 32px);
        padding: clamp(30px, 5vw, 42px);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: 0 20px 48px rgba(8, 12, 18, 0.22);
        backdrop-filter: blur(18px) saturate(125%);
        -webkit-backdrop-filter: blur(18px) saturate(125%);
    }

    .admin-login-page .brand-header,
    .admin-login-page #loginForm {
        width: 100%;
    }

    .login-hero {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        max-height: none;
    }

    .login-hero::after {
        background:
            linear-gradient(180deg, rgba(7, 10, 15, 0.18) 0%, rgba(7, 10, 15, 0.24) 38%, rgba(7, 10, 15, 0.74) 100%),
            linear-gradient(0deg, rgba(10, 12, 16, 0.12) 0%, rgba(10, 12, 16, 0.12) 100%);
    }

    .login-hero__copy {
        display: none;
    }

    .admin-login-page input {
        background: rgba(255, 255, 255, 0.84);
    }
}

/* 모바일 구간(<768px)에서는 동일한 배경형 구성을 유지하되 카드 폭과 외곽 여백만 더 촘촘하게 줄입니다. */
@media (max-width: 767px) {
    .admin-login-page {
        padding: 14px;
    }

    .login-shell {
        width: 100%;
    }

    .login-layout {
        min-height: max(620px, calc(100dvh - 28px));
        border-radius: 24px;
    }

    .admin-login-page .brand-header {
        gap: 0;
    }

    .admin-login-page .brand-header .s4o-brand-lockup__mark {
        width: 42px;
    }

    .admin-login-page .brand-header .s4o-brand-lockup__wordmark {
        font-size: 1.7rem;
    }

    .admin-login-page .login-layout .login-box {
        width: min(100%, calc(100% - 28px));
        margin: 14px;
        padding: 28px 20px;
        border-radius: 22px;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 1023px) {
    .admin-login-page[data-s4o-theme="auto"] .login-layout {
        background: #070b10;
    }

    .admin-login-page[data-s4o-theme="auto"] .login-layout .login-box {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(12, 16, 22, 0.72);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
    }
}

/* ============================
   design.md 블랙&화이트 관리자 보정
============================ */

.admin-login-page {
    background: var(--color-bg);
}

.admin-login-page::before,
.admin-login-page::after {
    display: none;
}

.admin-login-page .floating-field label,
.memo-item .memo-date,
.no-img-sm {
    color: var(--color-muted);
}

.admin-login-page .btn-login {
    box-shadow: none;
}

.admin-login-page .login-box,
.sidebar,
.page-header,
.settings-section,
.design-preview-hero,
.design-preview-section,
.credential-sheet,
.order-number-change-panel {
    border-color: var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.segment-card,
.summary-card,
.dashboard-card,
.reactivation-metric,
.customer-merge-card,
.detail-record,
.staff-kpi-card,
.memo-item,
.settings-card,
.settings-note,
.settings-brand-card,
.design-component-panel {
    border-color: var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    box-shadow: none;
}

.menu-item,
.menu-group ul li a,
.sidebar-toggle,
.sidebar-close,
.sidebar-desktop-toggle,
.btn-logout-sidebar,
.period-switch__item,
.segment-card__main,
.segment-card__delete,
.size-chip-sm,
.status-muted {
    border-radius: var(--radius-sm);
    letter-spacing: 0;
}

.menu-item:hover,
.menu-item.active,
.menu-group ul li a:hover,
.menu-group ul li a.active,
.sidebar-desktop-toggle:hover,
.period-switch__item.is-active,
.settings-card:hover,
.settings-card.is-active {
    background: var(--color-accent-soft);
    border-color: var(--color-line-strong);
    box-shadow: none;
    color: var(--color-ink);
}

.segment-card.is-active {
    border-color: var(--color-line-strong);
    box-shadow: none;
}

.segment-card__delete {
    color: var(--color-ink);
}

.status-muted,
.size-chip-sm,
.menu-badge {
    border: 1px solid var(--color-line);
    background: #ffffff;
    color: var(--color-ink);
}

.rfm-badge,
.menu-badge {
    border-radius: var(--radius-pill);
    letter-spacing: 0;
}

.dashboard-grid > * {
    min-width: 0;
}

.reactivation-metric strong,
.reactivation-metric span {
    letter-spacing: 0;
}

.admin-page h2,
.admin-page h3,
.admin-page .card-value,
.admin-page .memo-content {
    letter-spacing: 0;
}

.admin-page .btn-primary,
.admin-page .btn-outline,
.admin-page .btn-sm,
.admin-page .filter-btn {
    box-shadow: none;
}

.admin-page .btn-primary:hover,
.admin-page .btn-outline:hover,
.admin-page .btn-sm:hover,
.admin-page .filter-btn:hover {
    transform: none;
    box-shadow: none;
}

.staff-kpi-card__progress-bar {
    background: #eeeeee;
}

.staff-kpi-card__progress-bar span {
    background: #111111;
}

.customer-merge-empty {
    border-color: var(--color-line-strong);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.attachment-thumb,
.product-thumb-sm {
    border-radius: var(--radius-sm);
}

.sidebar {
    border-radius: 0;
}

@media (max-width: 1023px) {
    .sidebar {
        border-radius: 0;
    }
}

/* ============================
   디자인 시스템 확장 컴포넌트 프리뷰 (design.md §4)
============================ */

.ds-ext-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.ds-ext-panel {
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    display: grid;
    gap: var(--space-3);
}

.ds-ext-panel--wide {
    grid-column: 1 / -1;
}

.ds-ext-panel h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-ink);
}

.ds-ext-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.ds-btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.ds-btn-md {
    height: 44px;
    padding: 0 16px;
}

.ds-btn-lg {
    height: 48px;
    padding: 0 20px;
    font-size: 15px;
}

.ds-ext-check {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text);
    font-size: 14px;
}

/* 탭 */
.ds-ext-tabs {
    display: flex;
    gap: var(--space-2);
    border-bottom: 1px solid var(--color-line);
}

.ds-ext-tab {
    height: 40px;
    padding: 0 16px;
    background: transparent;
    border: 0;
    color: var(--color-muted);
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.ds-ext-tab.is-active {
    color: var(--color-ink);
}

.ds-ext-tab.is-active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
    background: var(--color-ink);
}

.ds-ext-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 페이지네이션 */
.ds-ext-pagination {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.ds-ext-page {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-line);
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-weight: 700;
}

.ds-ext-page.is-current {
    background: var(--color-ink);
    color: #fff;
    border-color: var(--color-ink);
}

.ds-ext-page-sep {
    color: var(--color-muted);
    padding: 0 4px;
}

.ds-ext-meta {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    margin: 0;
}

/* 칩 */
.ds-ext-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ds-ext-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
}

.ds-ext-chip button {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.ds-ext-chip--selected {
    background: var(--color-ink);
    color: #fff;
    border-color: var(--color-ink);
}

/* 셀렉트 / 검색 */
.ds-ext-select,
.ds-ext-date {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
}

.ds-ext-search {
    position: relative;
}

.ds-ext-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
}

.ds-ext-search input {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
}

/* 파일 업로드 */
.ds-ext-upload {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 120px;
    padding: var(--space-4);
    border: 1px dashed var(--color-line-strong);
    border-radius: var(--radius-lg);
    background: var(--color-bg-accent);
    color: var(--color-text);
    text-align: center;
    cursor: pointer;
}

.ds-ext-upload em {
    color: var(--color-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

/* 로딩 */
.ds-ext-skeleton {
    height: 12px;
    background: var(--color-surface-soft);
    border-radius: var(--radius-xs);
    animation: dsExtSkeletonPulse var(--duration-slow) ease-in-out infinite alternate;
}

.ds-ext-skeleton--row {
    width: 100%;
    height: 16px;
    margin-bottom: var(--space-2);
}

@keyframes dsExtSkeletonPulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.ds-ext-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dsExtSpinnerRotate 1s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes dsExtSpinnerRotate {
    to { transform: rotate(360deg); }
}

/* 토스트 샘플 */
.ds-ext-toast-sample {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.ds-ext-toast-sample p {
    margin: 2px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

.ds-ext-toast-sample strong {
    color: var(--color-ink);
    font-size: 14px;
}

.ds-ext-toast-sample button {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.ds-ext-toast-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ds-ext-toast-dot--success {
    background: var(--color-success);
}

/* 오류 페이지 */
.ds-ext-error {
    display: grid;
    justify-items: center;
    gap: var(--space-2);
    padding: var(--space-8);
    text-align: center;
}

.ds-ext-error strong {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-ink);
    line-height: 1;
}

.ds-ext-error__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-ink);
    margin: 0;
}

.ds-ext-error__desc {
    color: var(--color-muted);
    margin: 0 0 var(--space-4);
}

@media (hover: hover) {
    .ds-ext-tab:not(.is-active):not(:disabled):hover { color: var(--color-ink); }
    .ds-ext-page:not(.is-current):hover { background: var(--color-surface-soft); }
    .ds-ext-chip:not(.ds-ext-chip--selected):hover { background: var(--color-surface-soft); }
}

/* ============================
   UI 키트 확장 컴포넌트 2 (페이지 헤더/반경/모달/토스트/매트릭스/포커스/링크/아이콘/배너/빈 상태/테이블/반응형)
============================ */

.ds-header-demo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.ds-header-demo + .ds-header-demo { margin-top: var(--space-3); }
.ds-header-demo--desktop { height: 64px; }
.ds-header-demo--tablet  { height: 56px; padding: 0 var(--space-5); }
.ds-header-demo--mobile  { height: 52px; padding: 0 var(--space-4); }

.ds-header-demo strong { color: var(--color-ink); font-size: 18px; font-weight: 800; display: block; }
.ds-header-demo em { color: var(--color-muted); font-size: 12px; font-style: normal; font-weight: 700; }

.ds-ext-more {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    color: var(--color-text);
}

/* 반경 비교 */
.ds-radius-compare {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.ds-radius-sample {
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    text-align: center;
}

.ds-radius-sample span { display: block; font-size: 20px; font-weight: 800; color: var(--color-ink); }
.ds-radius-sample em { display: block; font-size: 12px; color: var(--color-muted); font-style: normal; margin-top: 4px; }
.ds-radius-sample--lg { border-radius: var(--radius-lg); }
.ds-radius-sample--sm { border-radius: var(--radius-sm); }

/* 모달 폭 변형 */
.ds-modal-matrix {
    display: grid;
    gap: var(--space-3);
}

.ds-modal-sample {
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    box-shadow: none;
    margin: 0 auto;
}

.ds-modal-sample strong { display: block; color: var(--color-ink); font-weight: 800; margin-bottom: 6px; }
.ds-modal-sample p { color: var(--color-text); font-size: 14px; margin: 0 0 var(--space-3); }
.ds-modal-sample--confirm { width: min(100%, 400px); }
.ds-modal-sample--edit    { width: min(100%, 640px); }
.ds-modal-sample--detail  { width: min(100%, 840px); }
.ds-util-mt-12 { margin-top: 12px; }
.ds-progress-fill--demo { width: 60%; }
.ds-text-right { text-align: right; }

/* 토스트 4종 */
.ds-toast-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-3);
}

.ds-ext-toast-dot--warning { background: var(--color-warning); }
.ds-ext-toast-dot--danger  { background: var(--color-danger); }
.ds-ext-toast-dot:not(.ds-ext-toast-dot--success):not(.ds-ext-toast-dot--warning):not(.ds-ext-toast-dot--danger) {
    background: var(--color-muted);
}

/* 선택 매트릭스 */
.ds-matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.ds-matrix-table th,
.ds-matrix-table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-line);
    text-align: center;
    vertical-align: middle;
    color: var(--color-text);
}

.ds-matrix-table thead th {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-muted);
    background: var(--color-surface-soft);
}

.ds-matrix-table tbody th {
    text-align: left;
    color: var(--color-ink);
    font-weight: 700;
}

/* UI 키트 선택형 컨트롤은 전역 input 필드 규칙과 분리해 기본 크기 기준으로 비교한다. */
.ui-kit-page .ds-ext-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

/* 체크박스와 라디오박스는 일반 브라우저 기본형에 가까운 크기로 되돌린다. */
.ui-kit-page input[type="checkbox"]:not(.toggle-switch__input):not(.toggle__input),
.ui-kit-page input[type="radio"] {
    all: revert;
    appearance: auto;
    -webkit-appearance: auto;
    width: 14px;
    min-width: 14px;
    height: 14px;
    min-height: 14px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    accent-color: var(--color-accent-strong);
    vertical-align: middle;
}

.ui-kit-page .ds-matrix-table input[type="checkbox"],
.ui-kit-page .ds-matrix-table input[type="radio"] {
    display: inline-block;
}

/* 토글 스위치 */
.ds-toggle {
    display: inline-block;
    position: relative;
    width: 34px;
    height: 20px;
    cursor: pointer;
}

.ds-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.ds-toggle span {
    position: absolute;
    inset: 0;
    background: var(--color-surface-soft);
    border-radius: var(--radius-pill);
    transition: background var(--duration-fast) var(--ease-standard);
}

.ds-toggle span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: none;
    transition: transform var(--duration-fast) var(--ease-standard);
}

.ds-toggle input:checked + span { background: var(--color-ink); }
.ds-toggle input:checked + span::after { transform: translateX(14px); }
.ds-toggle input:disabled + span { opacity: 0.4; cursor: not-allowed; }

/* 포커스 데모 */
.ds-focus-demo:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-ink), 0 0 0 5px rgba(17, 17, 17, 0.18);
}

.ds-focus-demo.ds-link:focus-visible {
    border-radius: var(--radius-xs);
}

/* 링크 상태 */
.ds-link {
    color: var(--color-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ds-link--hover { text-decoration: none; }
.ds-link--focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-ink), 0 0 0 5px rgba(17, 17, 17, 0.18);
    border-radius: var(--radius-xs);
}

.ds-link-states {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

/* 아이콘 갤러리 */
.ds-icon-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: var(--space-3);
}

.ds-icon-gallery figure {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    margin: 0;
}

.ds-icon-gallery svg {
    width: 24px;
    height: 24px;
    color: var(--color-ink);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ds-icon-gallery figcaption {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-muted);
}

/* 빈 상태 풀샷 */
.ds-empty-full {
    display: grid;
    justify-items: center;
    gap: var(--space-2);
    padding: var(--space-8) var(--space-4);
    text-align: center;
}

.ds-empty-full__icon {
    width: 24px;
    height: 24px;
    color: var(--color-muted);
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.ds-empty-full__title {
    color: var(--color-ink);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.ds-empty-full__desc {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0 0 var(--space-3);
}

/* 테이블 상호작용 */
.ds-interaction-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ds-interaction-table th,
.ds-interaction-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-line);
    color: var(--color-text);
    text-align: left;
}

.ds-interaction-table thead th {
    background: var(--color-surface-soft);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

.ds-interaction-table tbody tr:last-child td { border-bottom: none; }
.ds-interaction-table tr.is-hover    { background: var(--color-surface-soft); }
.ds-interaction-table tr.is-selected { background: var(--color-accent-soft); box-shadow: inset 2px 0 0 var(--color-ink); }

/* 반응형 미리보기 */
.ds-responsive-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.ds-responsive-frame {
    margin: 0;
    display: grid;
    gap: var(--space-2);
}

.ds-responsive-frame figcaption {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-muted);
}

.ds-responsive-mock {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: var(--color-bg-accent);
    padding: var(--space-3);
    display: grid;
    gap: var(--space-2);
    aspect-ratio: 4 / 3;
}

.ds-responsive-mock .mock-bar { height: 12px; background: var(--color-surface-soft); border-radius: var(--radius-xs); }
.ds-responsive-mock .mock-card,
.ds-responsive-mock .mock-row { height: 28px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm); }

.ds-responsive-mock--tablet { grid-template-columns: 60px 1fr; }
.ds-responsive-mock--tablet .mock-drawer { background: var(--color-ink); border-radius: var(--radius-sm); }
.ds-responsive-mock--tablet .mock-main { display: grid; gap: var(--space-2); }

.ds-responsive-mock--desktop { grid-template-columns: 48px 1fr; }
.ds-responsive-mock--desktop .mock-sidebar { background: var(--color-ink); border-radius: var(--radius-sm); }
.ds-responsive-mock--desktop .mock-main { display: grid; gap: var(--space-2); }
.ds-responsive-mock--desktop .mock-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
}
.ds-responsive-mock--desktop .mock-grid > div {
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
}

/* ============================================================
   Order detail — 상태별 버튼 계층 및 헤더 재배치
   - .btn-danger : 반려/수정 요청 같은 파괴적/주의 액션
   - .btn-ghost  : 승인, 직접 수정 등 보조 액션의 약한 버전
============================================================ */

.order-detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 22px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: none;
}

.order-detail-header__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.order-detail-header__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-detail-header__title h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0;
}

.order-detail-header__meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.45;
}

.order-detail-header__meta strong {
    color: var(--color-ink);
    font-weight: 700;
}

.order-detail-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* btn-primary 를 베이스로 쓰고 danger 모디파이어로 색상만 덮어쓰는 방식. */
.admin-page .btn-primary.btn-danger,
.admin-page .btn-outline.btn-danger {
    color: #fff;
    background: var(--color-danger);
    border: 1px solid var(--color-danger);
    box-shadow: none;
}

.admin-page .btn-primary.btn-danger:hover,
.admin-page .btn-outline.btn-danger:hover {
    background: #8f1c13;
    border-color: #8f1c13;
    transform: none;
}

/* ============================
   바이어 신청서
============================ */

.buyer-application-form {
    display: grid;
    gap: 18px;
}

.buyer-application-summary-cards {
    margin-bottom: 18px;
}

.buyer-application-section {
    display: grid;
    gap: 16px;
}

.buyer-application-subsection {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-line);
}

.buyer-application-subsection:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.buyer-application-subsection__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.buyer-application-subsection h4 {
    margin: 0;
    color: var(--color-ink);
    font-size: 0.95rem;
    font-weight: 800;
}

.buyer-application-grid {
    display: grid;
    gap: 14px;
}

.buyer-application-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.buyer-application-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.buyer-application-field {
    display: grid;
    gap: 6px;
}

.buyer-application-field--full {
    grid-column: 1 / -1;
}

.buyer-application-field span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.buyer-application-field input,
.buyer-application-field select,
.buyer-application-field textarea {
    width: 100%;
}

.buyer-bank-account-list {
    display: grid;
    gap: 12px;
}

.buyer-bank-account-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    background: #ffffff;
}

.buyer-bank-account-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.buyer-bank-account-card__head strong {
    color: var(--color-ink);
    font-size: 0.92rem;
    font-weight: 800;
}

.buyer-bank-account-card__check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-line);
    border-radius: 10px;
    background: #ffffff;
}

.buyer-bank-account-card__check input {
    width: auto;
}

.buyer-bank-account-card small {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .buyer-application-grid--2,
    .buyer-application-grid--3 {
        grid-template-columns: 1fr;
    }

    .buyer-application-subsection__head,
    .buyer-bank-account-card__head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 주문 직접 수정은 모달이 아니라 전용 워크스페이스에서 현재 선택 라인과 상품 추가 패널을 분리해 다룬다. */
.order-line-editor-page .main-content {
    padding-bottom: 144px;
}

.order-line-editor-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
    gap: 20px;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.order-line-editor-hero__content,
.order-line-editor-hero__meta {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.order-line-editor-hero__eyebrow {
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.order-line-editor-hero h1,
.order-line-editor-hero h2 {
    margin: 0;
    color: var(--color-ink);
}

.order-line-editor-hero h1 {
    font-size: clamp(1.6rem, 2vw, 2.05rem);
    line-height: 1.15;
}

.order-line-editor-hero p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.order-line-editor-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.order-line-editor-hero__meta {
    align-content: space-between;
    padding: 4px 0 4px 20px;
    border-left: 1px solid var(--color-line);
}

.order-line-editor-hero__meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-line-editor-hero__meta-line {
    font-size: 0.88rem;
}

.order-line-editor-hero__meta-line strong {
    color: var(--color-ink);
}

.order-line-editor-hero__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.order-line-editor-hero__summary > div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.order-line-editor-hero__summary span {
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.order-line-editor-hero__summary strong {
    color: var(--color-ink);
    font-size: 1rem;
    font-weight: 800;
}

.order-line-editor-summary-cards {
    margin-bottom: 18px;
}

.order-line-editor-status {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.order-line-editor-status[data-tone="danger"] {
    border-color: rgba(180, 35, 24, 0.22);
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.order-line-editor-status[data-tone="info"] {
    border-color: rgba(37, 99, 235, 0.18);
    background: var(--color-info-soft);
    color: #1d4ed8;
}

.order-line-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.order-line-editor-canvas,
.order-line-editor-picker__sticky {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.order-line-editor-picker__sticky {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 112px);
    overflow: hidden;
}

.order-line-editor-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.order-line-editor-section-head--stacked {
    display: grid;
}

.order-line-editor-section-head h3,
.order-line-editor-empty h4 {
    margin: 0;
    color: var(--color-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.order-line-editor-section-head p,
.order-line-editor-empty p {
    margin: 6px 0 0;
    color: var(--color-muted);
    line-height: 1.6;
    font-size: 0.84rem;
}

.order-line-editor-section-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.order-line-editor-empty {
    display: grid;
    gap: 12px;
    padding: 28px;
    border: 1px dashed var(--color-line);
    border-radius: var(--radius-lg);
    text-align: center;
    justify-items: center;
}

.order-line-editor-empty[hidden] {
    display: none !important;
}

.order-line-editor-selected-list,
.order-line-editor-picker-list {
    display: grid;
    gap: 14px;
}

.order-line-editor-picker-list {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.order-line-card,
.order-line-picker-card {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.order-line-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.order-line-card__head,
.order-line-picker-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.order-line-card__product,
.order-line-picker-card__body {
    display: flex;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.order-line-card__product-meta,
.order-line-picker-card__meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.order-line-card__code,
.order-line-picker-card__code {
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.order-line-card__name,
.order-line-picker-card__name {
    color: var(--color-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.order-line-card__detail,
.order-line-picker-card__detail,
.order-line-picker-card__sizes {
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.order-line-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.order-line-card__actions,
.order-line-picker-card__side {
    display: grid;
    gap: 10px;
    justify-items: end;
    flex: 0 0 auto;
}

.order-line-card__totals,
.order-line-picker-card__side span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.order-line-card__totals {
    display: grid;
    gap: 6px;
    text-align: right;
}

.order-line-card__totals strong,
.order-line-picker-card__side strong {
    color: var(--color-ink);
    font-weight: 800;
}

.order-line-card__sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 10px;
}

.order-line-size-field {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.order-line-size-field span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.order-line-size-field input {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    text-align: center;
    font-size: 0.96rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.order-line-size-field input:focus {
    border-color: var(--color-ink);
    outline: none;
    box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.06);
}

.order-line-card__hint {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #fff7ed;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}

.order-line-card__no-sizes,
.order-line-editor-picker-empty {
    padding: 14px;
    border: 1px dashed var(--color-line);
    border-radius: var(--radius-md);
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: center;
}

.order-line-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
    border: 1px solid var(--color-line);
    flex: 0 0 auto;
}

.order-line-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.order-line-editor-search-panel {
    gap: 12px;
}

.order-line-editor-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-ink);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.order-line-editor-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-strong);
}

.order-line-editor-category-bar {
    margin-bottom: 0;
}

.order-line-picker-card {
    padding: 14px;
}

.order-line-picker-card.is-selected {
    background: #f8fafc;
}

.order-line-picker-card__side {
    min-width: 92px;
    text-align: right;
}

.order-line-picker-card__side .btn-primary,
.order-line-picker-card__side .btn-outline {
    min-width: 96px;
}

.order-line-editor-footer {
    position: sticky;
    bottom: 0;
    z-index: 28;
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 0.85fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    margin-top: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
}

.order-line-editor-footer__note {
    display: grid;
    gap: 6px;
}

.order-line-editor-footer__note label {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.order-line-editor-footer__note input {
    min-height: 44px;
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.order-line-editor-footer__summary {
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.6;
}

.order-line-editor-footer__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.order-line-editor-footer__actions .btn-primary[disabled] {
    opacity: 0.58;
    cursor: wait;
}

@media (max-width: 720px) {
    .order-detail-header {
        flex-direction: column;
        align-items: stretch;
    }
    .order-detail-header__actions {
        justify-content: flex-end;
    }
    .admin-modal__dialog {
        max-height: calc(100vh - 24px);
    }
    .order-line-editor-page .main-content {
        padding-bottom: 112px;
    }
    .order-line-editor-hero,
    .order-line-editor-layout,
    .order-line-editor-footer {
        grid-template-columns: 1fr;
    }
    .order-line-editor-hero__meta {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--color-line);
        padding-top: 16px;
    }
    .order-line-editor-hero__summary {
        grid-template-columns: 1fr;
    }
    .order-line-editor-section-head,
    .order-line-card__head,
    .order-line-picker-card {
        flex-direction: column;
    }
    .order-line-card__actions,
    .order-line-picker-card__side {
        width: 100%;
        justify-items: stretch;
        text-align: left;
    }
    .order-line-card__totals {
        text-align: left;
    }
    .order-line-card__sizes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .order-line-editor-picker__sticky {
        position: static;
        max-height: none;
    }
}

@media (max-width: 1200px) {
    .order-line-editor-layout {
        grid-template-columns: 1fr;
    }

    .order-line-editor-picker {
        order: -1;
    }

    .order-line-editor-picker__sticky {
        position: static;
        max-height: none;
    }
}
