/* 환전검수관리 - 스타일시트 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

/* 로그인 페이지 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    color: #1a1a2e;
    font-size: 24px;
    margin-bottom: 5px;
}

.login-box .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a1a2e;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #16213e;
}

.error-message {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #fcc;
}

/* 관리자 레이아웃 */
.admin-wrap {
    display: flex;
    min-height: 100vh;
}

/* 상단 고정 헤더 */
.top-header {
    position: fixed;
    top: 0;
    left: 220px; /* 사이드바 너비 */
    right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    overflow-x: auto;
}

/* 사이트 상태 목록 */
.site-status-list {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

.site-status-item .site-name {
    font-weight: bold;
    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.site-status-item .site-name:hover {
    color: #1a1a2e;
    text-decoration: underline;
}

.site-status-item .site-counts {
    display: flex;
    gap: 8px;
}

.site-status-item .count-item {
    display: inline-block;
    min-width: 32px;
    padding: 4px 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

.site-status-item .count-1 {
    background: #e3f2fd;
    color: #1565c0;
}

.site-status-item .count-2 {
    background: #fff3e0;
    color: #ef6c00;
}

.site-status-item .count-3 {
    background: #ffebee;
    color: #c62828;
}

.no-sites {
    color: #888;
    font-size: 13px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right .user-info {
    font-weight: bold;
    color: #333;
}

.header-right .btn-logout {
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

.header-right .btn-logout:hover {
    background: #c82333;
}

/* 사이드바 */
.sidebar {
    width: 220px;
    background: #1a1a2e;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 101;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 16px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #888;
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-menu a.logout {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    color: #f88;
}

/* 메인 컨텐츠 */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 70px 20px 20px 20px; /* 상단 헤더 높이 + 여백 */
}

.page-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.page-header h1 {
    font-size: 22px;
    color: #333;
}

/* 카드 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

/* 테이블 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f9f9f9;
    font-weight: bold;
    color: #555;
}

.table tr:hover {
    background: #f9f9f9;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary {
    background: #1a1a2e;
    color: #fff;
}

.btn-primary:hover {
    background: #16213e;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* 폼 */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a2e;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* 상태 뱃지 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 유틸리티 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}
