@charset "utf-8";

/* ===== 기본 초기화 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 10px; }
body { font-family: 'Noto Sans KR', sans-serif; font-size: 1.4rem; color: #222; background: #f5f6f8; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ===== 로그인 페이지 ===== */
.sp-login-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #f5f6f8;
}
.sp-login-box {
    width: 46rem; background: #fff; border-radius: 1.2rem;
    box-shadow: 0 0.4rem 2rem rgba(0,0,0,0.08); padding: 5rem 4rem;
}
.sp-login-logo {
    text-align: center; margin-bottom: 3.6rem;
}
.sp-login-logo h1 {
    font-size: 2.2rem; font-weight: 700; line-height: 1.4; color: #111;
}
.sp-login-logo span {
    display: block; font-size: 1.4rem; font-weight: 400; color: #888; margin-top: 0.4rem;
}

.sp-form-group { margin-bottom: 1.6rem; }
.sp-form-group label {
    display: block; font-size: 1.3rem; font-weight: 500;
    color: #555; margin-bottom: 0.6rem;
}
.sp-input-wrap { position: relative; }
.sp-input-wrap input {
    width: 100%; height: 4.8rem; padding: 0 4.4rem 0 1.4rem;
    border: 0.1rem solid #ddd; border-radius: 0.6rem;
    font-size: 1.5rem; color: #222; outline: none; transition: border-color 0.2s;
}
.sp-input-wrap input:focus { border-color: #111; }
.sp-pw-toggle {
    position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 0.4rem;
    color: #aaa; display: flex; align-items: center;
}
.sp-pw-toggle:hover { color: #555; }
.sp-pw-toggle svg { width: 2rem; height: 2rem; }

.sp-error-msg {
    display: none; margin-top: 0.5rem;
    font-size: 1.2rem; color: #c0392b;
}
.sp-error-msg.show { display: block; }

.sp-submit-btn {
    width: 100%; height: 5.2rem; background: #111; border: none; border-radius: 0.6rem;
    color: #fff; font-size: 1.7rem; font-weight: 700; cursor: pointer;
    margin-top: 1rem; transition: background 0.2s;
}
.sp-submit-btn:hover { background: #333; }

/* ===== 비밀번호 변경 ===== */
.sp-pw-change-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #f5f6f8;
}
.sp-pw-change-box {
    width: 46rem; background: #fff; border-radius: 1.2rem;
    box-shadow: 0 0.4rem 2rem rgba(0,0,0,0.08); padding: 5rem 4rem;
}
.sp-pw-change-box h2 {
    font-size: 2rem; font-weight: 700; text-align: center;
    margin-bottom: 3rem; color: #111;
}
.sp-pw-hint {
    font-size: 1.2rem; color: #888; margin-top: 0.4rem;
}

/* ===== 공통 헤더 ===== */
.sp-header {
    position: sticky; top: 0; z-index: 100;
    background: #111; box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,0.15);
}
.sp-header-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; height: 6rem; padding: 0 2rem;
}
.sp-logo a {
    font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.3;
}
.sp-logo a span {
    font-size: 1.1rem; font-weight: 400; color: #aaa;
}
.sp-gnb { flex: 1; margin-left: 4rem; }
.sp-gnb ul { display: flex; gap: 0.4rem; list-style: none; }
.sp-gnb ul li a {
    display: block; padding: 0.6rem 1.6rem; color: #ccc;
    font-size: 1.4rem; border-radius: 0.4rem; transition: all 0.15s;
}
.sp-gnb ul li a:hover, .sp-gnb ul li.active a {
    color: #fff; background: rgba(255,255,255,0.12);
}
.sp-header-right { display: flex; align-items: center; gap: 1.6rem; }
.sp-company-name { color: #ddd; font-size: 1.3rem; }
.sp-logout-btn {
    color: #aaa; font-size: 1.3rem; padding: 0.4rem 1rem;
    border: 0.1rem solid #444; border-radius: 0.4rem; transition: all 0.15s;
}
.sp-logout-btn:hover { color: #fff; border-color: #888; }

/* ===== 컨텐츠 영역 ===== */
.sp-content { max-width: 1400px; margin: 0 auto; padding: 3rem 2rem 6rem; }
.sp-page-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 2.4rem; color: #111; }

/* ===== 검색 박스 ===== */
.sp-search-box {
    background: #fff; border-radius: 0.8rem; padding: 2rem 2.4rem;
    margin-bottom: 2rem; box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.06);
}
.sp-search-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
}
.sp-search-row label { font-size: 1.3rem; font-weight: 500; color: #555; white-space: nowrap; }
.sp-search-row select,
.sp-search-row input[type="text"],
.sp-search-row input[type="date"] {
    height: 3.6rem; padding: 0 1rem; border: 0.1rem solid #ddd;
    border-radius: 0.4rem; font-size: 1.3rem; color: #333; outline: none;
}
.sp-search-row select:focus,
.sp-search-row input:focus { border-color: #111; }
.sp-btn { 
    display: inline-flex; align-items: center; justify-content: center;
    height: 3.6rem; padding: 0 1.8rem; border-radius: 0.4rem;
    font-size: 1.3rem; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s;
}
.sp-btn-dark { background: #111; color: #fff; }
.sp-btn-dark:hover { background: #333; }
.sp-btn-gray { background: #f0f0f0; color: #444; border: 0.1rem solid #ddd; }
.sp-btn-gray:hover { background: #e0e0e0; }
.sp-btn-sm { height: 3rem; padding: 0 1.2rem; font-size: 1.2rem; }
.sp-btn-primary { background: #2563eb; color: #fff; }
.sp-btn-primary:hover { background: #1d4ed8; }

/* ===== 카드/테이블 ===== */
.sp-card {
    background: #fff; border-radius: 0.8rem;
    box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.06); overflow: hidden;
}
.sp-card-header {
    padding: 1.4rem 2rem; border-bottom: 0.1rem solid #f0f0f0;
    display: flex; align-items: center; justify-content: space-between;
}
.sp-card-header h3 { font-size: 1.5rem; font-weight: 600; }

.sp-table-wrap { overflow-x: auto; }
.sp-table {
    width: 100%; min-width: 900px; border-collapse: collapse;
}
.sp-table thead th {
    background: #f8f9fa; padding: 1.2rem 1rem;
    font-size: 1.3rem; font-weight: 500; color: #555;
    border-bottom: 0.1rem solid #e9ecef; white-space: nowrap;
    text-align: center;
}
.sp-table tbody td {
    padding: 1.2rem 1rem; font-size: 1.3rem; color: #333;
    border-bottom: 0.1rem solid #f0f0f0; text-align: center;
    vertical-align: middle;
}
.sp-table tbody tr:hover { background: #fafafa; }
.sp-table tbody tr:last-child td { border-bottom: none; }

/* ===== 배지/상태 ===== */
.sp-badge {
    display: inline-block; padding: 0.3rem 0.8rem;
    border-radius: 2rem; font-size: 1.1rem; font-weight: 500;
}
.sp-badge-blue   { background: #dbeafe; color: #1e40af; }
.sp-badge-green  { background: #dcfce7; color: #166534; }
.sp-badge-gray   { background: #f3f4f6; color: #6b7280; }
.sp-badge-red    { background: #fee2e2; color: #991b1b; }
.sp-badge-orange { background: #ffedd5; color: #9a3412; }

/* ===== 체크박스 품절 ===== */
.sp-check { width: 1.6rem; height: 1.6rem; cursor: pointer; }

/* ===== 빈 데이터 ===== */
.sp-empty {
    padding: 6rem 0; text-align: center;
    color: #aaa; font-size: 1.4rem;
}

/* ===== 페이지네이션 ===== */
.sp-paging {
    display: flex; align-items: center; justify-content: center;
    gap: 0.4rem; margin-top: 2.4rem;
}
.sp-paging a, .sp-paging span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.2rem; height: 3.2rem; border-radius: 0.4rem;
    font-size: 1.3rem; color: #555; border: 0.1rem solid #e0e0e0;
    background: #fff; transition: all 0.15s;
}
.sp-paging a:hover { background: #f5f5f5; }
.sp-paging span.on { background: #111; color: #fff; border-color: #111; }

/* ===== 상세/수정 폼 ===== */
.sp-view-wrap { max-width: 800px; }
.sp-view-table { width: 100%; border-collapse: collapse; }
.sp-view-table th {
    width: 14rem; padding: 1.4rem 1.6rem; background: #f8f9fa;
    font-size: 1.3rem; font-weight: 500; color: #555;
    border-top: 0.1rem solid #e9ecef; border-bottom: 0.1rem solid #e9ecef;
    text-align: left; white-space: nowrap;
}
.sp-view-table td {
    padding: 1.2rem 1.6rem; font-size: 1.4rem;
    border-top: 0.1rem solid #e9ecef; border-bottom: 0.1rem solid #e9ecef;
}
.sp-view-table td input[type="text"] {
    width: 100%; height: 3.8rem; padding: 0 1rem;
    border: 0.1rem solid #ddd; border-radius: 0.4rem; font-size: 1.4rem; outline: none;
}
.sp-view-table td input:focus { border-color: #111; }
.sp-form-btns {
    display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem;
}
.sp-notice-txt {
    font-size: 1.3rem; color: #888; margin-top: 2rem; text-align: center;
}
.sp-notice-txt.red { color: #c0392b; font-weight: 500; }

/* ===== 팝업 (주문 상품 상세) ===== */
.sp-popup-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 1000;
    align-items: center; justify-content: center;
}
.sp-popup-overlay.show { display: flex; }
.sp-popup-box {
    background: #fff; border-radius: 1rem; padding: 2.4rem;
    min-width: 36rem; max-width: 52rem; width: 90%;
    box-shadow: 0 0.8rem 3rem rgba(0,0,0,0.2);
}
.sp-popup-title {
    font-size: 1.6rem; font-weight: 700; margin-bottom: 1.6rem;
}
.sp-popup-item {
    display: flex; justify-content: space-between;
    padding: 0.8rem 0; border-bottom: 0.1rem solid #f0f0f0;
    font-size: 1.3rem;
}
.sp-popup-item:last-child { border-bottom: none; }
.sp-popup-close {
    display: block; margin-top: 1.6rem; width: 100%;
    height: 4rem; background: #111; color: #fff;
    border: none; border-radius: 0.6rem; font-size: 1.4rem; cursor: pointer;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    html { font-size: 9px; }
    .sp-gnb { display: none; }
    .sp-content { padding: 2rem 1.2rem 4rem; }
}
