/**
 * Class check 공개 페이지 스타일
 * 모바일 우선, 심플한 디자인
 *
 * @package ClassCheck
 */

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.cc-public {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
                 "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.cc-public a {
    color: #1E88E5;
    text-decoration: none;
}

body.cc-public a:hover {
    text-decoration: underline;
}

/* ===== Header ===== */
.cc-header {
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cc-header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-logo {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50 !important;
    text-decoration: none !important;
}

.cc-nav {
    display: flex;
    gap: 12px;
}

.cc-nav a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.cc-nav-login {
    color: #1E88E5 !important;
}

.cc-nav-signup {
    background: #1E88E5;
    color: #fff !important;
}

.cc-nav-signup:hover {
    background: #0D47A1;
    text-decoration: none !important;
}

/* ===== Main ===== */
.cc-main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ===== Footer ===== */
.cc-footer {
    background: #fff;
    border-top: 1px solid #e0e6ed;
    padding: 20px;
    margin-top: 40px;
}

.cc-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
    color: #7a8899;
}

.cc-footer-links {
    margin-bottom: 8px;
}

.cc-footer-links a {
    color: #7a8899 !important;
}

.cc-sep {
    margin: 0 8px;
}

/* ===== Landing ===== */
.cc-landing {
    max-width: 700px;
    margin: 0 auto;
}

.cc-hero {
    text-align: center;
    padding: 40px 0;
}

.cc-hero-title {
    font-size: 32px;
    line-height: 1.4;
    margin: 0 0 16px;
    font-weight: 400;
    color: #2c3e50;
}

.cc-hero-title strong {
    color: #1E88E5;
    font-weight: 700;
}

.cc-hero-desc {
    font-size: 16px;
    color: #5a6a7a;
    margin: 0 0 28px;
}

.cc-hero-cta {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features */
.cc-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.cc-feature {
    background: #fff;
    padding: 24px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cc-feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.cc-feature h3 {
    margin: 10px 0 6px;
    font-size: 16px;
}

.cc-feature p {
    margin: 0;
    font-size: 13px;
    color: #7a8899;
}

/* Privacy notice */
.cc-privacy-notice {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 4px solid #1E88E5;
}

.cc-privacy-notice h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #1565C0;
}

.cc-privacy-notice p {
    margin: 0;
    font-size: 14px;
    color: #37474f;
}

/* ===== Form ===== */
.cc-form-container {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cc-page-title {
    margin: 0 0 4px;
    font-size: 24px;
    text-align: center;
}

.cc-page-desc {
    margin: 0 0 24px;
    text-align: center;
    color: #7a8899;
    font-size: 14px;
}

.cc-form .cc-field {
    margin-bottom: 16px;
}

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

.cc-form input[type="text"],
.cc-form input[type="email"],
.cc-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d5dce3;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.cc-form input:focus {
    outline: none;
    border-color: #1E88E5;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.1);
}

.cc-form input:invalid:not(:placeholder-shown) {
    border-color: #e57373;
}

.cc-field-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8b98a8;
}

/* Agreements */
.cc-agreements {
    background: #f5f7fa;
    padding: 14px;
    border-radius: 8px;
    margin: 20px 0;
}

.cc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: 13px;
    font-weight: normal !important;
    cursor: pointer;
}

.cc-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Messages */
.cc-form-message {
    margin: 16px 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cc-form-message:empty {
    display: none;
}

.cc-msg-error {
    padding: 12px 14px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    border-left: 4px solid #e53935;
}

.cc-msg-success {
    padding: 12px 14px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    border-left: 4px solid #43a047;
}

/* Form links */
.cc-form-link,
.cc-form-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #7a8899;
}

.cc-form-links {
    margin: 12px 0;
}

/* ===== Buttons ===== */
.cc-btn {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s;
    background: transparent;
}

.cc-btn-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.cc-btn-primary {
    background: #1E88E5;
    color: #fff !important;
    border-color: #1E88E5;
}

.cc-btn-primary:hover:not(:disabled) {
    background: #0D47A1;
    border-color: #0D47A1;
}

.cc-btn-primary:disabled {
    background: #bdbdbd;
    border-color: #bdbdbd;
    color: #fff !important;
    cursor: not-allowed;
}

.cc-btn-outline {
    background: transparent;
    color: #1E88E5 !important;
    border-color: #1E88E5;
}

.cc-btn-outline:hover {
    background: #1E88E5;
    color: #fff !important;
}

.cc-btn-danger {
    background: #fff;
    color: #e53935 !important;
    border-color: #e53935;
}

.cc-btn-danger:hover {
    background: #e53935;
    color: #fff !important;
}

/* ===== Center Box (인증 완료 등) ===== */
.cc-center-box {
    text-align: center;
    padding: 20px 0;
}

.cc-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #43a047;
    font-size: 36px;
    margin-bottom: 16px;
}

/* ===== Document (terms, privacy) ===== */
.cc-document {
    background: #fff;
    padding: 30px 30px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 780px;
    margin: 0 auto;
}

.cc-document h1 {
    font-size: 26px;
    margin: 0 0 4px;
    color: #2c3e50;
}

.cc-document h2 {
    font-size: 19px;
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e6ed;
    color: #2c3e50;
}

.cc-document h3 {
    font-size: 16px;
    margin: 20px 0 8px;
    color: #2c3e50;
}

.cc-document p {
    margin: 10px 0;
    color: #37474f;
}

.cc-document p strong {
    color: #1565C0;
}

.cc-document hr {
    border: 0;
    border-top: 1px solid #e0e6ed;
    margin: 24px 0;
}

.cc-document ul,
.cc-document ol {
    margin: 10px 0;
    padding-left: 24px;
}

.cc-document li {
    margin: 4px 0;
    color: #37474f;
}

.cc-document table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.cc-document table th,
.cc-document table td {
    padding: 8px 12px;
    border: 1px solid #e0e6ed;
    text-align: left;
}

.cc-document table th {
    background: #f5f7fa;
    font-weight: 600;
}

.cc-document code {
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.cc-document-meta {
    font-size: 13px;
    color: #8b98a8;
    text-align: right;
}

/* ===== Home (로그인 후) ===== */
.cc-home-container {
    max-width: 700px;
    margin: 0 auto;
}

.cc-home-header {
    text-align: center;
    margin-bottom: 30px;
}

.cc-notice {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.cc-notice-info {
    background: #e3f2fd;
    border-left: 4px solid #1E88E5;
    color: #0d47a1;
}

.cc-notice p {
    margin: 6px 0 0;
    font-size: 14px;
    color: #37474f;
}

.cc-section {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cc-section h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.cc-info-box {
    background: #f5f7fa;
    padding: 14px;
    border-radius: 8px;
}

table.cc-kv {
    width: 100%;
    border-collapse: collapse;
}

table.cc-kv th {
    text-align: left;
    padding: 6px 10px 6px 0;
    color: #7a8899;
    font-weight: 500;
    font-size: 14px;
    width: 100px;
    vertical-align: top;
}

table.cc-kv td {
    padding: 6px 0;
    font-size: 14px;
    word-break: break-all;
}

.cc-sessions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cc-sessions li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e6ed;
    font-size: 14px;
}

.cc-sessions li:last-child {
    border-bottom: 0;
}

.cc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.cc-actions .cc-btn {
    flex: 1;
    min-width: 150px;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .cc-header-inner {
        padding: 12px 16px;
    }

    .cc-main {
        padding: 20px 16px;
    }

    .cc-hero-title {
        font-size: 26px;
    }

    .cc-form-container {
        padding: 24px 20px;
    }

    .cc-document {
        padding: 20px;
    }

    .cc-document h1 {
        font-size: 22px;
    }

    .cc-document h2 {
        font-size: 17px;
    }

    .cc-document table {
        font-size: 13px;
    }

    .cc-document table th,
    .cc-document table td {
        padding: 6px 8px;
    }

    .cc-hero-cta {
        flex-direction: column;
    }

    .cc-hero-cta .cc-btn {
        width: 100%;
    }

    .cc-actions {
        flex-direction: column;
    }

    .cc-actions .cc-btn {
        width: 100%;
    }

    table.cc-kv th {
        width: 70px;
        font-size: 13px;
    }

    table.cc-kv td {
        font-size: 13px;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== 로그인 상태 랜딩 페이지 ===== */
.cc-landing-user {
    max-width: 720px;
    margin: 0 auto;
}

.cc-welcome-hero {
    background: linear-gradient(135deg, #1E88E5 0%, #0D47A1 100%);
    color: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
    margin-bottom: 24px;
}

.cc-welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cc-welcome-title {
    font-size: 26px;
    margin: 0 0 8px;
    color: #fff;
    font-weight: 600;
}

.cc-welcome-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px;
}

.cc-btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.cc-welcome-hero .cc-btn-primary {
    background: #fff;
    color: #0D47A1 !important;
    border-color: #fff;
}

.cc-welcome-hero .cc-btn-primary:hover {
    background: #f0f4f8;
    border-color: #f0f4f8;
}

.cc-section-subtitle {
    font-size: 15px;
    color: #5a6a7a;
    margin: 24px 0 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* 빠른 상태 그리드 */
.cc-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cc-status-item {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #e0e6ed;
    text-align: center;
    transition: all 0.15s;
}

.cc-status-item.cc-status-ok {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.cc-status-item.cc-status-warning {
    background: #fff8e1;
    border-color: #ffe082;
}

.cc-status-item.cc-status-error {
    background: #ffebee;
    border-color: #ef9a9a;
}

.cc-status-item.cc-status-info {
    background: #e3f2fd;
    border-color: #90caf9;
}

.cc-status-icon {
    font-size: 24px;
    margin-bottom: 6px;
    font-weight: 600;
}

.cc-status-ok .cc-status-icon {
    color: #2e7d32;
}

.cc-status-warning .cc-status-icon {
    color: #f57c00;
}

.cc-status-error .cc-status-icon {
    color: #c62828;
}

.cc-status-label {
    font-size: 12px;
    color: #7a8899;
    margin-bottom: 4px;
    font-weight: 500;
}

.cc-status-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
    word-break: break-all;
}

/* 바로가기 카드 그리드 */
.cc-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cc-nav-card {
    background: #fff;
    padding: 20px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    text-decoration: none !important;
    text-align: center;
    transition: all 0.15s;
    border: 1px solid #e0e6ed;
    color: #2c3e50 !important;
    display: block;
}

.cc-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
    border-color: #1E88E5;
    text-decoration: none !important;
}

.cc-nav-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.cc-nav-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
}

.cc-nav-desc {
    font-size: 12px;
    color: #7a8899;
    line-height: 1.4;
}

/* 모바일 대응 */
@media (max-width: 600px) {
    .cc-welcome-hero {
        padding: 32px 20px;
    }
    
    .cc-welcome-title {
        font-size: 22px;
    }
    
    .cc-welcome-icon {
        font-size: 40px;
    }
    
    .cc-status-grid,
    .cc-nav-grid {
        grid-template-columns: 1fr;
    }
}


/* ─────────────────────────────────────────────────────
   v1.4.0: 앱 런치 카드 (/class-check/home 에서 사용)
   ───────────────────────────────────────────────────── */
.cc-app-launch-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border: 1px solid #90caf9;
}
.cc-app-launch-icon {
    font-size: 44px;
    flex-shrink: 0;
}
.cc-app-launch-body {
    flex: 1;
    min-width: 0;
}
.cc-app-launch-body h2 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #1565c0;
}
.cc-app-launch-body p {
    margin: 0;
    color: #0D47A1;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .cc-app-launch-card {
        flex-wrap: wrap;
    }
    .cc-app-launch-card .cc-btn {
        width: 100%;
    }
}
