:root {
    /* 기본 색상 시스템 (라이트 모드) */
    --primary-color: #ff3366;
    --primary-hover: #e61e4d;
    --accent-color: #319795;
    --background-color: #ffffff;
    --surface-color: rgba(255, 255, 255, 0.95);
    --text-color: #333;
    --text-secondary: #666;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #fff;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #e53e3e;
    --disabled-color: #e2e2e2;
    
    /* 배경 그라데이션 */
    --bg-gradient: linear-gradient(-45deg, #f0f8ff, #e6f4ff, #d4e8ff, #eef6ff);
    
    /* 그림자 효과 */
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --button-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* 애니메이션 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* 간격 */
    --spacing-xs: 0.5em;
    --spacing-sm: 1em;
    --spacing-md: 1.5em;
    --spacing-lg: 2.5em;
    
    /* 화재 모니터링 전용 색상 */
    --emergency-color: #e53e3e;
    --emergency-bg: rgba(229, 62, 62, 0.1);
    --normal-bg: rgba(72, 187, 120, 0.05);
    --normal-color: #48bb78;
}

/* 기본 스타일 */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    color: var(--text-color);
}

/* 애니메이션 */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 로그인 정보 영역 가시성 관련 스타일 */
#loginInfoArea.visible,
#loginInfoArea.visible .login-success,
#loginInfoArea.visible .user-info,
#loginInfoArea.visible .action-buttons {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

.action-buttons.visible {
    display: flex !important;
}

/* Container Styles */
.container {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    width: 400px;
    text-align: center;
    margin-top: var(--spacing-sm);
    position: relative;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    color: var(--text-color);
}

.container.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

/* Typography */
.container h1 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
    font-weight: 600;
    text-align: left;
    padding-left: var(--spacing-xs);
}

.container h2 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    font-weight: 400;
    text-align: left;
    padding-left: var(--spacing-xs);
}

/* 로그인 정보 스타일 */
#userInfo strong {
    color: #2c7a7b;
}

#userInfo span {
    color: #333333;
}

#userInfo div {
    margin-top: 12px;
    color: #e53e3e;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-sm);
}


.links, .back-link {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    text-align: left;
    padding-left: var(--spacing-xs);
}

.links a, .back-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.links a:hover, .back-link:hover {
    color: var(--primary-hover);
}

/* Login Info Area */
#loginInfoArea {
    padding: var(--spacing-md) 0;
}

/* Buttons */
#logoutButton {
    margin-top: var(--spacing-sm);
    padding: 8px 12px;
    background: var(--accent-color);
    color: var(--background-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

#logoutButton:hover {
    transform: scale(1.05);
}

#logoutButton:active {
    transform: scale(0.95);
}

/* Layout */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    max-width: 100%;
    margin: 0;
    min-height: calc(100vh - 60px); /* 푸터 높이만큼 제외 */
}

/* Footer */
footer {
    width: 100%;
    background: var(--container-bg);
    padding: 1rem 0;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 -2px 10px var(--shadow-color);
}

/* 푸터 위의 컨텐츠에 마진 추가 */
.login-container {
    margin-bottom: 80px; /* 푸터 높이 + 여유 공간 */
}

#dashboard-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}


.dashboard-card {
    height: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.dashboard-card-header {
    background: #f8f9fa;
}

.dashboard-card-content {
    background: #fff;
}

/* 카드 내부 차트나 그리드를 위한 컨테이너 */
.card-widget-container {
    width: 100%;
    height: 100%;
    min-height: 200px;
} 

.dashboard-card > div:last-child {
    height: calc(100% - 40px); /* 헤더 높이(40px)를 제외한 나머지 공간 */
    overflow: auto;
}

#equipment-status-chart,
#lighting-status,
#fire-history,
#overheat-history,
#equipment-failure {
    height: calc(100% - 40px); /* 헤더 높이(40px)를 제외한 나머지 공간 */
}

/* 모바일 대응 */
@media (max-width: 900px) {
    .dashboard-card {
        height: 550px;
    }
}


h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    padding-left: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

h3.equipment, h3.lighting {
    justify-content: space-between;
}

h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    border-radius: 2px;
    background: var(--accent-color);
    transition: width 0.2s ease;
}

h3:hover::before {
    width: 8px;
}

h3 i {
    margin-right: 10px;
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

h3:hover i {
    transform: scale(1.1);
}

h3.equipment::before { background: var(--success-color); }
h3.alarm::before { background: var(--warning-color); }
h3.lighting::before { background: var(--accent-color); }
h3.fire::before { background: var(--error-color); }
h3.overheat::before { background: linear-gradient(180deg, #ed8936, #f6ad55); }
h3.failure::before { background: var(--warning-color); }

.alarm-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.alarm-item.fire {
    background: linear-gradient(135deg, #e53e3e, #f56565);
    color: #ffffff;
    border: 1px solid rgba(229, 62, 62, 0.5);
}

.alarm-item.overheat {
    background: linear-gradient(135deg, #ed8936, #f6ad55);
    color: #1a202c;
    border: 1px solid rgba(237, 137, 54, 0.5);
}

.alarm-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alarm-item b {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.alarm-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.alarm-item.fire.pulse {
    animation: pulse 2s infinite;
}

.total-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.total-label {
    font-size: 0.8rem;
    color: #718096;
    margin-left: 5px;
}

.dashboard-user-info {
    font-size: 0.9rem;
    color: #333;
    margin-right: 10px;
    font-weight: 500;
}

/* ======================================= */
/* 화재 모니터링 페이지 스타일 */
/* ======================================= */

#main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px 20px;
    max-width: 1600px;
    margin: 0 auto;
    height: calc(100vh - 140px); /* 화면 높이에 맞게 조정 (헤더 + 푸터 고려) */
    min-height: 500px;
    box-sizing: border-box;
}

#gridContainer {
    flex: 2;
    min-width: 350px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

#mapContainer {
    flex: 3;
    min-width: 450px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

#alarmList, #FireAlarmList, #nonFireAlarmList {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin-bottom: 0;
    overflow: auto;
}

#FireAlarmList, #nonFireAlarmList {
    flex: 5;
    height: 50%;
}

#apartmentMap {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.building-label {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
    user-select: none;
}

.fire-signal {
    position: absolute;
    width: 35px;
    height: 35px;
    background: linear-gradient(to bottom, #ff4500, #8b0000);
    border-radius: 50%;
    animation: pulse 1.5s infinite, intermittentShake 0.5s infinite;
    z-index: 20;
    box-shadow: 0 0 20px rgba(255, 50, 0, 0.9);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: visible;
    transform-origin: center center;
}

.fire-signal::before {
    content: "\f06d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 
        0 0 5px #ff0, 
        0 0 10px #ff0, 
        0 0 15px #ff6600;
    animation: flameFlicker 0.6s infinite alternate;
}

/* 화재 신호 주변에 파동 효과 추가 */
.fire-signal::after {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid rgba(255, 50, 0, 0.8);
    border-radius: 50%;
    animation: waveExpand 2s infinite;
    z-index: -1;
    pointer-events: none;
}

/* 두 번째 파동 효과 (좀 더 느린 속도) */
.fire-signal .fire-wave {
    position: absolute;
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
    border: 3px solid rgba(255, 165, 0, 0.7);
    border-radius: 50%;
    animation: waveExpand 3s infinite 0.5s;
    z-index: -2;
}

/* 화재 발생 지점 주변 효과 */
.fire-area-effect {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(
        circle, 
        rgba(255,80,0,0.4) 0%, 
        rgba(255,165,0,0.3) 30%, 
        rgba(255,0,0,0) 70%
    );
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    animation: breathingEffect 4s infinite;
    z-index: 5;
    pointer-events: none;
}

/* 긴급 불꽃 스파크 */
.fire-signal .spark {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #ffcc00;
    border-radius: 50%;
    opacity: 0.9;
    animation: sparkFly 1.5s infinite;
    z-index: 25;
    box-shadow: 0 0 5px 2px rgba(255, 200, 0, 0.7);
    transform-origin: center center;
}

/* 화재 아이콘 깜박임 효과 */
@keyframes flameFlicker {
    0% { 
        transform: translate(-50%, -50%) scale(1); 
        filter: brightness(1); 
        text-shadow: 0 0 5px #ff0, 0 0 10px #ff0, 0 0 15px #ff6600;
    }
    25% { 
        transform: translate(-50%, -50%) scale(0.92) translate(1px, 0px); 
        filter: brightness(1.2); 
        text-shadow: 0 0 7px #ff0, 0 0 14px #ff0, 0 0 21px #ff6600;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1) translate(-1px, 1px); 
        filter: brightness(0.9); 
        text-shadow: 0 0 4px #ff0, 0 0 8px #ff0, 0 0 12px #ff6600;
    }
    75% { 
        transform: translate(-50%, -50%) scale(0.98) translate(0px, -1px); 
        filter: brightness(1.3); 
        text-shadow: 0 0 6px #ff0, 0 0 12px #ff0, 0 0 18px #ff6600;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.05); 
        filter: brightness(1.1); 
        text-shadow: 0 0 5px #ff0, 0 0 10px #ff0, 0 0 15px #ff6600;
    }
}

/* 주변 파동 확장 애니메이션 */
@keyframes waveExpand {
    0% { 
        transform: scale(0.5); 
        opacity: 0.9; 
    }
    100% { 
        transform: scale(2.2); 
        opacity: 0; 
    }
}

/* 스파크 날아가는 효과 */
@keyframes sparkFly {
    0% { 
        transform: translate(0, 0); 
        opacity: 1; 
    }
    100% { 
        transform: translate(var(--x, 20px), var(--y, -20px)); 
        opacity: 0; 
    }
}

/* 호흡 효과 (배경 확장 축소) */
@keyframes breathingEffect {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.5; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

@keyframes intermittentShake {
    /* 빠른 흔들림 (0~15%) */
    0% { transform: translateX(0); }
    3% { transform: translateX(-5px); }
    6% { transform: translateX(5px); }
    9% { transform: translateX(-5px); }
    12% { transform: translateX(5px); }
    15% { transform: translateX(0); }
    
    /* 소강 상태 (15~50%) */
    15%, 50% { transform: translateX(0); }
    
    /* 다시 빠른 흔들림 (50~65%) */
    53% { transform: translateX(-5px); }
    56% { transform: translateX(5px); }
    59% { transform: translateX(-5px); }
    62% { transform: translateX(5px); }
    65% { transform: translateX(0); }
    
    /* 소강 상태 (65~100%) */
    65%, 100% { transform: translateX(0); }
}

.alarm-active {
    animation: intermittentShake 3s infinite;
    border: 2px solid red;
    background-color: rgba(255, 0, 0, 0.05);
}

.emergency-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.05);
    z-index: 5;
    pointer-events: none;
    animation: emergencyFlash 2s infinite;
}

.grid-title {
    background: #f5f5f5;
    color: #333;
    padding: 10px 15px;
    font-weight: bold;
    margin: -15px -15px 10px -15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.grid-title i {
    font-size: 16px;
}

.grid-title.emergency {
    color: white;
    background: linear-gradient(45deg, #ff0000, #ff5252);
    padding: 10px 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: emergencyPulse 1s infinite;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.grid-title.emergency i {
    font-size: 16px;
    margin-right: 8px;
}

.badge-danger {
    background-color: #ff0000;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    animation: blinkBadge 1s infinite;
    font-weight: bold;
}

@keyframes emergencyFlash {
    0%, 100% { background: rgba(255, 0, 0, 0.03); }
    50% { background: rgba(255, 0, 0, 0.1); }
}

@keyframes emergencyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes blinkBadge {
    0%, 10%, 20%, 100% { opacity: 1; }
    5%, 15% { opacity: 0.7; }
    /* 30%~90%는 그대로 유지 */
    30%, 90% { opacity: 1; }
}

.emergency-text {
    color: var(--error-color);
    font-weight: bold;
    animation: emergencyText 1s infinite;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

@keyframes emergencyText {
    0%, 100% { color: var(--error-color); }
    50% { color: #ff5252; }
}

.building-label.emergency {
    background-color: rgba(255, 0, 0, 0.8);
    animation: buildingPulse 1.5s infinite;
    font-weight: bold;
    z-index: 15;
}

@keyframes buildingPulse {
    0%, 100% { background-color: rgba(255, 0, 0, 0.8); box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
    50% { background-color: rgba(255, 0, 0, 0.95); box-shadow: 0 0 15px rgba(255, 0, 0, 0.8); }
}

/* 화재 모니터링 반응형 */
@media (max-width: 992px) {
    #main-container {
        height: auto;
        min-height: unset;
    }
    
    #mapContainer {
        order: -1;
        flex: 1 0 100%;
        height: 350px;
    }
    
    #gridContainer {
        flex: 1 0 100%;
        height: auto;
    }
    
    #alarmList {
        height: 30%;
        max-height: 107px;
    }
    
    #FireAlarmList, #nonFireAlarmList {
        height: 50%;
        max-height: 250px;
    }
    
    .fire-signal {
        width: 30px;
        height: 30px;
    }
    
    #emergency-banner {
        padding: 12px !important;
    }
    
    #emergency-banner h3 {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    #main-container {
        padding: 10px;
        gap: 15px;
    }
    #mapContainer {
        height: 300px;
    }
    #FireAlarmList, #nonFireAlarmList {
        height: 50%;
    }
    .building-label {
        font-size: 12px;
        padding: 8px 10px;
    }
    .fire-signal {
        width: 25px;
        height: 25px;
    }
    #emergency-banner h3 {
        font-size: 1.1rem !important;
    }
    .banner-desc {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 576px) {
    #gridContainer, #mapContainer {
        min-width: 100%;
    }
    #mapContainer {
        height: 250px;
    }
    .building-label {
        font-size: 10px;
        padding: 5px 8px;
    }
    .fire-signal {
        width: 20px;
        height: 20px;
    }
    #emergency-banner h3 {
        font-size: 1rem !important;
    }
    .banner-desc {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 400px) {
    #mapContainer {
        height: 200px;
    }
    .building-label {
        font-size: 8px;
        padding: 4px 6px;
    }
    .fire-signal {
        width: 16px;
        height: 16px;
    }
    #emergency-banner {
        padding: 8px !important;
    }
    #emergency-banner h3 {
        font-size: 0.9rem !important;
    }
    .banner-desc {
        font-size: 0.7rem !important;
    }
}

/* 화재 모니터링 긴급 모드 스타일 */
.emergency-mode {
    background-color: #f8f8f8;
    color: #333;
}

.emergency-mode #main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.emergency-mode footer {
    background: #f0f0f0;
    color: #555;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.emergency-mode footer a {
    color: #319795;
}

.emergency-mode footer a:hover {
    color: #2c8a89;
}

.emergency-mode #alarmList, 
.emergency-mode #FireAlarmList, 
.emergency-mode #nonFireAlarmList {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
}


/* 애니메이션 효과 */
@keyframes bannerPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
    50% { opacity: 0.9; box-shadow: 0 0 10px rgba(255, 0, 0, 0.6); }
}

@keyframes rowHighlight {
    0%, 100% { background-color: rgba(255, 0, 0, 0.2); }
    50% { background-color: rgba(255, 0, 0, 0.4); }
}

.highlight-pulse {
    animation: rowHighlight 2s ease;
}

/* 비상 배너 스타일 */
#emergency-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(229, 62, 62, 0.95);
    color: white;
    padding: 12px 20px;
    margin: 0 0 10px 0;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: bannerPulse 3s infinite;
    border-radius: 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

.banner-icon {
    font-size: 24px;
    margin-right: 15px;
    animation: pulse 1.5s infinite;
}

.banner-content {
    flex: 1;
}

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

#emergency-banner h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

#emergency-banner p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

#silenceAlarm {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#silenceAlarm:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 992px) {
    #emergency-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 15px;
    }
    
    .banner-icon {
        margin-bottom: 10px;
    }
    
    .banner-buttons {
        width: 100%;
        margin-top: 15px;
    }
    
    #silenceAlarm {
        width: 100%;
        justify-content: center;
    }
}

/* 그리드 전체 너비 관련 스타일 */
#alarmList, #FireAlarmList, #nonFireAlarmList {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}


/* 그리드 섹션 스타일 */
.grid-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 15;
}

/* 카드 기본 스타일 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* 모달 기본 스타일 */
.modal {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    color: var(--text-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 테이블 기본 스타일 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    color: var(--text-color);
}

table th, table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--surface-color);
    font-weight: 600;
    text-align: left;
}

table tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 로그인 페이지 전용 스타일 */
.login-page {
    /* 배경 그라데이션 및 색상 변화 애니메이션 */
    --bg-gradient-1: #7eb7ff;
    --bg-gradient-2: #98fb98;
    --bg-gradient-3: #ffb3ba;
    --bg-gradient-4: #7fffd4;
    --container-bg: rgba(255, 255, 255, 0.92);
    --text-color: #333;
    --input-bg: #fff;
    --input-border: #ccc;
    --button-color: #319795;
    --link-color: #2b6cb0;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --shadow-color-hover: rgba(0, 0, 0, 0.2);
    background: linear-gradient(var(--gradient-angle, -45deg), 
        var(--bg-gradient-1), 
        var(--bg-gradient-2), 
        var(--bg-gradient-3), 
        var(--bg-gradient-4));
    background-size: 300% 300%;
    animation: gradientBG 12s ease infinite, gradientRotate 20s linear infinite;
    position: relative;
    overflow-x: hidden;
    height: 940px;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    width: 100%;
    min-height: 840px; /* 푸터 높이(100px)를 제외한 높이 */
}

/* 로그인 컨테이너 스타일 */
.login-container {
    background: var(--container-bg);
    padding: var(--spacing-lg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    width: 400px;
    max-width: 90vw;
    text-align: center;
    margin: 0 auto;
}

.login-container h1 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
    font-weight: 600;
    text-align: left;
    padding-left: var(--spacing-xs);
}

.login-container h2 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    font-weight: 400;
    text-align: left;
    padding-left: var(--spacing-xs);
}

/* 로그인 폼 스타일 */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.links, .back-link {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    text-align: left;
    padding-left: var(--spacing-xs);
}

.links a, .back-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.links a:hover, .back-link:hover {
    color: var(--primary-hover);
}

/* 로그인 정보 영역 스타일 */
#loginInfoArea {
    padding: var(--spacing-md) 0;
}

.login-success {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

/* 환영 헤더 스타일 */
.welcome-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-header i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.welcome-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.welcome-header p {
    color: var(--text-secondary);
    margin-top: 0;
}

/* 사용자 정보 스타일 */
.user-info {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: left;
    line-height: 1.6;
}

#userInfo strong {
    color: var(--accent-color);
    font-weight: 600;
}

#userInfo span {
    color: var(--text-color);
}

#userInfo div {
    margin-top: 12px;
    color: var(--error-color);
    font-weight: 600;
}

/* 버튼 스타일 */
.btn-primary, .btn-danger {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-primary:hover, .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:active, .btn-danger:active {
    transform: translateY(1px);
}

.btn-primary i, .btn-danger i {
    font-size: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

/* 애니메이션 및 트랜지션 */
.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.container.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .login-container {
        width: 90%;
        padding: var(--spacing-md);
    }
    
    .login-container h1 {
        font-size: 1.5rem;
    }
    
    .login-container h2 {
        font-size: 1rem;
    }
    
    .welcome-header i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: var(--spacing-sm);
    }
    
    .action-buttons button {
        padding: 8px 12px;
    }
    
    .welcome-header i {
        font-size: 2rem;
    }
}

.fire-signal-activated {
    animation: activateEffect 0.5s ease-out;
}

.fire-signal-refreshed .spark {
    animation-iteration-count: infinite;
}

.fire-signal-highlighted {
    transform: translate(-50%, -50%) scale(1.3) !important;
    box-shadow: 0 0 25px 5px rgba(255, 0, 0, 0.9) !important;
    z-index: 25 !important;
}

@keyframes activateEffect {
    0% { transform: scale(0.2); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* 모바일 환경에서는 화재 신호 크기 조절 */
@media (max-width: 768px) {
    .fire-signal::after {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    .fire-signal .fire-wave {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }
    
    .fire-area-effect {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .fire-signal::after {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
    
    .fire-signal .fire-wave {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
    }
    
    .fire-area-effect {
        width: 50px;
        height: 50px;
    }
    
    .fire-signal .spark {
        width: 6px;
        height: 6px;
    }
}

.status-badge {
    font-size: 0.75rem; /* 폰트 크기 축소 */
    color: #e53e3e;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 12px;
    background-color: rgba(229, 62, 62, 0.1);
    animation: pulse 2s infinite;
}

/* 화재 표시 배지 스타일 - 붉은 배경과 대비되도록 변경 */
.status-badge.status-danger {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #ffffff;
    font-weight: bold;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.status-badge::before {
    content: "●";
    font-size: 0.6rem; /* 원 크기 축소 */
    margin-right: 2px;
}

/* 페이지 전환 애니메이션 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    z-index: 9999;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

/* 활성 메뉴 아이템 스타일 */
.active-nav-item {
    position: relative;
    font-weight: 700 !important;
}

.active-nav-item::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 70%;
    height: 3px;
    background: var(--accent-color, #2C7BE5);
    border-radius: 3px;
    transform: translateX(-50%);
}


/* 반응형 스타일 */
@media (max-height: 940px) {
    .login-page {
        height: 100vh;
    }
    
    .content-wrapper {
        min-height: calc(100vh - 100px);
    }
} 