/* 전체 페이지 기본 설정 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    /* 그라데이션 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    overflow: hidden;
    /* 스크롤바 방지 */
}

/* 로그인 폼을 감싸는 전체 래퍼 */
.login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    /* 반투명 흰색 배경 */
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 380px;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(5px);
    /* 배경 흐림 효과 */
    animation: fadeIn 0.8s ease-out;
    /* 애니메이션 효과 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 제목 스타일 */
.login-title {
    color: #004085;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 700;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* 입력 그룹 스타일 */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
}

.input-group input {
    width: calc(100% - 20px);
    /* 패딩 고려 */
    padding: 12px 10px;
    border: 1px solid #cce5ff;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* 로그인 버튼 스타일 */
.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    /* 그라데이션 버튼 */
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.login-button:hover {
    background: linear-gradient(45deg, #0056b3, #003f7f);
    transform: translateY(-2px);
}

.login-button:active {
    transform: translateY(0);
}

/* 관리자 로그인 버튼 스타일 */
.admin-login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #6c757d, #495057);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.admin-login-button:hover {
    background: linear-gradient(45deg, #495057, #343a40);
    transform: translateY(-1px);
}

.admin-login-button:active {
    transform: translateY(0);
}

/* 푸터 텍스트 */
.success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #a7f3d0;
    font-size: 0.9rem;
    font-weight: 500;
}

.success-message i {
    color: #10b981;
}

.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #fecaca;
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message i {
    color: #dc2626;
}

.login-footer {
    margin-top: 30px;
    font-size: 0.85em;
    color: #888;
}

/* 교정 상태 스타일 */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
}

.status-badge.expired {
    background-color: #ff4444;
    color: white;
}

.status-badge.approaching {
    background-color: #ff9900;
    color: white;
}

.equipment-row.expired {
    background-color: #ffe6e6;
}

.equipment-row.approaching {
    background-color: #fff3e0;
}

/* 사진 그리드 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.photo-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.photo-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 3px;
}

.btn-delete-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* 포털 버튼 섹션 */
.portal-section {
    margin-top: 16px;
}

.portal-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    /* 로그인 버튼과 동일 */
    border-radius: 6px;
    /* 로그인 버튼과 동일 */
    text-decoration: none;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b1120;
    font-weight: 600;
    /* 로그인 버튼과 동일 */
    font-size: 1.1em;
    /* 로그인 버튼과 동일 */
    border: none;
    box-shadow: none;
    /* 로그인 버튼과 동일하게 그림자 제거 */
    transition: background 0.3s ease, transform 0.2s ease;
    /* 로그인 버튼과 동일한 트랜지션 키 */
}

.portal-button:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    /* 살짝 진하게 */
    transform: translateY(-2px);
    /* 로그인 버튼과 동일한 상승 효과 */
}

.portal-button:active {
    transform: translateY(0);
}

.portal-button i {
    color: #0b1120;
    font-size: 1em;
    /* 텍스트 크기와 동일 */
    line-height: 1;
    /* 높이 증가 방지 */
}

/* 공통 버튼 사이징 정렬: 두 버튼의 높이/타이포 완전 일치 */
.login-button,
.portal-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    /* 고정 높이로 완전 동일 */
    padding: 0 16px;
    /* 수평 패딩만 적용 */
    font-size: 1.1rem;
    /* 동일 폰트 크기 */
    line-height: 1;
    /* 줄간격을 1로 고정 */
    font-weight: 600;
    /* 동일 두께 */
    border-radius: 6px;
    /* 동일 라운드 */
    white-space: nowrap;
    /* 줄바꿈 방지로 높이 증가 차단 */
}