/* QR 코드 스캐너 및 출입 관리 스타일 */

/* 공통 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.header-container {
    background-color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-right: 20px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: background-color 0.2s;
}

.header-btn.home {
    background-color: #4285f4;
}

.header-btn.admin {
    background-color: #17a2b8;
}

.header-btn.scan {
    background-color: #28a745;
}

.header-btn.generate {
    background-color: #6c5ce7;
}

/* 스캐너 스타일 */
.scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.scanner-view {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 375px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#scanner-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#scanner-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
}

.scanner-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #6c757d;
}

.scanner-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
}

.scanner-controls {
    display: flex;
    gap: 10px;
}

.scanner-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: background-color 0.2s;
}

#start-scan-button {
    background-color: #28a745;
}

#start-scan-button:hover {
    background-color: #218838;
}

#stop-scan-button {
    background-color: #dc3545;
    display: none;
}

#stop-scan-button:hover {
    background-color: #c82333;
}

/* 로그 스타일 */
.log-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.log-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
}

.log-actions {
    display: flex;
    gap: 10px;
}

.log-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.log-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    width: 180px;
    color: #6c757d;
    font-size: 14px;
}

.log-name {
    flex: 1;
    font-weight: bold;
}

.log-action {
    width: 60px;
    text-align: center;
    background-color: #e8f5e9;
    color: #28a745;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
}

/* 회원 QR 생성 스타일 */
.search-section {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.member-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 15px;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.member-info {
    margin-bottom: 15px;
}

.member-name {
    font-size: 18px;
    margin: 0 0 5px;
    color: #333;
}

.member-phone {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 5px;
}

.member-id {
    font-size: 12px;
    color: #adb5bd;
    margin: 0;
}

.member-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.qr-code {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.member-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.download-btn {
    background-color: #4285f4;
}

.download-btn:hover {
    background-color: #3367d6;
}

.print-btn {
    background-color: #6c757d;
}

.print-btn:hover {
    background-color: #5a6268;
}

/* 메시지 스타일 */
#message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-title {
        margin-bottom: 10px;
    }
    
    .scanner-view {
        height: 300px;
    }
    
    .log-item {
        flex-direction: column;
    }
    
    .log-time {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .log-name {
        margin-bottom: 5px;
    }
    
    .log-action {
        width: auto;
        align-self: flex-start;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
}