/* [기본 스타일] */
* {
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #f5f5f7;
    margin: 0;
    padding: 20px;
    color: #1d1d1f;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: hidden;
    width: 100vw;
}

/* 모바일 패딩 조정 */
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }
}

/* 대시보드 컨테이너: 초기에는 숨김 (인증 체크 후 표시) */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 40px;
}

@media screen and (max-width: 480px) {
    .dashboard-container {
        gap: 8px;
    }
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 100;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #555;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px !important;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: all 0.2s ease;
    height: 38px;
    /* Standardize PC height */
}

.btn-back:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #333;
}

.btn-back svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.date-nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    height: 38px;
    /* Force height match */
}

#yearDisplay {
    font-size: 1em !important;
    /* Reduce from 1.2em */
    font-weight: 600 !important;
}

.nav-arrow-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.nav-arrow-btn:hover {
    background-color: #f2f2f7;
    color: #0071e3;
}

.nav-arrow-btn svg {
    width: 20px;
    height: 20px;
}

/* 모바일 내비게이션 조정 */
@media screen and (max-width: 480px) {
    .date-nav-container {
        padding: 4px 8px;
        gap: 4px;
    }

    .date-clickable {
        font-size: 1em;
        padding: 4px;
    }

    .nav-arrow-btn {
        width: 28px;
        height: 28px;
    }

    .nav-arrow-btn svg {
        width: 18px;
        height: 18px;
    }
}

.picker-popup {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    z-index: 1000;
    width: 200px;
}

.picker-popup.show {
    display: grid;
}

.picker-item {
    padding: 8px 0;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #1d1d1f;
    transition: all 0.1s;
    font-size: 0.95em;
}

.picker-item:hover {
    background-color: #f2f2f7;
}

.picker-item.selected {
    background-color: #0071e3;
    color: white;
}

.btn {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-back {
    background-color: white;
    color: #1d1d1f;
    text-decoration: none;
    border: 1px solid #d2d2d7;
}

.btn-primary {
    background-color: #0071e3;
    color: white;
}

.btn-warning {
    background-color: #ff9500;
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.85em;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    width: 100%;
    transition: transform 0.2s;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 모바일 카드 패딩 조정 */
@media screen and (max-width: 768px) {
    .card {
        padding: 15px;
        border-radius: 12px;
    }

    /* Mobile Button Optimization */
    .btn-back {
        padding: 6px 12px;
        font-size: 0.85em;
    }

    .btn-back svg {
        width: 16px;
        height: 16px;
    }

    /* Goal Bar Optimization */
    .goal-progress-container {
        width: 100% !important;
        flex: none !important;
        margin-top: 10px;
    }

    .top-stats-row {
        flex-direction: column;
    }
}


.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
}

.card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 모바일 폰트 사이즈 조정 */
@media screen and (max-width: 480px) {
    .card-title {
        font-size: 1em;
    }
}

.main-title {
    display: none !important;
}

/* [수정] 유연한 그리드 적용 (auto-fit) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media screen and (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }

    .summary-item {
        padding: 10px 4px;
    }

    .sum-value {
        font-size: 1.1em !important;
    }
}

@media screen and (max-width: 850px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media screen and (max-width: 480px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .sum-content-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .sum-label {
        flex-direction: column;
        gap: 2px;
        align-items: center;
        margin-bottom: 4px;
        text-align: center;
        display: flex;
    }

    .sum-value {
        text-align: center;
    }

    .room-status-item .sum-content-left {
        align-items: stretch;
    }

    .room-status-item .sum-label {
        flex-direction: row;
        justify-content: center !important;
        align-items: center;
        gap: 8px;
        text-align: center !important;
        display: flex;
    }

    .room-status-item .room-status-legends {
        justify-content: center !important;
    }

    /* 객실 현황 차트 영역 중앙 정렬 */
    .room-status-item div[style*="height:25px"] {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    #vacancyStackedChart {
        margin: 0 auto !important;
        display: block;
    }

    .room-status-item {
        grid-column: span 3;
    }

    /* 채널 인사이트 2열 배치 */
    /* 채널 인사이트: 모바일에서도 리스트형 유지 (옆에 그래프가 있으므로) */
    .channel-insights {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .insight-item {
        flex-direction: column;
        padding: 8px;
        text-align: center;
        gap: 4px;
    }

    .insight-icon {
        font-size: 1.2em;
    }

    .insight-label {
        font-size: 0.7em;
    }

    .insight-value {
        font-size: 0.9em;
    }
}

.summary-item {
    background: white;
    padding: 15px 20px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-status-item {
    flex-direction: column;
    align-items: stretch;
}

.room-status-item .sum-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}

@media screen and (max-width: 1100px) {
    .room-status-item {
        padding: 10px 5px;
    }

    .room-status-item .room-status-legends {
        gap: 5px !important;
        font-size: 0.8em !important;
    }
}

@media screen and (max-width: 768px) {
    .summary-item {
        padding: 10px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }

    .summary-item .sum-content-left {
        text-align: center;
    }

    .room-status-item {
        padding: 10px;
        align-items: stretch;
        text-align: left;
    }

    .room-status-item .sum-content-left {
        text-align: left;
    }

    .room-status-item .sum-label {
        text-align: left;
    }
}

.sum-content-left {
    text-align: left;
}

.sum-label {
    font-size: 0.9em;
    color: #86868b;
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sum-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #1d1d1f;
    display: block;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

@media screen and (max-width: 1200px) {
    .sum-value {
        font-size: 1.1em;
    }
}

@media screen and (max-width: 480px) {
    .sum-value {
        font-size: 0.9em;
    }

    .sum-label {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
}

.val-money {
    color: #0071e3;
}

.val-net {
    color: #34c759;
}

.trend-badge {
    padding: 1px 6px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

@media screen and (max-width: 768px) {
    .trend-badge {
        align-self: flex-start;
    }
}

.trend-up {
    background-color: #e6f7ed;
    color: #34c759;
}

.trend-down {
    background-color: #fff0f0;
    color: #c0392b;
}

.trend-flat {
    background-color: #f2f2f7;
    color: #86868b;
}

/* [수정] 채널 박스 그리드 모바일 대응 */
.channel-box-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    height: 100%;
    align-items: center;
}

@media screen and (max-width: 768px) {
    .channel-box-grid {
        /* PC처럼 좌우 배치 유지 (차트/리스트) */
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

.channel-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.insight-item {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-icon {
    font-size: 1.5em;
}

.insight-text {
    display: flex;
    flex-direction: column;
}

.insight-label {
    font-size: 0.8em;
    color: #86868b;
    font-weight: 500;
}

.insight-value {
    font-size: 1.1em;
    font-weight: 800;
    color: #1d1d1f;
}

/* [수정] 목표 카드 래퍼 모바일 대응 */
.goal-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

@media screen and (max-width: 768px) {
    .goal-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media screen and (max-width: 480px) {
    .goal-wrapper {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 5px;
        gap: 6px;
    }
}

.month-goal-card,
.year-goal-card {
    padding: 15px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.month-goal-card {
    background-color: #f0f8ff;
    border: 1px solid #d6eaf8;
}

.year-goal-card {
    background-color: #fffbf0;
    border: 1px solid #ffeebb;
}

/* 모바일 목표 카드 레이아웃 조정 */
@media screen and (max-width: 480px) {

    .month-goal-card,
    .year-goal-card {
        flex-direction: column;
        align-items: center;
        padding: 8px 6px;
        gap: 4px;
        text-align: center;
    }

    .yg-left,
    .yg-right {
        width: 100%;
        justify-content: center;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .yg-left {
        font-size: 0.85em;
    }

    .yg-left div {
        font-size: 1.05em !important;
    }

    .yg-center {
        width: 100%;
        min-width: 0 !important;
        margin: 2px 0;
    }

    .yg-right {
        text-align: center;
        font-size: 0.8em;
    }

    .yg-right br {
        display: none;
    }

    .yg-input {
        width: 60px !important;
        font-size: 0.8em;
        padding: 2px 4px;
    }

    .month-goal-card .yg-left span:nth-child(2),
    .year-goal-card .yg-left span:nth-child(2) {
        font-size: 0.8em;
    }
}

.yg-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yg-input {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-weight: bold;
    width: 110px;
    text-align: right;
    font-size: 1em;
}

.yg-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 150px;
}

.yg-right {
    text-align: right;
    min-width: 100px;
}

.progress-bar-bg {
    width: 100%;
    height: 18px;
    background-color: #ecf0f1;
    border-radius: 9px;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    width: 0%;
    transition: width 1s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10px;
    border-radius: 9px;
}

.progress-text {
    color: #555;
    font-size: 0.75em;
    font-weight: 800;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

/* [수정] 상단 차트 그리드 유연하게 변경 */
.top-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

@media screen and (max-width: 768px) {
    .top-charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* [수정] 차트 래퍼 높이 모바일 대응 */
.mini-chart-wrapper {
    position: relative;
    height: 180px;
    width: 100%;
    overflow: hidden;
    flex-grow: 1;
}

@media screen and (max-width: 480px) {
    .mini-chart-wrapper {
        height: 160px;
    }
}

.mini-chart-wrapper canvas {
    max-width: 100%;
}

.visitor-stat-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    height: 100%;
    padding: 5px 0;
}

.v-stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s;
    min-width: 0;
    overflow: hidden;
}

.v-stat-item:hover {
    background-color: #fafafa;
}

.v-header {
    margin-bottom: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.v-icon {
    font-size: 1.4em;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    flex-shrink: 0;
}

.v-label {
    font-size: 0.85em;
    color: #555;
    font-weight: 700;
    margin-bottom: 1px;
    white-space: nowrap;
}

.v-percent {
    font-size: 1.1em;
    font-weight: 900;
    color: #2c3e50;
    line-height: 1.1;
}

.v-count {
    font-size: 0.7em;
    color: #999;
    margin-bottom: 2px;
}

/* 모바일 방문객 통계 폰트 조정 */
@media screen and (max-width: 480px) {
    .v-icon {
        width: 24px;
        height: 24px;
        font-size: 1.2em;
    }

    .v-label {
        font-size: 0.8em;
    }

    .v-percent {
        font-size: 1em;
    }
}

.vis-header-control {
    display: flex;
    gap: 0;
    background: #f1f2f6;
    border-radius: 6px;
    padding: 2px;
}

.vis-global-btn {
    border: none;
    background: transparent;
    font-size: 0.75em;
    font-weight: 700;
    color: #7f8c8d;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.vis-global-btn.active {
    background: white;
    color: #3498db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chart-container-inner {
    width: 100%;
    margin-top: 2px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.v-chart-area {
    width: 100%;
    height: 90px;
    animation: fadeIn 0.3s;
}

@media screen and (max-width: 480px) {
    .v-chart-area {
        height: 70px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* [수정] 하단 2분할 그리드 모바일 대응 */
.chart-grid-half {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

@media screen and (max-width: 768px) {
    .chart-grid-half {
        grid-template-columns: 1fr;
    }
}

.chart-wrapper.full {
    height: 280px;
    overflow: hidden;
}

@media screen and (max-width: 480px) {
    .chart-wrapper.full {
        height: 220px;
    }
}

/* [수정] AI 전략 그리드 모바일 대응 */
.ai-strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

@media screen and (max-width: 768px) {
    .ai-strategy-grid {
        grid-template-columns: 1fr;
    }
}

.ai-box {
    padding: 20px;
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media screen and (max-width: 768px) {
    .ai-box {
        padding: 15px;
    }
}

.price-rec-box {
    background-color: #f0f8ff;
    border-left: 4px solid #3498db;
    overflow-y: auto;
    max-height: none;
}

.sales-strategy-box {
    background-color: #f3e5f5;
    border-left: 4px solid #9b59b6;
    overflow-y: auto;
}

.rec-text {
    font-size: 1em;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.5;
}

.rec-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.rec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    text-align: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.rec-table th {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px 4px;
    font-weight: 800;
    white-space: nowrap;
}

.rec-table td {
    border-bottom: 1px solid #f1f2f6;
    padding: 10px 4px;
    color: #2c3e50;
    font-weight: 600;
}

.rec-table .room-name {
    text-align: center;
    font-weight: 800;
    color: #555;
    background-color: #fafafa;
}

.price-sat {
    color: #c0392b;
    font-weight: 900;
    background-color: #fff5f5;
}

.price-fri {
    color: #d35400;
}

.price-sun {
    color: #2980b9;
}

.strategy-title {
    margin-bottom: 25px;
    font-size: 1.1em;
    font-weight: 800;
    color: #2c3e50;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    display: block;
}

.season-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: 15px;
}

.season-item {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 4px solid #9b59b6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.season-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.badge-early {
    background: #ab47bc;
}

.badge-mid {
    background: #7e57c2;
}

.badge-late {
    background: #5c6bc0;
}

.season-content {
    font-size: 0.95em;
    color: #333;
    line-height: 1.4;
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.season-detail {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
    display: block;
}

.data-table-wrapper {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #ecf0f1;
    overflow: visible;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.9em;
}

.data-table th {
    background-color: #f8f9fa;
    color: #576574;
    font-weight: 800;
}

@media screen and (max-width: 480px) {

    .data-table th,
    .data-table td {
        padding: 10px 5px;
        font-size: 0.85em;
    }
}

.dt-week {
    color: #555;
}

.dt-fri {
    color: #e67e22;
}

.dt-sat {
    color: #c0392b;
    font-weight: bold;
}

.dt-sun {
    color: #2980b9;
}

/* [수정] 전략 타일 그리드 모바일 대응 */
.strategy-tile-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
}

@media screen and (max-width: 1200px) {
    .strategy-tile-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .strategy-tile-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.strategy-tile {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.strategy-tile.active {
    border: 1.5px solid #3498db;
    background: #eef7fd;
}

.tile-month {
    display: block;
    font-size: 0.9em;
    font-weight: 800;
    color: #555;
}

.tile-goal {
    display: block;
    font-size: 0.8em;
    color: #2980b9;
}

.tile-actual {
    display: block;
    font-size: 0.95em;
    font-weight: 800;
    color: #2c3e50;
}

@media screen and (max-width: 480px) {

    .tile-goal,
    .tile-actual {
        font-size: 0.85em;
    }
}

.tile-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 700;
    color: white;
    margin-top: 4px;
}

.bg-green {
    background: #27ae60;
}

.bg-orange {
    background: #f39c12;
}

.bg-red {
    background: #c0392b;
}

.bg-gray {
    background: #95a5a6;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================ 
   모바일 최우선 순위 레이아웃 통합 수정 (Final Priority)
   ============================================================ */
@media screen and (max-width: 480px) {

    /* 1. 객실 현황 헤더 중앙 정렬 고정 */
    .room-status-item .sum-label {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 4px !important;
    }

    /* 2. 채널별 핵심인사이트 2열(반반) 배치 */
    /* 2. 채널별 핵심인사이트: PC처럼 좌우 배치 유지 (강제) */
    .channel-box-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        align-items: center !important;
        height: auto !important;
    }

    .channel-insights {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    .insight-item {
        flex-direction: column !important;
        padding: 8px 4px !important;
        text-align: center !important;
        gap: 4px !important;
        min-width: 0 !important;
        background: #f9f9f9 !important;
        border-radius: 12px !important;
        flex: 1 !important;
    }

    .insight-icon {
        font-size: 1.2em !important;
        margin: 0 !important;
    }

    .insight-text {
        align-items: center !important;
    }

    .insight-label {
        font-size: 0.65em !important;
        white-space: nowrap !important;
    }

    .insight-value {
        font-size: 0.85em !important;
        word-break: break-all !important;
    }
}

/* Final Mobile Layout Fixes from 3rd Feedback */
@media screen and (max-width: 600px) {

    /* 1. Buttons one line */
    .btn-back {
        white-space: nowrap !important;
        padding: 5px 10px !important;
        font-size: 0.8em !important;
    }

    .btn-back svg {
        width: 14px !important;
        height: 14px !important;
    }

    .nav-header {
        flex-wrap: nowrap !important;
        gap: 5px !important;
    }

    /* 2. Yearly Goal Box Full Width */
    .year-goal-card {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .yg-left,
    .yg-center,
    .yg-right {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .yg-center {
        margin: 0 !important;
    }

    .goal-progress-container,
    .progress-bar-bg {
        width: 100% !important;
    }
}

/* Mobile Layout & Spacing Tightening */
@media screen and (max-width: 600px) {

    /* Reduce Vertical Gaps */
    .dashboard-container {
        gap: 8px !important;
        /* Reduce main gap */
    }

    .nav-header {
        margin-bottom: 5px !important;
        /* Reduce header gap */
    }

    .goal-wrapper {
        margin-bottom: 5px !important;
        /* Reverted display:block to restore grid for Monthly Dashboard */
    }

    /* Force full width ONLY for Yearly Dashboard wrapper */
    .goal-wrapper.yearly-wrapper {
        display: block !important;
    }

    .year-goal-card {
        /* width: 100% was causing global override in Monthly. Rely on grid/flex. */
        margin: 0 !important;
    }

    /* Ensure summary grid is close */
    .summary-grid {
        margin-top: 0 !important;
    }
}

/* Broader trigger for Yearly Goal Card layout */
@media screen and (max-width: 900px) {
    .year-goal-card {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .yg-left,
    .yg-center,
    .yg-right {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .yg-center {
        margin: 0 !important;
    }

    .goal-progress-container,
    .progress-bar-bg {
        width: 100% !important;
    }
}

/* Mobile Nav Container Optimization */
@media screen and (max-width: 600px) {

    /* Standardize Mobile Height */
    .btn-back {
        height: 32px !important;
        padding: 0 10px !important;
        /* Adjust padding for fixed height */
        display: inline-flex !important;
        align-items: center !important;
    }

    .date-nav-container {
        padding: 0 8px !important;
        /* Remove vertical padding, rely on flex centering */
        height: 32px !important;
    }

    .date-nav-container span {
        font-size: 0.9em !important;
    }

    .nav-arrow-btn {
        width: 24px !important;
        height: 24px !important;
        padding: 0 !important;
    }

    .nav-arrow-btn svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Explicit Gauge Rounding Classes */
.gauge-first {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.gauge-last {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    flex: 1 !important;
    width: auto !important;
    /* Override inline width percent */
}