/* =================================================================
   1. 폰트 및 애니메이션 라이브러리
   ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* =================================================================
      2. 전역 설정 (비율 조정의 핵심)
      ================================================================= */
:root {
    /* 🎨 브랜드 컬러 */
    --primary-color: #635bff;
    --primary-hover: #5851d8;
    --secondary-color: #0a2540;
    --bg-color: #f7f9fc;
    --surface-color: #ffffff;

    --text-main: #1e293b;
    --text-sub: #64748b;
    --border-radius: 8px;
}
/* 🚀 [추가됨] 포커스 링 제거 (접근성 유지하면서 시각적 박스만 끄기) */
:focus {
    outline: none;
}

/* 단, 키보드 사용자(Tab키)를 위해 진짜 입력창은 살려둠 */
button:focus-visible, 
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
html {
    /* ✅ [핵심] 16px -> 13px로 변경 */
    /* 이렇게 하면 모든 UI(버튼, 패딩, 글자)가 약 80% 크기로 축소됩니다. */
    /* zoom 속성 없이도 자연스럽게 작아집니다. */
    font-size: 13.5px;

    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* 가로 스크롤 절대 금지 */
    /* 가로 스크롤 방지 */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);

    /* 1rem = 13px이 됨 */
    font-size: 1rem;

    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* =================================================================
      3. 폼 요소 크기 재조정 (중요!)
      ================================================================= */
/* 이전에 42px로 고정했던 걸 rem으로 바꿔야 비율에 맞게 줄어듭니다 */
.form-control,
.btn,
.input-group-text {
    height: 3.2rem;
    font-size: 1rem;
    border-radius: 0.5rem;
}
.btn-sm {
    height: auto;
    min-height: auto;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}
/* 링크 및 버튼 공통 */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.btn-primary-global {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
}

/* =================================================================
   [Axowl Components] 전역 설정(13px)을 기반으로 한 컴포넌트 스타일
   ================================================================= */

/* 1. 라벨: 작고, 굵고, 대문자 스타일 */
.auth-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    /* Slate-500 */
    margin-bottom: 0.5rem;
    display: block;
}

/* 2. 입력창 & 애드온 공통 */
.auth-input,
.auth-addon {
    height: 48px;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    background-color: #fff;
    color: #0f172a;
    transition: all 0.2s ease;
}

/* 포커스 상태 */
.auth-input:focus {
    border-color: var(--ah-link);
    /* Indigo */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
    z-index: 5;
    /* 겹친 요소 위로 */
}
/* Bootstrap form-control/form-select 포커스 → 인디고로 통일 */
.form-control:focus,
.form-select:focus {
    border-color: var(--ah-link);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}
/* 3. KYB Verify 버튼 (Input 안에 붙는 버튼) */
.btn-verify {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    transition: all 0.2s;
}

.btn-verify:hover:not(:disabled) {
    background-color: #eef2ff;
    color: var(--ah-link);
    border-color: #c7d2fe;
    z-index: 5;
}

/* 4. 메인 액션 버튼 */
.auth-btn {
    height: 48px;
    width: 100%;
    background-color: var(--ah-link);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-btn:hover:not(:disabled) {
    background-color: #4338ca;
}

.auth-btn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
}

/* 5. [중요] Input Group 연결 부위 처리 (깨짐 방지) */
.input-group.auth-group .auth-input {
    border-right: none;
}

.input-group.auth-group .auth-addon,
.input-group.auth-group .btn-verify {
    border-left: 1px solid #cbd5e1;
    margin-left: -1px;
    /* 겹치게 해서 2줄 방지 */
}

/* 6. [중요] Disabled 상태 (완벽한 회색 처리) */
/* 그룹 전체에 .disabled-mode가 붙으면 내부 요소 전부 회색화 */
.input-group.disabled-mode .auth-input,
.input-group.disabled-mode .btn-verify,
.auth-input:disabled {
    background-color: #f1f5f9 !important;
    /* 배경 회색 */
    color: #94a3b8 !important;
    /* 글자 흐림 */
    border-color: #e2e8f0 !important;
    /* 테두리 연하게 */
    cursor: not-allowed;
}
.kyc-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #1e293b;
}
/* =================================================================
   Success / Verification 공통 스타일
   ================================================================= */
   .success-state-container {
    text-align: center;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #eef2ff;
    color: #635bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.success-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.success-desc {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.email-highlight {
    color: #1e293b;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding: 0 4px;
}
/* ─── RegisterRepresentativeModal ─── */
.rep-modal-card {
    max-width: 560px;
}
.email-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(99, 91, 255, 0.1);
    z-index: -1;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.rep-modal-card {
    max-width: 480px;
}
/* =================================================================
   MainLayout — 전역 레이아웃 스타일
   ================================================================= */

   .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #f8fafc;
}

.top-bar-primary {
    height: 60px;
    min-height: 60px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    z-index: 200;
}

.brand-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -1.5px;
    line-height: 1;
    display: inline-block;
}

.top-bar-secondary {
    height: 44px;
    min-height: 44px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 1.5rem;
    z-index: 150;
}

.category-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
}

.category-link.active {
    color: #0f172a;
    font-weight: 700;
    border-bottom: 2px solid #0f172a;
}

.main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 0.75rem;
}

.sidebar-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    padding: 0 1rem 1.25rem;
    letter-spacing: 0.02em;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: background-color 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.sidebar-link.active {
    background-color: #f1f5f9;
    color: var(--ah-link);
    font-weight: 600;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 3.5rem 2rem;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
}

.content-container {
    width: 100%;
    max-width: 880px;
}

.aws-divider {
    width: 1px;
    height: 14px;
    background-color: #e2e8f0;
    margin: 0 12px;
}

/* 모바일 대응 */
@media (max-width: 640px) {
    html {
        font-size: 12px;
    }

    /* 모바일은 더 작게 */
}