/*
 * 뉴티씨 통합 로그인 테마
 * 기준: newtc.co.kr (남색 #1A2E4A, 포인트 #1A3A6A, 배경 #F5F5F5, 카드 모서리 10px, 입력창 5px, 맑은 고딕)
 * 부모 테마(keycloak)의 PatternFly 스타일을 덮어쓰기 위해 모든 규칙을 body.newtc 아래에 둔다.
 */

:root {
    --newtc-navy: #1A2E4A;
    --newtc-navy-hover: #132237;
    --newtc-blue: #1A3A6A;
    --newtc-bg: #F5F5F5;
    --newtc-text: #333333;
    --newtc-muted: #666666;
    --newtc-border: #DDDDDD;
    --newtc-error: #D32F2F;
    --newtc-footer-text: #8AA4C0;
    --newtc-radius: 5px;
    --newtc-card-radius: 10px;
    --newtc-card-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
    --newtc-accent: #4DB8FF;
    --newtc-required: #D32F2F;
    --newtc-side-bg: #F0F4F8;
}

html.login-pf,
html.login-pf body.newtc {
    height: auto;
    min-height: 100%;
}

html.login-pf body.newtc {
    margin: 0;
    background: var(--newtc-bg);
    background-image: none;
    color: var(--newtc-text);
    font-family: "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Noto Sans", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.newtc *,
body.newtc *::before,
body.newtc *::after {
    box-sizing: border-box;
}

/* ---------- 헤더 ---------- */
body.newtc .newtc-header {
    background: var(--newtc-navy);
    height: 60px;
    flex: 0 0 auto;
}

body.newtc .newtc-header-inner {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

body.newtc .newtc-logo {
    display: inline-flex;
    align-items: center;
}

body.newtc .newtc-logo img {
    display: block;
    height: 34px;
    width: auto;
}

body.newtc .newtc-header-sep {
    width: 1px;
    height: 20px;
    background: #4A6588;
}

body.newtc .newtc-header-title {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- 본문 / 카드 ---------- */
body.newtc .newtc-main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

body.newtc .newtc-wrap {
    width: 100%;
    max-width: 420px;
}

body.newtc .newtc-card,
body.newtc .newtc-card.card-pf {
    background: #FFFFFF;
    border: 0;
    border-top: 0;
    border-radius: var(--newtc-card-radius);
    box-shadow: var(--newtc-card-shadow);
    padding: 48px 44px 40px;
    margin: 0;
    width: 100%;
    max-width: none;
}

body.newtc .newtc-card .login-pf-header {
    border: 0;
    margin: 0 0 28px;
    padding: 0;
    text-align: center;
    position: relative;
}

body.newtc #kc-page-title {
    margin: 0 0 8px;
    color: var(--newtc-navy);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

body.newtc .newtc-subtitle {
    margin: 0;
    color: var(--newtc-muted);
    font-size: 13px;
}

body.newtc #kc-content,
body.newtc #kc-content-wrapper {
    padding: 0;
    margin: 0;
}

/* ---------- 언어 선택 (지구본 + 언어 이름 나열) ---------- */
body.newtc #kc-locale {
    position: absolute;
    top: -28px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--newtc-muted);
}

body.newtc .newtc-lang-icon {
    flex: 0 0 auto;
}

body.newtc #kc-locale a {
    color: var(--newtc-muted);
    text-decoration: none;
    padding: 2px 2px;
}

body.newtc #kc-locale a:hover,
body.newtc #kc-locale a:focus-visible {
    color: var(--newtc-navy);
    text-decoration: underline;
}

body.newtc .newtc-lang-cur {
    color: var(--newtc-navy);
    font-weight: 700;
    padding: 2px 2px;
}

body.newtc .newtc-lang-sep {
    color: var(--newtc-border);
}

/* ---------- 폼 ---------- */
body.newtc .form-horizontal .form-group,
body.newtc .form-group {
    margin: 0 0 16px;
}

body.newtc [class*="col-xs-"],
body.newtc [class*="col-sm-"],
body.newtc [class*="col-md-"],
body.newtc [class*="col-lg-"] {
    float: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
}

body.newtc .pf-c-form__label,
body.newtc label {
    display: block;
    margin: 0 0 6px;
    color: #555555;
    font-size: 13px;
    font-weight: 700;
}

body.newtc .pf-c-form__label-text {
    font-size: 13px;
    font-weight: 700;
}

body.newtc input.pf-c-form-control,
body.newtc input[type="text"],
body.newtc input[type="email"],
body.newtc input[type="password"],
body.newtc input[type="tel"],
body.newtc select,
body.newtc textarea {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: #FFFFFF;
    border: 1px solid var(--newtc-border);
    border-radius: var(--newtc-radius);
    box-shadow: none;
    color: var(--newtc-text);
    font-family: inherit;
    font-size: 14px;
}

body.newtc textarea {
    height: auto;
    padding: 10px 12px;
}

body.newtc input::placeholder {
    color: #999999;
}

body.newtc input.pf-c-form-control:focus,
body.newtc input[type="text"]:focus,
body.newtc input[type="email"]:focus,
body.newtc input[type="password"]:focus,
body.newtc input[type="tel"]:focus,
body.newtc select:focus {
    outline: none;
    border-color: var(--newtc-blue);
    box-shadow: 0 0 0 1px var(--newtc-blue);
}

body.newtc input[aria-invalid="true"] {
    border-color: var(--newtc-error);
}

body.newtc .pf-c-form__helper-text.pf-m-error,
body.newtc .pf-c-form__helper-text,
body.newtc .kc-feedback-text {
    display: block;
    margin-top: 6px;
    color: var(--newtc-error);
    font-size: 12px;
}

body.newtc .required {
    color: var(--newtc-required);
}

/* 비밀번호 보기 토글 */
body.newtc .pf-c-input-group {
    display: flex;
    width: 100%;
}

body.newtc .pf-c-input-group input {
    flex: 1 1 auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

body.newtc .pf-c-input-group .pf-c-button.pf-m-control {
    flex: 0 0 44px;
    width: 44px;
    height: 42px;
    padding: 0;
    background: #FFFFFF;
    border: 1px solid var(--newtc-border);
    border-left: 0;
    border-radius: 0 var(--newtc-radius) var(--newtc-radius) 0;
    color: var(--newtc-muted);
    cursor: pointer;
}

/* 로그인 상태 유지 / 비밀번호 찾기 */
body.newtc .login-pf-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px;
    padding: 0;
}

body.newtc .login-pf-settings .checkbox {
    margin: 0;
}

body.newtc .login-pf-settings .checkbox label {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: #555555;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

body.newtc input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--newtc-navy);
}

body.newtc a {
    color: var(--newtc-blue);
}

body.newtc .login-pf-settings a {
    color: var(--newtc-muted);
    font-size: 13px;
    text-decoration: none;
}

body.newtc .login-pf-settings a:hover,
body.newtc a:hover {
    color: var(--newtc-blue);
    text-decoration: underline;
}

/* ---------- 버튼 ---------- */
body.newtc .pf-c-button.pf-m-primary,
body.newtc input[type="submit"].pf-c-button,
body.newtc button.pf-c-button.pf-m-primary {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: var(--newtc-navy);
    border: 0;
    border-radius: var(--newtc-radius);
    box-shadow: none;
    color: #FFFFFF;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
}

body.newtc .pf-c-button.pf-m-primary:hover,
body.newtc input[type="submit"].pf-c-button:hover {
    background: var(--newtc-navy-hover);
    text-decoration: none;
}

body.newtc #kc-form-buttons {
    margin: 0;
}

/* ---------- 소셜(gitsalt 등 외부 로그인) ---------- */
body.newtc .kc-social-section {
    margin-top: 20px;
}

body.newtc #kc-social-providers hr {
    display: none;
}

body.newtc #kc-social-providers h2 {
    position: relative;
    margin: 0 0 16px;
    color: #888888;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

body.newtc #kc-social-providers h2::before,
body.newtc #kc-social-providers h2::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 24px);
    height: 1px;
    background: #E5E5E5;
}

body.newtc #kc-social-providers h2::before { left: 0; }
body.newtc #kc-social-providers h2::after  { right: 0; }

body.newtc #kc-social-providers ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.newtc #kc-social-providers li {
    margin: 0 0 8px;
}

body.newtc #kc-social-providers a.pf-c-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-radius: var(--newtc-radius);
    color: var(--newtc-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

body.newtc #kc-social-providers a.pf-c-button:hover {
    background: #F9F9F9;
    color: var(--newtc-text);
}

/* ---------- 회원가입 안내 ---------- */
body.newtc #kc-info {
    margin: 24px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid #E5E5E5;
    text-align: center;
}

body.newtc #kc-info-wrapper,
body.newtc #kc-registration {
    margin: 0;
    padding: 0;
    color: #555555;
    font-size: 13px;
}

body.newtc #kc-registration a {
    margin-left: 6px;
    color: var(--newtc-blue);
    font-weight: 700;
}

/* ---------- 알림 ---------- */
body.newtc .pf-c-alert {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-left-width: 4px;
    border-radius: var(--newtc-radius);
    font-size: 13px;
}

body.newtc .pf-c-alert.pf-m-danger  { border-left-color: var(--newtc-error); background: #FDF3F3; }
body.newtc .pf-c-alert.pf-m-warning { border-left-color: #F9A825; background: #FFFBEF; }
body.newtc .pf-c-alert.pf-m-success { border-left-color: #2E7D32; background: #F2F8F2; }
body.newtc .pf-c-alert.pf-m-info    { border-left-color: var(--newtc-blue); }

body.newtc .pf-c-alert .kc-feedback-text {
    margin: 0;
    color: var(--newtc-text);
    font-size: 13px;
}

/* ---------- 푸터 (기존 newtc.co.kr 푸터와 동일 톤) ---------- */
body.newtc .newtc-footer {
    flex: 0 0 auto;
    background: var(--newtc-navy);
    color: var(--newtc-footer-text);
    font-size: 12px;
    line-height: 1.8;
}

body.newtc .newtc-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 32px;
}

body.newtc .newtc-footer p {
    margin: 0;
}

body.newtc .newtc-footer-company {
    margin-bottom: 8px !important;
    color: #FFFFFF;
    font-size: 16px;
    letter-spacing: 0.04em;
}

body.newtc .newtc-footer-links {
    margin-top: 16px !important;
}

body.newtc .newtc-footer-links a {
    margin-right: 16px;
    color: #CDD8E8;
    text-decoration: none;
}

body.newtc .newtc-footer-links a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

body.newtc .newtc-copyright {
    margin-top: 6px !important;
}

/* ---------- 모바일 ---------- */
@media (max-width: 480px) {
    body.newtc .newtc-main {
        padding: 16px 12px;
        align-items: flex-start;
    }

    body.newtc .newtc-card,
    body.newtc .newtc-card.card-pf {
        padding: 28px 20px 24px;
    }

    body.newtc .newtc-header-inner,
    body.newtc .newtc-footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ---------- 회원가입 화면 ---------- */
body.newtc.newtc-register .newtc-wrap {
    max-width: 480px;
}

body.newtc .newtc-section-title {
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E8EDF4;
    color: var(--newtc-navy);
    font-size: 12px;
    font-weight: 700;
}

body.newtc .newtc-section-title:not(:first-child) {
    margin-top: 28px;
}

body.newtc .newtc-req {
    color: var(--newtc-required);
}

body.newtc .newtc-note {
    color: #AAAAAA;
    font-size: 11px;
    font-weight: 400;
}

body.newtc .newtc-hint {
    margin-top: 6px;
    color: #AAAAAA;
    font-size: 11px;
}

body.newtc .newtc-input-row {
    display: flex;
    gap: 8px;
}

body.newtc .newtc-input-row input {
    flex: 1 1 auto;
    min-width: 0;
}

/* 휴대폰 국가 선택 */
body.newtc .newtc-country {
    flex: 0 0 132px;
    width: 132px;
    height: 42px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid var(--newtc-border);
    border-radius: var(--newtc-radius);
    color: var(--newtc-navy);
    font-size: 14px;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    body.newtc .newtc-phone-row {
        flex-wrap: wrap;
    }
    body.newtc .newtc-phone-row .newtc-country {
        flex: 1 1 100%;
        width: 100%;
    }
    body.newtc .newtc-phone-row input {
        flex: 1 1 0;
    }
}

body.newtc .newtc-input-row input[readonly] {
    background: #FAFAFA;
    cursor: default;
}

body.newtc .newtc-btn-side {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 14px;
    background: var(--newtc-side-bg);
    border: 1px solid var(--newtc-border);
    border-radius: var(--newtc-radius);
    color: var(--newtc-navy);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    white-space: nowrap;
}

body.newtc .newtc-btn-side:hover {
    background: #E6ECF3;
}

/* 약관 동의 */
body.newtc .newtc-agree-box {
    margin: 0 0 8px;
}

body.newtc .newtc-agree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

body.newtc .newtc-agree-all {
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E8EDF4;
}

body.newtc .newtc-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--newtc-text);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}

body.newtc .newtc-agree-all .newtc-check {
    font-weight: 700;
}

body.newtc a.newtc-view {
    color: #AAAAAA;
    font-size: 11px;
    text-decoration: none;
}

body.newtc a.newtc-view:hover {
    color: var(--newtc-blue);
    text-decoration: underline;
}

body.newtc .newtc-submit-row {
    margin-top: 24px;
}

body.newtc .newtc-login-link {
    margin: 20px 0 0;
    color: #555555;
    font-size: 13px;
    text-align: center;
}

body.newtc .newtc-login-link a {
    margin-left: 4px;
    color: var(--newtc-navy);
    font-weight: 700;
}

@media (max-width: 480px) {
    body.newtc .newtc-card,
    body.newtc .newtc-card.card-pf {
        padding: 32px 20px 28px;
    }
}

/* ---------- 휴대폰 SMS 인증 ---------- */
body.newtc #newtc-sms-block[hidden] {
    display: none;
}

body.newtc .newtc-sms-status {
    min-height: 0;
    margin-top: 6px;
    font-size: 12px;
}

body.newtc .newtc-sms-status.ok {
    color: #188038;
}

body.newtc .newtc-sms-status.err {
    color: var(--newtc-error);
}

body.newtc .newtc-btn-side:disabled {
    cursor: default;
    opacity: 0.6;
}

/* ---------- 체크박스 + 라벨 (로그인 상태 유지, 다른 기기에서 로그아웃 등) ---------- */
/* 부트스트랩은 체크박스를 position:absolute 로 띄우고 라벨에 왼쪽 여백 20px 을 준다.
   여백을 없애고 체크박스를 일반 흐름에 두어 글자와 겹치지 않게 한다. */
body.newtc .checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding-left: 0;
    color: #555555;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}

body.newtc .checkbox input[type="checkbox"],
body.newtc .checkbox label input[type="checkbox"] {
    position: static;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
}

body.newtc .checkbox {
    margin: 0 0 16px;
}

/* ---------- 서비스 카드 (푸터 위) + 낮아진 푸터 ---------- */
body.newtc .newtc-services {
    flex: 0 0 auto;
    padding: 8px 24px 36px;
    background: #F5F5F5;
}

body.newtc .newtc-services-inner {
    max-width: 1200px;
    margin: 0 auto;
}

body.newtc .newtc-services-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 0;
}

body.newtc .newtc-services-group + .newtc-services-group {
    margin-left: 24px;
    padding-left: 24px;
    border-left: 2px solid #C9CED6;
}

body.newtc .newtc-services-title {
    margin: 0 0 14px;
    padding-bottom: 8px;
    color: #1A2E4A;
    font-size: 18px;
    font-weight: 700;
}

body.newtc .newtc-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.newtc .newtc-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 150px;
    height: 126px;
    box-sizing: border-box;
    padding: 12px 10px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    color: #333333;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}

body.newtc .newtc-service:hover {
    border-color: #1A2E4A;
    box-shadow: 0 2px 10px rgba(26, 46, 74, 0.12);
    color: #1A2E4A;
    text-decoration: none;
}

body.newtc .newtc-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 88px;
}

body.newtc .newtc-service-icon img {
    max-width: 100%;
    max-height: 88px;
    object-fit: contain;
}

body.newtc .newtc-service-icon.solo img {
    max-height: 44px;
}

body.newtc .newtc-service-logo[src*="logo-eyefeet-cloud"] {
    height: 30px;
    margin-top: -10px;
}

body.newtc .newtc-service-name {
    margin-top: -8px;
}

body.newtc .newtc-service-logo {
    display: block;
    max-width: 100%;
    height: 16px;
    margin-top: -3px;
    object-fit: contain;
}

body.newtc .newtc-service-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1A2E4A;
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
}

body.newtc .newtc-service-name {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    word-break: keep-all;
}

/* 푸터: 회사 정보는 가로로 길게 2줄 + 링크/저작권 한 줄 */
body.newtc .newtc-footer-inner {
    padding: 18px 24px 20px;
}

body.newtc .newtc-footer-line {
    margin: 0;
    line-height: 1.9;
}

body.newtc .newtc-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(138, 164, 192, 0.25);
}

body.newtc .newtc-footer-links a {
    margin-right: 16px;
    color: #CDD8E8;
    text-decoration: none;
}

body.newtc .newtc-footer-links a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* 두 줄로 내려가는 폭(두 그룹 합계 약 1046px 미만)에서는 세로 구분선 제거 */
@media (max-width: 1048px) {
    body.newtc .newtc-services-group + .newtc-services-group {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 480px) {
    body.newtc .newtc-services {
        padding: 8px 16px 28px;
    }

    body.newtc .newtc-services-list > li {
        flex: 0 0 calc(50% - 6px);
        min-width: 0;
    }

    body.newtc .newtc-service {
        width: 100%;
    }

    body.newtc .newtc-services-group,
    body.newtc .newtc-services-group + .newtc-services-group {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

/* 아주 좁은 폭(280px 이하)은 1열 */
@media (max-width: 280px) {
    body.newtc .newtc-services-list > li {
        flex: 0 0 100%;
    }
}

/* ---------- 프로필 업데이트 화면의 체크박스 항목(동의) ---------- */
body.newtc .pf-c-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.newtc .pf-c-check__label {
    margin: 0;
    color: #555555;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}

body.newtc .pf-c-check__input {
    position: static;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
}

/* 읽기 전용 체크박스(휴대폰 인증 여부 등): 수정할 수 없음을 커서로 알린다 */
body.newtc .pf-c-check__input:disabled,
body.newtc .pf-c-check__input:disabled + .pf-c-check__label {
    cursor: default;
}

body.newtc .pf-c-check__input:disabled + .pf-c-check__label {
    color: #888888;
}

/* ---------- 필수 표시(*): 라벨 오른쪽, 붉은색 ----------
   Keycloak 기본 프로필 화면은 <label>라벨</label> * 형태로 별표를 글자로만 넣는다.
   감싸는 영역을 가로로 배치하고 영역 글자색을 붉게 해서 별표만 붉게 보이게 하고, 라벨은 원래 색을 쓴다. */
body.newtc .newtc-label-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0 0 6px;
    color: var(--newtc-required);
    font-weight: 700;
}

body.newtc .newtc-label-wrap > label {
    display: inline;
    margin: 0;
    color: #555555;
}
