/* ============================================================
   누리코리아 UI — 라이트 테마 (토스 블루 기반)
   ============================================================ */
:root {
    --bg:         #ffffff;
    --bg-soft:    #f7f8fa;
    --bg-muted:   #f2f4f7;
    --card:       #ffffff;
    --line:       #eaecef;
    --line-h:     #d1d6de;
    --text:       #191f28;
    --text-dim:   #6b7684;
    --text-mute:  #8b95a1;
    --dim:        #6b7684;

    --accent:     #3182F6;
    --accent-h:   #1b64da;
    --accent-soft:#eef4ff;

    --ok:         #10b981;
    --warn:       #f59e0b;
    --err:        #ef4444;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
    --shadow:    0 2px 8px rgba(0,0,0,.04), 0 0 0 1px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
    --radius:    12px;
    --radius-lg: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; }
b, strong { font-weight: 700; }

/* ============================================================
   네비게이션
   ============================================================ */
.nav {
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-wrap {
    max-width: none;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.logo-mark {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: var(--accent);
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
}
.logo-mark.logo-mark-img {
    background: transparent;
    width: 36px; height: 36px;
}
.logo-mark.logo-mark-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    font-weight: 500;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }
.nav-user { color: var(--text-dim); font-size: 14px; }

/* ============================================================
   버튼
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.btn:hover { border-color: var(--line-h); background: var(--bg-soft); color: var(--text); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-lg { padding: 16px 30px; font-size: 16px; border-radius: 12px; }
.btn-xl { padding: 19px 40px; font-size: 18px; border-radius: 14px; font-weight: 700; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   레이아웃
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; flex: 1; width: 100%; }
.narrow    { max-width: 520px; margin: 72px auto; padding: 0 24px; width: 100%; }
.narrow .card { padding: 40px 36px; border-radius: 18px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
.narrow .card h2 { font-size: 24px; margin-bottom: 18px; font-weight: 800; letter-spacing: -0.02em; }
.narrow .card h2 svg { width: 26px; height: 26px; }
.narrow .card-sub { margin-bottom: 24px; font-size: 14px; }
.narrow .form-row { margin-bottom: 20px; }
.narrow .form-row label { font-size: 14px; margin-bottom: 10px; }
.narrow .form-row input { padding: 14px 16px; font-size: 15px; border-radius: 12px; }
.narrow .btn { padding: 15px 24px; font-size: 15px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.card + .card { margin-top: 20px; }
.card h2 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.card h2 svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 2; fill: none; }
.card-sub { color: var(--text-dim); margin-bottom: 18px; font-size: 14px; }

/* ============================================================
   랜딩 히어로
   ============================================================ */
.landing-hero {
    padding: 100px 24px 80px;
    text-align: center;
    background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
    position: relative;
}
.landing-hero.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.landing-hero.has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--hero-overlay, 0.35));
    z-index: 0;
}
.landing-hero.has-bg > * { position: relative; z-index: 1; }
.landing-hero.has-bg h1,
.landing-hero.has-bg h1 span { color: #fff; }
.landing-hero.has-bg .sub { color: rgba(255,255,255,.92); }
.landing-hero.has-bg .trust { color: rgba(255,255,255,.75); }
.landing-hero.has-bg .tag {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
}
.landing-hero.has-bg .btn:not(.btn-primary) {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
}
.landing-hero.has-bg .btn:not(.btn-primary):hover {
    background: rgba(255,255,255,.25);
    color: #fff;
}
.landing-hero .tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}
.landing-hero h1 {
    font-size: clamp(30px, 5.2vw, 54px);
    line-height: 1.3;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    padding: 0.1em 0;
    word-break: keep-all;
}
.landing-hero h1 span {
    color: var(--accent);
    display: inline-block;
    padding: 0.05em 0;
}
.landing-hero .sub {
    font-size: clamp(16px, 1.8vw, 19px);
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 34px;
    line-height: 1.6;
    letter-spacing: -0.01em;
}
.landing-hero .actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.landing-hero .trust {
    font-size: 13px;
    color: var(--text-mute);
    margin-top: 12px;
}

/* ============================================================
   랜딩 공통 섹션
   ============================================================ */
.section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 14px;
}
.section-head p {
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* 기능 그리드 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.feat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all .2s ease;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feat-card .icon {
    width: 48px; height: 48px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 12px;
    display: grid; place-items: center;
    margin-bottom: 18px;
}
.feat-card .icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.feat-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.feat-card p { color: var(--text-dim); font-size: 15px; line-height: 1.6; }

/* 비교 테이블 */
.compare-wrap { max-width: 980px; margin: 0 auto; overflow-x: auto; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: transparent;
    border: 0;
    font-size: 15px;
}
.compare-table th, .compare-table td {
    padding: 18px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
    background: transparent;
}
.compare-table thead th {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    padding-top: 8px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--line);
}
.compare-table thead th.us { color: var(--accent); }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .us-col { background: var(--accent-soft); }
.compare-table tbody tr:first-child .us-col { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.compare-table tbody tr:last-child .us-col { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.compare-table td:first-child, .compare-table th:first-child {
    text-align: left;
    color: var(--text-dim);
    font-weight: 500;
}
.compare-table .us-col { background: #fcfdff; font-weight: 600; }
.compare-check { color: var(--ok); font-weight: 700; }
.compare-no { color: var(--text-mute); }

/* 가격 카드 */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 860px;
    margin: 0 auto;
}
.price-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    transition: all .2s ease;
}
.price-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.price-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.price-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}
.price-card .desc {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 20px;
}
.price-card .amt {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
}
.price-card .amt .num {
    font-size: 40px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}
.price-card .amt .won { font-size: 18px; font-weight: 700; color: var(--text); }
.price-card .amt .per { color: var(--text-dim); font-size: 14px; margin-left: 4px; }
.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 14px;
}
.price-card ul li {
    padding: 9px 0 9px 26px;
    color: var(--text);
    position: relative;
    line-height: 1.5;
}
.price-card ul li:before {
    content: "";
    position: absolute;
    left: 0; top: 12px;
    width: 16px; height: 16px;
    background: var(--accent-soft);
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233182F6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}
.price-card .btn { width: 100%; }

/* CTA 섹션 */
.cta-section {
    background: var(--accent);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}
.cta-section h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    color: #fff;
}
.cta-section p {
    font-size: 17px;
    color: rgba(255,255,255,.9);
    margin-bottom: 28px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .btn {
    background: #fff;
    color: var(--accent);
    border-color: #fff;
}
.cta-section .btn:hover { background: #f0f4fa; color: var(--accent); }

/* ============================================================
   폼
   ============================================================ */
.form-row { margin-bottom: 18px; }
.form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: all .15s;
    letter-spacing: -0.01em;
}
.form-row textarea { min-height: 80px; resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row .hint { font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.form-row .err { font-size: 12px; color: var(--err); margin-top: 6px; }
.form-row .ok { font-size: 12px; color: var(--ok); margin-top: 6px; }
.sub-input {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: all .15s;
}
.sub-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sub-input input { border: 0 !important; background: transparent !important; flex: 1; box-shadow: none !important; }
.sub-input .suffix {
    padding: 0 14px;
    color: var(--text-dim);
    font-size: 14px;
    white-space: nowrap;
    border-left: 1px solid var(--line);
    background: var(--bg-soft);
    align-self: stretch;
    display: flex;
    align-items: center;
}

/* ============================================================
   알림
   ============================================================ */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
    line-height: 1.55;
}
.alert-err  { background: #fef2f2; border-color: #fee2e2; color: #b91c1c; }
.alert-ok   { background: #ecfdf5; border-color: #d1fae5; color: #047857; }
.alert-info { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }
.alert-warn { background: #fffbeb; border-color: #fef3c7; color: #92400e; }

/* ============================================================
   사이트 카드 (대시보드)
   ============================================================ */
.site-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: all .15s;
}
.site-card + .site-card { margin-top: 12px; }
.site-info b { font-size: 17px; display: block; margin-bottom: 4px; }
.site-info a { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.site-info .meta { color: var(--text-mute); font-size: 12px; margin-top: 6px; }
.site-status {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}
.status-installing { background: #fef3c7; color: #92400e; }
.status-active     { background: #d1fae5; color: #047857; }
.status-failed     { background: #fee2e2; color: #b91c1c; }
.status-suspended  { background: #fee2e2; color: #b91c1c; }
.site-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   모달
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(25,31,40,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.spinner {
    width: 48px; height: 48px;
    margin: 0 auto 16px;
    border: 4px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pulse {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse 1.2s ease-in-out infinite;
    margin-right: 6px;
    vertical-align: middle;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
.progress-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 16px 0; }
.progress-fill { height: 100%; background: var(--accent); transition: width .4s ease; width: 0%; border-radius: 999px; }
.step-list { text-align: left; margin-top: 14px; font-size: 13px; }
.step-list .step {
    padding: 6px 0;
    color: var(--text-dim);
    display: flex; align-items: center; gap: 10px;
}
.step-list .step.done { color: var(--ok); }
.step-list .step.active { color: var(--text); font-weight: 600; }
.step-list .step .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--line);
    flex-shrink: 0;
}
.step-list .step.done .dot { background: var(--ok); }
.step-list .step.active .dot { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }

.cred-box {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    text-align: left;
    font-size: 14px;
}
.cred-box .cred-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
}
.cred-box .cred-row b { color: var(--text-dim); font-weight: 500; font-size: 12px; }
.cred-box .cred-row code {
    background: #fff;
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    user-select: all;
    color: var(--text);
}

/* ============================================================
   푸터
   ============================================================ */
.foot {
    border-top: 1px solid var(--line);
    padding: 32px 24px;
    color: var(--text-mute);
    font-size: 13px;
    background: var(--bg-soft);
    margin-top: auto;
}
.foot-wrap { max-width: 1200px; margin: 0 auto; }
.foot-biz {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 12px;
    color: var(--text-mute);
    margin-bottom: 10px;
    line-height: 1.7;
}
.foot-biz b { font-weight: 600; color: var(--text-dim); }
.foot-links { display: flex; gap: 16px; margin-bottom: 10px; font-size: 13px; }
.foot-links a { color: var(--text-dim); }
.foot-copyright { color: var(--text-mute); font-size: 12px; }

/* ============================================================
   관리자
   ============================================================ */
.adm-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 58px); }
.adm-side { background: var(--bg-soft); border-right: 1px solid var(--line); padding: 24px 0; }
.adm-side a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-dim);
    font-size: 14px;
    border-left: 3px solid transparent;
    font-weight: 500;
}
.adm-side a:hover { color: var(--text); background: rgba(0,0,0,.02); }
.adm-side a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.adm-side a svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.adm-side .sep { border-top: 1px solid var(--line); margin: 16px 20px; }
.adm-side .label {
    padding: 8px 20px;
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}
.adm-main { padding: 32px; max-width: none; background: #fff; }
.adm-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.adm-sub { color: var(--text-dim); margin-bottom: 28px; font-size: 15px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}
.stat .lbl { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat .val { font-size: 28px; font-weight: 800; margin-top: 6px; color: var(--text); letter-spacing: -0.02em; }
.stat .val.ok   { color: var(--ok); }
.stat .val.warn { color: var(--warn); }
.stat .val.err  { color: var(--err); }
.stat .sub      { color: var(--text-mute); font-size: 12px; margin-top: 4px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--bg-soft);
}
.tbl tr:hover td { background: rgba(49,130,246,.03); }
.tbl code {
    background: var(--bg-soft);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
}
.tbl .tools { display: flex; gap: 6px; justify-content: flex-end; }
.tbl .btn { padding: 6px 12px; font-size: 12px; }

.badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.badge-active     { background: #d1fae5; color: #047857; }
.badge-installing { background: #fef3c7; color: #92400e; }
.badge-failed     { background: #fee2e2; color: #b91c1c; }
.badge-suspended  { background: #fee2e2; color: #b91c1c; }
.badge-deleted    { background: var(--bg-muted); color: var(--text-dim); }
.badge-admin      { background: var(--accent); color: #fff; }

/* ============================================================
   유틸
   ============================================================ */
.text-center { text-align: center; }
.text-dim    { color: var(--text-dim); }
.text-mute   { color: var(--text-mute); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 24px; }

/* ============================================================
   반응형
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100%; }
img, video { max-width: 100%; height: auto; }

/* SVG 기본 크기 — 명시 안된 건 아이콘 크기로 */
svg:not([width]):not([height]) { width: 1.2em; height: 1.2em; flex-shrink: 0; }

/* 모든 요소 박스싱 */
*, *::before, *::after { min-width: 0; }

/* 긴 텍스트 줄바꿈 */
code, a { overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 960px) {
    .adm-shell { grid-template-columns: 1fr; }
    .adm-side  { display: none; }
    .adm-main  { padding: 20px; }
}

@media (max-width: 720px) {
    /* 네비 */
    .nav-wrap { padding: 12px 16px; }
    .nav-links { gap: 10px; font-size: 13px; }
    .nav-links a, .nav-user { font-size: 13px; }
    .nav-user { display: none; }
    .logo { font-size: 16px; gap: 8px; }
    .logo-mark { width: 28px; height: 28px; }
    .logo-mark.logo-mark-img { width: 28px; height: 28px; }
    .logo-mark svg { width: 14px; height: 14px; }

    /* 히어로 (모바일 - has-bg) */
    .landing-hero.has-bg { min-height: 420px; }

    /* 컨테이너 */
    .container { padding: 20px 16px; }
    .narrow    { margin: 40px auto; padding: 0 16px; }

    /* 히어로 */
    .landing-hero { padding: 60px 18px 48px; }
    .landing-hero h1 { font-size: clamp(26px, 8vw, 36px); }
    .landing-hero .sub { font-size: 15px; }
    .landing-hero .actions .btn { width: 100%; }
    .landing-hero .actions { flex-direction: column; gap: 8px; }

    /* 섹션 */
    .section { padding: 50px 18px; }
    .section-head { margin-bottom: 32px; }
    .section-head h2 { font-size: clamp(22px, 6vw, 30px); }
    .section-head p { font-size: 15px; }

    /* 그리드 */
    .features-grid,
    .pricing-grid,
    .stat-grid { grid-template-columns: 1fr; }
    .feat-card, .price-card { padding: 22px; }

    /* 비교 테이블 - 잘림 방지 (min-width 제거, 셀 크기 축소) */
    .compare-wrap {
        margin-left: -4px;
        margin-right: -4px;
    }
    .compare-table {
        font-size: 12px;
        table-layout: fixed;
        width: 100%;
    }
    .compare-table th, .compare-table td {
        padding: 10px 4px;
        word-break: keep-all;
        line-height: 1.4;
    }
    .compare-table thead th { font-size: 12px; }
    .compare-table td:first-child, .compare-table th:first-child {
        padding-left: 8px;
        font-size: 12px;
    }

    /* 카드 */
    .card { padding: 20px; border-radius: 14px; }
    .card h2 { font-size: 17px; }

    /* 폼 */
    .form-row input, .form-row select, .form-row textarea { font-size: 16px; } /* iOS 자동 줌 방지 */

    /* CTA 섹션 */
    .cta-section { padding: 60px 20px; }
    .cta-section .btn { width: 100%; }

    /* 버튼 */
    .btn-xl { padding: 16px 24px; font-size: 16px; }
    .btn-lg { padding: 14px 22px; font-size: 15px; }

    /* 사이트 카드 (대시보드) */
    .site-card { padding: 18px; }
    .site-card > div:first-child { flex-direction: column; align-items: flex-start !important; }
    .site-status { align-self: flex-start; }
    .site-actions { width: 100%; }
    .site-actions .btn { flex: 1; }

    /* 관리자 테이블 - 가로 스크롤 */
    .adm-main .card .tbl {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .adm-main { padding: 16px; }
    .adm-title { font-size: 22px; }

    /* 가격 카드 */
    .price-card .amt .num { font-size: 34px; }

    /* 모달 */
    .modal-box { padding: 22px; max-width: calc(100vw - 32px); }

    /* 푸터 */
    .foot { padding: 24px 18px; }
    .foot-biz { gap: 4px 12px; font-size: 11px; }

    /* 다운로드 버튼 줄바꿈 */
    .btn { white-space: normal; }
}

/* ============================================================
   사용량 미터 (대시보드)
   ============================================================ */
.quota-box {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}
.quota-plan {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 11px;
}
.quota-updated { color: var(--text-mute); }
.quota-row { margin-bottom: 10px; }
.quota-row:last-child { margin-bottom: 0; }
.quota-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.quota-label b { color: var(--text); font-weight: 700; }
.quota-bar {
    height: 8px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ok), #4ade80);
    border-radius: 999px;
    transition: width .4s ease;
}
.quota-fill.q-warn { background: linear-gradient(90deg, var(--warn), #fbbf24); }
.quota-fill.q-full { background: linear-gradient(90deg, var(--err), #f87171); }
.quota-warn {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(251,191,36,.12);
    border: 1px solid rgba(251,191,36,.4);
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}
body.dark .quota-warn {
    background: rgba(251,191,36,.1);
    color: #fcd34d;
}
body.dark .quota-box {
    background: rgba(255,255,255,.03);
    border-color: var(--line);
}

/* ============================================================
   마이누리 다운로드 카드
   ============================================================ */
.download-card {
    background: linear-gradient(135deg, #eef4ff 0%, #f7faff 100%);
    border: 1px solid #bfd5ff;
}
.download-card .download-title {
    color: #1b64da;
    font-size: 18px;
    font-weight: 700;
}
.download-card .download-title svg { stroke: #1b64da; }
.download-card .download-sub {
    color: #3b5680;
    margin-bottom: 18px;
}
.download-card .download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.download-card .download-hint {
    font-size: 13px;
    color: #3b5680;
    font-weight: 500;
}

body.dark .download-card {
    background: linear-gradient(135deg, rgba(106,162,255,.18) 0%, rgba(106,162,255,.08) 100%);
    border-color: rgba(106,162,255,.4);
}
body.dark .download-card .download-title { color: #bcd4ff; }
body.dark .download-card .download-title svg { stroke: #bcd4ff; }
body.dark .download-card .download-sub { color: #c8d5eb; }
body.dark .download-card .download-hint { color: #a8bddc; }

/* ============================================================
   DNS 가이드 박스 (도메인 연결 모달 내부)
   ============================================================ */
.dns-guide {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
}
.dns-guide .dns-guide-title {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
}
.dns-guide ol {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.9;
}
.dns-guide ol li b { color: #ffffff; }
.dns-guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
    background: rgba(255,255,255,.03);
    border-radius: 6px;
    overflow: hidden;
}
.dns-guide-table th,
.dns-guide-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #e2e8f0;
}
.dns-guide-table th {
    background: rgba(255,255,255,.06);
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
}
.dns-guide-table tr:last-child td { border-bottom: 0; }
.dns-guide-table code {
    background: rgba(255,255,255,.1);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12px;
}

/* ============================================================
   다크모드 토글 (공개 페이지 전용)
   ============================================================ */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.theme-toggle:hover { background: var(--bg-soft); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.theme-toggle .icon-moon { display: none; }
body.dark .theme-toggle .icon-sun  { display: none; }
body.dark .theme-toggle .icon-moon { display: inline-block; }

body.dark {
    --bg:         #0f1218;
    --bg-soft:    #151a23;
    --bg-muted:   #1c2230;
    --card:       #151a23;
    --line:       #232a38;
    --line-h:     #2e3647;
    --text:       #e7ecf5;
    --text-dim:   #9aa5b5;
    --text-mute:  #6b7684;
    --accent:     #6aa2ff;
    --accent-h:   #4b8aef;
    --accent-soft:rgba(106,162,255,.12);
}
body.dark { background: var(--bg); color: var(--text); }
body.dark .nav { background: rgba(15,18,24,.85); border-bottom-color: var(--line); }
body.dark .landing-hero { background: linear-gradient(180deg, #0c0f15 0%, var(--bg) 100%); }
body.dark .landing-hero h1 { color: #f1f5f9; }
body.dark .landing-hero h1 span { color: #6aa2ff; }
body.dark .landing-hero .sub { color: #9aa5b5; }
body.dark .landing-hero .trust { color: #6b7684; }
body.dark .landing-hero .tag { background: rgba(106,162,255,.15); color: #6aa2ff; border: 1px solid rgba(106,162,255,.3); }
body.dark .section-head h2 { color: #f1f5f9; }
body.dark .section-head p { color: #9aa5b5; }
body.dark .feat-card h3 { color: #f1f5f9; }
body.dark .feat-card p { color: #9aa5b5; }
body.dark .feat-card .icon { background: rgba(106,162,255,.12); color: #6aa2ff; }
body.dark .price-card h3 { color: #f1f5f9; }
body.dark .price-card .desc { color: #9aa5b5; }
body.dark .price-card .amt .num { color: #f1f5f9; }
body.dark .price-card .amt .won { color: #f1f5f9; }
body.dark .price-card .amt .per { color: #9aa5b5; }
body.dark .price-card ul li { color: #e7ecf5; }
body.dark .narrow .card { box-shadow: 0 4px 24px rgba(0,0,0,.3); }
body.dark .section-alt { background: #0c0f15; }
body.dark .cta-section { background: #1e3a8a; }
body.dark .foot { background: #0c0f15; border-top-color: var(--line); }
body.dark .card { background: var(--card); border-color: var(--line); }
body.dark .feat-card { background: var(--card); border-color: var(--line); }
body.dark .feat-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.4); }
body.dark .compare-table { background: transparent; border: 0; }
body.dark .compare-table thead th { background: transparent; color: var(--text); border-bottom-color: var(--line); }
body.dark .compare-table thead th.us { background: transparent; color: #6aa2ff; }
body.dark .compare-table th, body.dark .compare-table td { border-bottom-color: var(--line); background: transparent; }
body.dark .compare-table .us-col { background: rgba(106,162,255,.1); }
body.dark .compare-no { color: var(--text-mute); }
body.dark .price-card { background: var(--card); border-color: var(--line); }
body.dark .price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.dark .btn {
    background: var(--bg-muted);
    color: var(--text);
    border-color: var(--line);
}
body.dark .btn:hover { background: var(--line); border-color: var(--line-h); color: var(--text); }
body.dark .btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
body.dark .btn-ghost:hover { background: var(--bg-muted); color: var(--text); }
body.dark .form-row input,
body.dark .form-row select,
body.dark .form-row textarea {
    background: var(--bg-muted);
    border-color: var(--line);
    color: var(--text);
}
body.dark .form-row input:focus,
body.dark .form-row select:focus,
body.dark .form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(106,162,255,.15);
}
body.dark .sub-input { background: var(--bg-muted); border-color: var(--line); }
body.dark .sub-input .suffix { background: var(--bg-soft); border-left-color: var(--line); }
body.dark .alert-err  { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); color: #fca5a5; }
body.dark .alert-ok   { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.3); color: #6ee7b7; }
body.dark .alert-info { background: rgba(106,162,255,.08); border-color: rgba(106,162,255,.3); color: #93c5fd; }
body.dark .site-card { background: var(--card); border-color: var(--line); }
body.dark .tbl th { background: var(--bg-soft); }
body.dark .tbl th, body.dark .tbl td { border-bottom-color: var(--line); }
body.dark .tbl tr:hover td { background: rgba(106,162,255,.05); }
body.dark .tbl code { background: var(--bg-muted); color: var(--text); }
body.dark .foot-biz b { color: var(--text-dim); }
body.dark .modal-box { background: var(--card); border: 1px solid var(--line); }
body.dark .cred-box { background: #0a0f1d; border-color: var(--line); }
body.dark .cred-box code { background: var(--bg-muted); color: var(--text); }
body.dark .progress-bar { background: var(--line); }

@media (max-width: 420px) {
    .landing-hero h1 { font-size: 26px; }
    .landing-hero .sub { font-size: 14px; }
    .landing-hero.has-bg { min-height: 360px; }
    .compare-table { font-size: 11px; }
    .compare-table th, .compare-table td { padding: 8px 2px; }
    .compare-table td:first-child, .compare-table th:first-child { padding-left: 6px; }
    .card { padding: 16px; }
    .nav-wrap { padding: 10px 14px; }
    .nav-links { gap: 8px; }
    .nav-links .btn { padding: 8px 12px; font-size: 13px; }
    .logo { font-size: 15px; gap: 6px; }
    .logo-mark { width: 26px; height: 26px; }
    .logo-mark.logo-mark-img { width: 26px; height: 26px; }
    .logo-mark svg { width: 13px; height: 13px; }
    .tag { font-size: 11px; padding: 5px 10px; }
    .price-card { padding: 20px 16px; }
    .stat { padding: 16px; }
    .stat .val { font-size: 24px; }
}
