/* DSGAS Global Styles */

:root {
    --primary-color: #0d6efd;       /* Professional Blue */
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --bg-light: #f8f9fc;
    --text-dark: #5a5c69;
    
    /* To-Do Priority Colors */
    --accent-red: #e11d48;
    --accent-orange: #f59e0b;
    --accent-green: #10b981;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* --- Global Navbar Styling --- */
.navbar-custom {
    background: linear-gradient(90deg, #0d6efd 10%, #0a58ca 100%);
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Navbar Links (Top Menu) */
.navbar-custom .nav-link {
    color: rgba(255,255,255,0.8) !important; /* Default: Light White */
    font-weight: 500;
    margin-right: 1rem;
    transition: 0.2s;
}

.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
    color: white !important; /* Active/Hover: Pure White */
    font-weight: 700;
}

/* --- Common UI Elements --- */
.main-container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}
.card:hover:not(.no-hover) {
    transform: translateY(-3px);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: var(--primary-color);
}

/* Border Helpers */
.border-left-primary { border-left: 0.25rem solid var(--primary-color) !important; }
.border-left-success { border-left: 0.25rem solid var(--success-color) !important; }
.border-left-info { border-left: 0.25rem solid var(--info-color) !important; }
.border-left-warning { border-left: 0.25rem solid var(--warning-color) !important; }
.border-left-danger { border-left: 0.25rem solid var(--danger-color) !important; }

/* Table Styling */
.table th {
    border-top: none;
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Gas Monitoring Module Styles --- */

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* 너비 축소: 320px -> 260px */
    gap: 1rem; /* 간격 최적화 */
}

/* Status Cards */
.gas-card {
    border: 1px solid #e3e6f0;
    background: white;
}

.gas-card.warning-bg { 
    background-color: #fff9c4; 
    border: 1px solid #fdd835; 
}
.gas-card.error-bg { 
    background-color: #f3e5f5; 
    border: 1px solid #e1bee7; 
}
.gas-card.empty-bg { 
    background-color: #ffebee; 
    border: 1px solid #ffcdd2; 
}

/* Status Indicators */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Data Display inside Card */
.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    text-align: center;
}
.data-item {
    display: flex;
    flex-direction: column;
}
.data-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
}
.data-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.alert-msg {
    color: var(--danger-color);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Legend Filters */
.legend-item {
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 2rem;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent text wrap inside button */
}
.legend-item:hover {
    background-color: #eaecf4;
}
.legend-item.selected {
    background-color: #e8e4f5; /* Light Purple */
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Mobile Responsiveness (Max width 768px) --- */
@media (max-width: 768px) {
    .main-container {
        padding: 0.5rem; /* 더 줄임: 1rem -> 0.5rem */
    }
    
    .legend-item {
        font-size: 0.7rem; /* 더 줄임: 0.75rem -> 0.7rem */
        padding: 0.2rem 0.4rem; /* 더 줄임 */
        border-radius: 4px; /* 둥근 정도 감소로 공간 절약 */
    }
    
    .status-dot {
        width: 6px; /* 점 크기 축소 */
        height: 6px;
    }
    
    /* Ensure cards take full width if needed but grid handles it well */
    .dashboard-grid {
        gap: 0.5rem;
    }
    
    /* Navbar tweaks */
    .navbar-brand {
        font-size: 1.1rem;
    }
}.icon-circle-sm { height: 32px; width: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
