/* static/css/style.css */

/* 1. 기본 설정 및 폰트 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
    --primary-color: #6c5ce7;       /* 메인 브랜드 컬러 (보라) */
    --bg-color: #f0f2f5;            /* 배경색 (연회색) */
    --card-bg: #ffffff;             /* 카드 배경 */
    --text-main: #2d3436;           /* 메인 텍스트 */
    --text-sub: #636e72;            /* 서브 텍스트 */
    
    /* 상태별 컬러 (파스텔 톤) */
    --status-success-bg: #e3f9e5;   /* 양호 배경 */
    --status-success-text: #219653; /* 양호 텍스트 */
    --status-warning-bg: #fff8e1;   /* 보통 배경 */
    --status-warning-text: #f2994a; /* 보통 텍스트 */
    --status-danger-bg: #ffebee;    /* 포화 배경 */
    --status-danger-text: #eb5757;  /* 포화 텍스트 */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 50px; /* 모바일 하단 여백 */
}

h1, h2 {
    font-weight: 700;
    color: var(--text-main);
}

/* 2. 카드 디자인 (공통) */
.booth-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 부드러운 그림자 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.booth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header-custom {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

/* 3. 상태 뱃지 디자인 */
.status-indicator {
    display: inline-block;
    width: 100%;
    padding: 15px 0;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 15px 0;
}

/* 상태별 클래스 매핑 (Flask에서 넘어오는 클래스와 연결) */
.bg-success .status-indicator {
    background-color: var(--status-success-bg);
    color: var(--status-success-text);
}
.bg-warning .status-indicator {
    background-color: var(--status-warning-bg);
    color: var(--status-warning-text);
}
.bg-danger .status-indicator {
    background-color: var(--status-danger-bg);
    color: var(--status-danger-text);
}

/* 헤더 색상 매핑 */
.header-success { background-color: #27ae60; color: white; }
.header-warning { background-color: #f39c12; color: white; }
.header-danger { background-color: #c0392b; color: white; }

/* 4. 관리자 페이지 전용 스타일 */
.admin-row {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* 모바일 대응 */
    gap: 10px;
}

.admin-booth-name {
    font-weight: 700;
    font-size: 1.1rem;
    flex-grow: 1;
    min-width: 150px; /* 모바일에서 이름이 너무 좁아지지 않게 */
    width: 200px
}

/* 입력 필드 스타일 */
.form-control-custom {
    border-radius: 10px;
    border: 2px solid #dfe6e9;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    outline: none;
}

/* 버튼 커스텀 */
.btn-save {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 10px 20px;
    border: none;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-save:hover { background-color: #5541d4; color: white; }

.btn-delete {
    border-radius: 10px;
    padding: 10px;
    color: #ff7675;
    border: 2px solid #ff7675;
    background: transparent;
    font-weight: bold;
}
.btn-delete:hover { background-color: #ff7675; color: white; }

/* 모바일 전용 반응형 트윅 */
@media (max-width: 576px) {
    .admin-row {
        flex-direction: column; /* 세로로 쌓기 */
        align-items: stretch;
        text-align: center;
    }
    .admin-booth-name { margin-bottom: 10px; }
    .input-group-area { margin-bottom: 10px; }
    
    .status-indicator { font-size: 1.3rem; padding: 12px 0; }
}