/* 예선기관 관리자 시스템 공통 스타일 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #66bb6a;
    --warning-color: #ffa726;
    --danger-color: #ef5350;
    --info-color: #42a5f5;
    --dark-color: #2d3748;
    --light-color: #718096;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --background-gradient: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
}

/* 기본 스타일 */
body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--dark-color);
}

/* 헤더 섹션 */
.header-section {
    background: var(--primary-gradient);
    padding: 20px 0;
    box-shadow: 0 4px 20px var(--shadow-color);
    margin-bottom: 40px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.logo-section {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.logo-section:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-text {
    font-weight: 600;
    text-align: right;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* 메인 컨테이너 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 로그인 페이지 스타일 */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 16px;
    color: var(--light-color);
    font-weight: 400;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.account-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.account-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.account-links a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.account-links .separator {
    color: #a0aec0;
    margin: 0 2px;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #a0aec0;
}

.login-button {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.divider {
    margin: 30px 0 25px 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.security-note {
    margin-top: 25px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    font-size: 13px;
    color: var(--light-color);
    line-height: 1.5;
    text-align: center;
}

.security-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: text-top;
    color: var(--primary-color);
}

/* 대시보드 스타일 */
.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: white;
}

.stat-icon.applications {
    background: var(--primary-gradient);
}

.stat-icon.pending {
    background: linear-gradient(135deg, var(--warning-color), #ff7043);
}

.stat-icon.approved {
    background: linear-gradient(135deg, var(--success-color), #43a047);
}

.stat-icon.rejected {
    background: linear-gradient(135deg, var(--danger-color), #e53935);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--light-color);
    font-weight: 500;
}

/* 메뉴 카드 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.menu-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 6px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: white;
}

.menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.menu-description {
    color: var(--light-color);
    line-height: 1.6;
}

/* 버튼 스타일 */
.back-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
}

/* 콘텐츠 카드 */
.content-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 6px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    text-align: center;
}

.coming-soon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.coming-soon-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.coming-soon-desc {
    color: var(--light-color);
    line-height: 1.6;
    font-size: 16px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 0 15px;
    }

    .logo-text {
        font-size: 20px;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
    }

    .main-container {
        padding: 0 15px;
    }

    .login-card {
        padding: 30px 25px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 15px;
    }

    .login-button {
        padding: 14px;
        font-size: 15px;
    }

    .account-links {
        font-size: 12px;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 회원가입 페이지 — 2열 배치가 넉넉하게 보이도록 카드 폭을 넓게 잡는다 */
.signup-card {
    max-width: 860px;
    margin-bottom: 60px;
}

.signup-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 28px 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.signup-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 6px;
}

.signup-required {
    color: var(--danger-color);
}

.signup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.signup-inline {
    display: flex;
    gap: 10px;
}

.signup-inline .form-input {
    flex: 1;
}

.signup-check-button {
    flex-shrink: 0;
    padding: 0 18px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.signup-check-button:hover {
    opacity: 0.85;
}

.signup-notice {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 10px;
    font-size: 13px;
    color: #8d5b00;
    line-height: 1.5;
}

.signup-field-error {
    margin-top: 6px;
    font-size: 13px;
    color: var(--danger-color);
    min-height: 1px;
}

/* 전화번호 3분할 입력 (000 - 0000 - 0000) */
.signup-phone-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.signup-phone-group .form-input {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.signup-phone-dash {
    color: #a0aec0;
    font-weight: 600;
    flex-shrink: 0;
}

/* 이메일 분할 입력 (아이디 @ 도메인 + 선택)
   반열(2열 배치) 안에서도 안정적으로 보이도록
   [아이디 @ 도메인] 한 줄 + 도메인 선택은 아랫줄 전체 폭으로 배치한다 */
.signup-email-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.signup-email-group .form-input {
    min-width: 0;
}

.signup-email-group #manager_email_local {
    flex: 1;
}

.signup-email-group #manager_email_domain {
    flex: 1.2;
}

.signup-email-group #manager_email_domain_select {
    flex-basis: 100%;
    padding-left: 8px;
    padding-right: 8px;
}

.signup-email-at {
    color: #a0aec0;
    font-weight: 600;
    flex-shrink: 0;
}

/* 우편번호 입력칸 */
.signup-zipcode {
    max-width: 160px;
    background: #f8f9fa;
}

@media (max-width: 600px) {
    .signup-email-group {
        flex-wrap: wrap;
    }

    .signup-email-group #manager_email_domain_select {
        flex-basis: 100%;
    }
}

/* 스팸 봇 함정 필드 — 화면에서 완전히 숨긴다 */
.signup-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 600px) {
    .signup-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}