
body {
    padding-top: 2rem;
    background-color: #f8f9fa;
    font-family: 'Noto Sans KR', sans-serif;
}

.card {
    margin-bottom: 1.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    border: none;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.anomaly-high {
    color: #dc3545;
    font-weight: bold;
}

.anomaly-medium {
    color: #fd7e14;
    font-weight: bold;
}

.anomaly-low {
    color: #ffc107;
}

.pattern-item {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background-color: #fff;
    border-left: 4px solid #007bff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

.pattern-step {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    text-align: center;
    line-height: 28px;
    margin-right: 0.5rem;
    font-weight: bold;
}

.pattern-location {
    font-weight: 600;
    font-size: 1rem;
}

.pattern-duration {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.pattern-probability {
    display: inline-block;
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    margin-top: 0.5rem;
    border-radius: 6px;
    overflow: hidden;
}

.pattern-probability-bar {
    height: 100%;
    background-color: #007bff;
}

.pattern-probability-value {
    float: right;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.device-selector {
    margin-bottom: 1.5rem;
}

.device-card {
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.device-card.active {
    border-left: 4px solid #007bff;
}

.pattern-sequence {
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.pattern-sequence-item {
    flex: 0 0 auto;
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-right: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    position: relative;
    min-width: 120px;
}

.pattern-sequence-item::after {
    content: "";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-left: 8px solid #007bff;
    border-bottom: 8px solid transparent;
}

.pattern-sequence-item:last-child::after {
    display: none;
}

.pattern-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    margin-right: 0.5rem;
    font-size: 1rem;
    color: white;
}

.icon-livingroom {
    background-color: #198754;
}

.icon-bedroom {
    background-color: #6610f2;
}

.icon-bathroom {
    background-color: #0dcaf0;
}

.icon-etc {
    background-color: #adb5bd;
}

.tab-content {
    padding: 1.5rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.anomaly-table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.pattern-text {
    font-size: 0.95rem;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stats-item {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    margin: 0 0.5rem;
}

.stats-item:first-child {
    margin-left: 0;
}

.stats-item:last-child {
    margin-right: 0;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.search-bar {
    margin-bottom: 1rem;
}

.device-list {
    max-height: 500px;
    overflow-y: auto;
}

.no-patterns-message {
    font-style: italic;
    color: #6c757d;
    text-align: center;
    padding: 2rem;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#errorAlert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
}