/* ===== HDM Auth Pages ===== */
/* 테마 CSS 간섭 차단 */
.hdm-custom-page { --wp--style--root--padding-top: 0 !important; --wp--style--root--padding-right: 0 !important; --wp--style--root--padding-bottom: 0 !important; --wp--style--root--padding-left: 0 !important; }
.hdm-custom-page .wp-site-blocks { padding: 0 !important; }
.hdm-custom-page, .hdm-custom-page * { box-sizing: border-box; margin: 0; padding: 0; }
.hdm-custom-page a { text-decoration: none; color: inherit; }
.hdm-custom-page h1, .hdm-custom-page h2, .hdm-custom-page h3, .hdm-custom-page h4, .hdm-custom-page h5, .hdm-custom-page h6 { font-weight: inherit; letter-spacing: normal; line-height: inherit; }

/* 로그인/회원가입 공통 래퍼 */
.hdm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 카드 */
.hdm-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: hdmAuthFadeIn .4s ease-out;
}
.hdm-auth-card-wide { max-width: 560px; }

@keyframes hdmAuthFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 로고 영역 */
.hdm-auth-logo {
    text-align: center;
    padding: 36px 24px 20px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
}
.hdm-auth-logo-icon {
    width: 56px; height: 56px;
    background: #3b82f6;
    color: #fff;
    border-radius: 14px;
    font-size: 28px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(59,130,246,.4);
}
.hdm-auth-logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.hdm-auth-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

/* 폼 */
.hdm-auth-form { padding: 24px; }
.hdm-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hdm-auth-field { margin-bottom: 16px; }
.hdm-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.hdm-required { color: #ef4444; }

/* 아이콘 인풋 */
.hdm-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.hdm-auth-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
}
.hdm-auth-input-wrap input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}
.hdm-auth-input-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.hdm-auth-input-wrap input::placeholder { color: #94a3b8; }

/* 아이콘 없는 인풋 wrap — 회원가입 부서/직급 select 용 */
.hdm-auth-input-wrap--noicon select,
.hdm-auth-input-wrap--noicon input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}
.hdm-auth-input-wrap--noicon select {
    /* 우측 화살표 (간단한 SVG) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'><path d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 36px;
}
.hdm-auth-input-wrap--noicon select:focus,
.hdm-auth-input-wrap--noicon input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* 옵션 (로그인 유지) */
.hdm-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
}
.hdm-auth-check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.hdm-auth-check input { accent-color: #3b82f6; }

/* 에러 메시지 */
.hdm-auth-error {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
    min-height: 18px;
    font-weight: 500;
}

/* 버튼 */
.hdm-auth-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: inherit;
}
.hdm-auth-btn:hover { background: #2563eb; }
.hdm-auth-btn:active { transform: scale(.98); }
.hdm-auth-btn:disabled { background: #93c5fd; cursor: not-allowed; }

/* 하단 링크 */
.hdm-auth-links {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #64748b;
}
.hdm-auth-links a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.hdm-auth-links a:hover { text-decoration: underline; }
.hdm-auth-divider { margin: 0 10px; color: #d1d5db; }

/* 카드 푸터 */
.hdm-auth-footer {
    text-align: center;
    padding: 12px 24px 20px;
    font-size: 11px;
    color: #94a3b8;
}

/* ===== 메인 페이지 ===== */
.hdm-main-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.hdm-main-header {
    background: #0f172a;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.hdm-main-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.hdm-main-brand { display: flex; align-items: center; gap: 10px; }
.hdm-main-logo {
    width: 36px; height: 36px;
    background: #3b82f6;
    color: #fff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hdm-main-brand-text { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1.5px; }
.hdm-main-nav { display: flex; align-items: center; gap: 10px; }
.hdm-main-user { color: #94a3b8; font-size: 13px; margin-right: 4px; }
.hdm-main-nav-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    transition: all .2s;
    border: 1px solid transparent;
}
.hdm-main-nav-btn:hover { background: #1e293b; color: #fff; }
.hdm-main-nav-primary {
    background: #3b82f6;
    color: #fff !important;
    border-color: #3b82f6;
}
.hdm-main-nav-primary:hover { background: #2563eb; }

/* 히어로 */
.hdm-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hdm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59,130,246,.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(99,102,241,.1) 0%, transparent 60%);
}
.hdm-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.hdm-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.3);
    border-radius: 20px;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 24px;
}
.hdm-hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hdm-hero-title span { color: #60a5fa; }
.hdm-hero-desc {
    font-size: 17px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 36px;
}
.hdm-hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hdm-hero-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.hdm-hero-btn-primary { background: #3b82f6; color: #fff; }
.hdm-hero-btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,.4); }
.hdm-hero-btn-outline { background: transparent; color: #fff; border: 1px solid #475569; }
.hdm-hero-btn-outline:hover { border-color: #94a3b8; background: rgba(255,255,255,.05); }

/* 기능 소개 */
.hdm-features { padding: 80px 24px; background: #f8fafc; }
.hdm-features-inner { max-width: 1100px; margin: 0 auto; }
.hdm-features-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 48px;
}
.hdm-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.hdm-feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all .2s;
}
.hdm-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    border-color: #3b82f6;
}
/* 카드가 <a> 인 경우 — 링크 기본 스타일 제거 */
a.hdm-feature-card,
a.hdm-feature-card:hover,
a.hdm-feature-card:visited,
a.hdm-feature-card:focus {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
a.hdm-feature-card:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
.hdm-feature-icon { font-size: 36px; margin-bottom: 16px; }
.hdm-feature-card h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.hdm-feature-card p { font-size: 13px; color: #64748b; line-height: 1.6; }

/* 푸터 */
.hdm-main-footer {
    text-align: center;
    padding: 24px;
    background: #0f172a;
    color: #64748b;
    font-size: 12px;
    margin-top: auto;
}

/* 반응형 */
@media (max-width: 768px) {
    .hdm-auth-row { grid-template-columns: 1fr; }
    .hdm-auth-card-wide { max-width: 420px; }
    .hdm-hero-title { font-size: 32px; }
    .hdm-hero-desc { font-size: 15px; }
    .hdm-hero { padding: 60px 20px 50px; }
    .hdm-features-grid { grid-template-columns: 1fr; }
    .hdm-main-header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 10px; }
    .hdm-main-nav { flex-wrap: wrap; justify-content: center; }
}
