@charset "UTF-8";
@import url(font.css);

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f4f6f9;
    color: #1c2733;
    font-family: 'Pretendard Variable', Pretendard, sans-serif;
}

.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 100px;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #071c38, #093e6d);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-logo {
    display: block;
    height: 40px;
    margin: 0 auto 14px;
}

.login-card h1 {
    font-size: 22px;
    margin: 0 0 6px;
    text-align: center;
    color: #093E6D;
}

.login-card p.desc {
    text-align: center;
    color: #667;
    font-size: 13px;
    margin: 0 0 28px;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="date"],
.field textarea,
.field select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d6dbe2;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.field input[type="file"] {
    width: 100%;
    font-size: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 8px;
    border: none;
    background: #093E6D;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.full { width: 100%; }
.btn.danger { background: #c0392b; }
.btn.ghost { background: transparent; color: #093E6D; border: 1px solid #093E6D; }
.btn.small { padding: 6px 12px; font-size: 12px; }

.error-box {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.error-box.show { display: block; }

.hint {
    font-size: 12px;
    color: #8a94a3;
    margin-top: 8px;
    line-height: 1.6;
}

.login-privacy-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.login-privacy-link a {
    font-size: 12px;
    color: #8a94a3;
    text-decoration: underline;
}
.login-privacy-link a:hover { color: #093E6D; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #093E6D;
}
.admin-header h1 { font-size: 20px; margin: 0; color: #093E6D; }
.admin-header-brand { display: flex; align-items: center; gap: 12px; }
.admin-logo { height: 32px; display: block; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.tab-btn {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid #093E6D;
    background: #fff;
    color: #093E6D;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.tab-btn.active { background: #093E6D; color: #fff; }

.panel { display: none; }
.panel.active { display: block; }

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.card h2 { font-size: 16px; margin: 0 0 18px; }

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table.list-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}
table.list-table th, table.list-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}
table.list-table th { color: #667; font-weight: 600; }

table.list-table th:first-child, table.list-table td:first-child {
    width: 110px;
    white-space: nowrap;
}
table.list-table th:nth-child(2), table.list-table td:nth-child(2) {
    width: auto;
    word-break: break-word;
}
table.list-table th:nth-child(3), table.list-table td:nth-child(3) {
    width: 70px;
    white-space: nowrap;
    vertical-align: middle;
}
table.list-table th:last-child, table.list-table td:last-child {
    width: 130px;
    white-space: nowrap;
    vertical-align: middle;
}

table.list-table.has-sort th:nth-child(3), table.list-table.has-sort td:nth-child(3) {
    width: 90px;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}
table.list-table.has-sort th:nth-child(4), table.list-table.has-sort td:nth-child(4) {
    width: 70px;
    white-space: nowrap;
    vertical-align: middle;
}

.row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}
.row-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.badge.on { background: #e6f4ea; color: #1e7d34; }
.badge.off { background: #f0f0f0; color: #888; }

.thumb-preview { width: 70px; height: 46px; object-fit: cover; border-radius: 4px; background:#eee; }

.gallery-images-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.gallery-images-list .img-item { position: relative; width: 100px; }
.gallery-images-list .img-item img { width: 100%; height: 70px; object-fit: cover; border-radius: 6px; }
.gallery-images-list .img-item .order-badge {
    position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,0.6); color:#fff;
    font-size: 11px; padding: 1px 6px; border-radius: 4px;
}
.gallery-images-list .img-item .img-actions { display:flex; gap:2px; margin-top:4px; }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1c2733;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s;
    pointer-events: none;
    z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #c0392b; }

/* 접속자 통계 탭 */
.stats-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.stats-box {
    background: #F3F7FC;
    border-radius: 8px;
    padding: 16px 24px;
    min-width: 220px;
}
.stats-box-label { font-size: 13px; color: #667; margin-bottom: 6px; }
.stats-box-value { font-size: 28px; font-weight: 700; color: #093E6D; }

.stats-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 190px;
    overflow-x: auto;
    padding: 4px 4px 0;
}
.stats-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
    flex-shrink: 0;
}
.stats-bar-pair {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 150px;
}
.stats-bar {
    width: 9px;
    min-height: 1px;
    border-radius: 2px 2px 0 0;
    background: #093E6D;
}
.stats-bar.unique { background: #5B9BD5; }
.stats-bar-label {
    font-size: 9.5px;
    color: #8a94a3;
    margin-top: 6px;
    white-space: nowrap;
}

.stats-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #667;
}
.stats-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}
.dot-visits { background: #093E6D; }
.dot-unique { background: #5B9BD5; }

@media (max-width: 768px) {
    .admin-wrap { padding: 20px 14px 60px; }
    .admin-header { flex-wrap: wrap; gap: 10px; }
    .admin-header h1 { font-size: 17px; }

    .tabs { flex-wrap: wrap; gap: 6px; }
    .tab-btn { padding: 8px 14px; font-size: 13px; }

    .card { padding: 16px; }

    .login-card { padding: 30px 22px; }
}

