@charset "UTF-8";

/* PlayWeb 공통 스타일 (PC 1920x1080 기준) */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-sub: #8a8a8e;
    --line: #e4e4e7;
    --hover: #f4f4f5;
    --primary: #1a73f0;
    --primary-soft: #eef4fe;
    --danger: #e5243b;
    --sat: #1a73f0;
    --sun: #e5243b;
    --today: #f2a31b;
    --header-h: 64px;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

a, a:hover { color: inherit; text-decoration: none; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- 헤더 ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }

.gnb { display: flex; gap: 4px; }
.gnb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 15px;
    color: var(--text-sub);
}
.gnb a:hover { background: var(--hover); color: var(--text); }
.gnb a.active { background: var(--text); color: #fff; font-weight: 600; }

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}
.header-right .user,
.header-right .logout { color: var(--text-sub); }
.header-right .logout:hover { color: var(--text); text-decoration: underline; }

/* ---------- 버튼 ---------- */
.btn-pw {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.btn-pw:hover { background: var(--hover); color: var(--text); }
.btn-pw.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-pw.primary:hover { filter: brightness(1.08); color: #fff; }
.btn-pw.dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn-pw.dark:hover { background: #333; color: #fff; }
.btn-pw.danger { color: var(--danger); }
.btn-pw.danger:hover { background: #fdecee; color: var(--danger); }
.btn-pw.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-pw.lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: 24px; }

/* 헤더의 기록 버튼 */
.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    border-radius: 19px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.primary-btn:hover { filter: brightness(1.08); color: #fff; }

/* ---------- 페이지 골격 ---------- */
.page {
    padding: 24px 32px 40px;
}
.page.narrow { max-width: 1200px; margin: 0 auto; }

.page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.page-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.page-head .spacer { margin-left: auto; }

.box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}
.box-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.box-title { margin: 0; font-size: 17px; font-weight: 700; }
.badge-count {
    display: inline-block;
    min-width: 24px;
    padding: 0 8px;
    border-radius: 11px;
    background: var(--hover);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}
.muted { color: var(--text-sub); }

/* ---------- 폼 ---------- */
.field {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 115, 240, 0.15); }
.field[readonly] { background: var(--surface); cursor: pointer; }
textarea.field { height: auto; min-height: 160px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
select.field { padding-right: 36px; appearance: none; -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
select.field.auto { width: auto; }

.search-field {
    padding-left: 38px;
    background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
    border-color: transparent;
}
.search-field:focus { background-color: var(--surface); }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .field { flex: 1; min-width: 0; }

/* ---------- 표 ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f2;
}
.data-table tbody tr:hover td { background: #fafafa; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .rank { width: 56px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.data-table tr.top .rank { color: var(--primary); font-weight: 700; }
.data-table .empty { padding: 40px 12px; color: var(--text-sub); text-align: center; }

.result-summary { margin: 16px 0 8px; font-size: 14px; color: var(--text-sub); }
.result-summary strong { color: var(--text); font-size: 18px; }

/* ---------- jQuery UI 자동완성/달력 톤 맞추기 ---------- */
.ui-widget { font-family: inherit; font-size: 14px; }
.ui-autocomplete {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line) !important;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.ui-menu .ui-menu-item-wrapper { padding: 6px 10px; border-radius: 6px; border: 0 !important; }
.ui-menu .ui-state-active { background: var(--primary-soft) !important; color: var(--text) !important; margin: 0 !important; }
.ui-datepicker { padding: 10px; border-radius: 12px; border: 1px solid var(--line) !important; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }
.ui-datepicker .ui-datepicker-header { border: 0; background: none; font-weight: 700; }
.ui-datepicker td a.ui-state-default { border: 0; background: none; text-align: center; border-radius: 6px; }
.ui-datepicker td a.ui-state-highlight { background: #fff4e0; color: var(--text); }
.ui-datepicker td a.ui-state-active { background: var(--primary); color: #fff; }

/* 1600px 미만(노트북 등)에서는 여백을 조금 줄임 */
@media (max-width: 1599px) {
    .header { padding: 0 20px; }
    .page { padding: 20px 20px 32px; }
}
