* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #3d4f5f 0%, #2c3e50 100%);
    padding: 30px 30px;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a574 0%, #f4d6a2 100%);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d4a574 0%, #f4d6a2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 3px 12px rgba(212, 165, 116, 0.3);
}

.logo-icon i {
    font-size: 24px;
    color: white;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.login-body {
    padding: 24px 30px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: #2c3e50;
    margin-bottom: 6px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #95a5a6;
    font-size: 13px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 11px 12px 11px 36px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 13px;
    color: #2c3e50;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #5f9ea0;
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.1);
}

.form-input::placeholder {
    color: #b2bec3;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #636e72;
}

.forgot-password {
    text-align: right;
    margin-top: 6px;
}

.forgot-password a {
    font-size: 12px;
    color: #6c5ce7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #5f4fd1;
}

.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3d4f5f 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

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

.divider {
    text-align: center;
    margin: 18px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 12px;
    color: #95a5a6;
    font-size: 12px;
    position: relative;
}

.register-button {
    width: 100%;
    padding: 11px;
    background: white;
    color: #2c3e50;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.register-button:hover {
    border-color: #2c3e50;
    background: #f8f9fa;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #636e72;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2c3e50;
}

.footer-link i {
    font-size: 11px;
}

.copyright {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    color: #95a5a6;
}

/* 회사/기관 선택 드롭다운 스타일 */
.company-select-wrapper {
    position: relative;
}

.company-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 11px 36px 11px 36px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 13px;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.company-select:focus {
    outline: none;
    border-color: #5f9ea0;
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.1);
}

.company-select option {
    padding: 10px;
}

.company-select option:disabled {
    background: #f5f5f5;
    color: #b2bec3;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #95a5a6;
    font-size: 12px;
}

/* Toast 스타일 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 14px 18px;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #2c3e50;
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.info {
    border-left-color: #3498db;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    color: white;
}

.toast.success .toast-icon {
    background: #27ae60;
}

.toast.error .toast-icon {
    background: #e74c3c;
}

.toast.warning .toast-icon {
    background: #f39c12;
}

.toast.info .toast-icon {
    background: #3498db;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 12px;
    color: #636e72;
    line-height: 1.4;
    white-space: pre-line;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #636e72;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* 2팩터 인증 모달 */
.two-factor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.two-factor-modal.active {
    display: flex;
}

.two-factor-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.two-factor-header {
    background: linear-gradient(135deg, #3d4f5f 0%, #2c3e50 100%);
    padding: 24px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    position: relative;
}

.two-factor-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4a574 0%, #f4d6a2 100%);
}

.two-factor-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d4a574 0%, #f4d6a2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.two-factor-icon i {
    font-size: 28px;
    color: white;
}

.two-factor-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.two-factor-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.two-factor-body {
    padding: 28px 24px;
}

.two-factor-description {
    text-align: center;
    color: #636e72;
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.two-factor-description strong {
    color: #2c3e50;
    font-weight: 600;
}

.verification-code-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.code-digit {
    width: 45px;
    height: 52px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    background: white;
}

.code-digit:focus {
    outline: none;
    border-color: #5f9ea0;
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.1);
}

.code-digit:disabled {
    background: #f8f9fa;
    color: #95a5a6;
}

.resend-code {
    text-align: center;
    margin-bottom: 20px;
}

.resend-code-text {
    font-size: 12px;
    color: #636e72;
    margin-bottom: 8px;
}

.resend-code-timer {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
}

.resend-code-btn {
    background: none;
    border: none;
    color: #6c5ce7;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.resend-code-btn:hover:not(:disabled) {
    color: #5f4fd1;
    text-decoration: underline;
}

.resend-code-btn:disabled {
    color: #b2bec3;
    cursor: not-allowed;
}

.two-factor-actions {
    display: flex;
    gap: 10px;
}

.verify-button {
    flex: 1;
    padding: 13px;
    background: linear-gradient(135deg, #3d4f5f 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.verify-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cancel-button {
    flex: 1;
    padding: 13px;
    background: white;
    color: #636e72;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button:hover {
    border-color: #636e72;
    background: #f8f9fa;
}

@media (max-width: 480px) {
    .two-factor-content {
        max-width: 100%;
    }

    .code-digit {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }

    .verification-code-input {
        gap: 8px;
    }
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }

    .login-header {
        padding: 24px 20px;
    }

    .login-body {
        padding: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 10px;
    }

    .footer-link {
        font-size: 11px;
    }
}

@media (max-height: 700px) {
    .login-header {
        padding: 20px 30px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .logo-icon i {
        font-size: 20px;
    }

    .login-title {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .login-body {
        padding: 18px 30px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .footer-links {
        margin-top: 14px;
        padding-top: 12px;
    }

    .copyright {
        margin-top: 8px;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.6s ease-out;
}

/* 비밀번호 찾기 모달 */
.forgot-password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.forgot-password-modal.active {
    display: flex;
}

.forgot-password-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

.forgot-password-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: color 0.2s ease;
    z-index: 1;
}

.forgot-password-close:hover {
    color: #636e72;
}

.forgot-password-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.forgot-password-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.forgot-password-body {
    padding: 24px;
}

.forgot-password-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.forgot-password-info-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #636e72;
    font-size: 16px;
}

.forgot-password-info-text {
    flex: 1;
    font-size: 13px;
    color: #636e72;
    line-height: 1.5;
}

.forgot-password-warning {
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
}

.forgot-password-form-group {
    margin-bottom: 16px;
}

.forgot-password-label {
    display: block;
    font-size: 12px;
    color: #2c3e50;
    margin-bottom: 6px;
    font-weight: 500;
}

.forgot-password-input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 13px;
    color: #2c3e50;
    transition: all 0.3s ease;
    background: white;
}

.forgot-password-input:focus {
    outline: none;
    border-color: #5f9ea0;
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.1);
}

.forgot-password-input::placeholder {
    color: #b2bec3;
}

.forgot-password-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
}

.forgot-password-cancel-btn {
    flex: 1;
    padding: 10px;
    background: white;
    color: #636e72;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.forgot-password-cancel-btn:hover {
    border-color: #636e72;
    background: #f8f9fa;
}

.forgot-password-submit-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.forgot-password-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.forgot-password-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .forgot-password-content {
        max-width: 100%;
    }

    .forgot-password-header,
    .forgot-password-body,
    .forgot-password-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 레이어팝업 */
/* 어두운 배경 딤 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* 팝업 본체 */
.popup-window {
    background: #fff;
    /*width: 600px;
    height: 550px;*/
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 팝업 상단바 */
.popup-header {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-content {
    flex: 1;
    padding: 20px;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
