/* Factory Smart Alarm - Critical CSS (Above-the-fold 스타일) */
/* 페이지 로드 시 즉시 필요한 스타일만 포함 */

/* 기본 폰트 및 레이아웃 */
html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.5;
}

/* 헤더 스타일 (Above-the-fold) */
.header-container {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #0d6efd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 600;
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 0.375rem;
}

/* 로딩 스피너 (첫 화면) */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* 버튼 기본 스타일 */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 컨테이너 */
.container-fluid {
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

/* 그리드 시스템 (기본만) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col {
    flex: 1 0 0%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* 유틸리티 클래스 (필수만) */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-muted { color: #6c757d !important; }
.text-primary { color: #0d6efd !important; }
.text-white { color: #fff !important; }
.bg-primary { background-color: #0d6efd !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.p-3 { padding: 1rem !important; }

/* 폼 요소 */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 카드 기본 */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

/* 반응형 유틸리티 */
@media (max-width: 768px) {
    .container-fluid {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* 접근성 */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 오류 UI */
#blazor-error-ui {
    background: #ffebee;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #c62828;
}
