@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;800&display=swap');

:root {
    --omc-bg: #faf9f5;
    --omc-bg-soft: #f5f4ed;
    --omc-bg-hero: #262624;
    --omc-ink: #1f1e1d;
    --omc-muted: #73726c;
    --omc-line: #dedcd1;
    --omc-gold-strong: #ac5c42;
    --omc-surface: #dedcd1;
    --omc-accent-beige: #e3dacc;
    --omc-hero-text: #f0eee6;
    --omc-hero-muted: #9c9a92;
    --host-bg: #f6f8f7;
    --host-surface: #ffffff;
    --host-ink: #17211c;
    --host-muted: #627069;
    --host-line: #d9e0dc;
    --host-primary: #126d57;
    --host-primary-dark: #0b4b3d;
    --host-accent: #d28a30;
    --host-soft: #e8f1ed;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: linear-gradient(180deg, var(--omc-bg) 0%, var(--omc-bg-soft) 100%);
    color: var(--omc-ink);
    font-family: "SF Pro Text", "SF Pro Display", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.host-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.host-loading {
    padding: 5rem 1.5rem;
    text-align: center;
    color: var(--host-muted);
}

.portal-boot-loading {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 16%, rgba(18, 109, 87, 0.12), transparent 30%),
        linear-gradient(180deg, var(--host-bg) 0%, #eef3f0 100%);
    color: var(--host-ink);
}

.portal-boot-loading__panel {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    text-align: center;
}

.portal-boot-loading__mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 8px;
    background: var(--host-primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
}

.portal-boot-loading__eyebrow {
    margin: 6px 0 0;
    color: var(--host-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-boot-loading__title {
    margin: 0;
    color: var(--host-ink);
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    line-height: 1.35;
    font-weight: 800;
}

.portal-boot-loading__progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--host-line);
}

.portal-boot-loading__progress-bar {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--host-primary) 0%, var(--host-accent) 100%);
    animation: portal-boot-loading-slide 1.15s ease-in-out infinite;
}

.portal-boot-loading__caption {
    margin: 0;
    color: var(--host-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

@keyframes portal-boot-loading-slide {
    0% {
        transform: translateX(-110%);
    }
    50% {
        transform: translateX(80%);
    }
    100% {
        transform: translateX(270%);
    }
}

.host-header,
.host-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
}

.host-brand,
.host-nav,
.host-footer {
    text-decoration: none;
}

.host-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
}

.host-brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--host-primary);
    color: #fff;
    letter-spacing: 0;
}

.host-brand__copy {
    color: var(--host-muted);
    font-size: 0.95rem;
}

.host-nav {
    display: flex;
    gap: 1rem;
    color: var(--host-muted);
    font-weight: 700;
}

.host-nav a,
.host-footer a {
    text-decoration: none;
}

main {
    flex: 1;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.host-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 3rem;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
}

.host-hero__content h1,
.host-section__heading h1,
.host-section__heading h2 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: 0;
}

.host-hero__content h1 {
    max-width: 780px;
    font-size: clamp(2.4rem, 5vw, 5rem);
}

.host-hero__lead,
.host-section__heading p {
    color: var(--host-muted);
    line-height: 1.7;
}

.host-hero__lead {
    max-width: 720px;
    font-size: 1.08rem;
}

.host-eyebrow {
    margin: 0 0 0.8rem;
    color: var(--host-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.host-hero__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.host-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.1rem;
    border: 1px solid var(--host-line);
    border-radius: 6px;
    background: #fff;
    color: var(--host-ink);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.host-button--primary {
    border-color: var(--host-primary);
    background: var(--host-primary);
    color: #fff;
}

.host-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.host-hero__panel,
.host-inquiry-form,
.host-role-grid article,
.host-process li {
    border: 1px solid var(--host-line);
    border-radius: 8px;
    background: var(--host-surface);
    box-shadow: 0 20px 60px rgba(23, 33, 28, 0.08);
}

.host-hero__panel {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.host-hero__panel div {
    padding: 1.45rem;
    border-bottom: 1px solid var(--host-line);
}

.host-hero__panel div:last-child {
    border-bottom: 0;
}

.host-hero__panel span,
.host-process span {
    color: var(--host-accent);
    font-weight: 800;
}

.host-hero__panel strong,
.host-role-grid strong {
    display: block;
    margin-top: 0.25rem;
}

.host-hero__panel p,
.host-role-grid p,
.host-process p {
    margin: 0.55rem 0 0;
    color: var(--host-muted);
    line-height: 1.6;
}

.host-section,
.host-form-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.host-section__heading {
    max-width: 760px;
    margin-bottom: 1.8rem;
}

.host-section__heading h1,
.host-section__heading h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    color: var(--host-ink);
}

.host-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.host-role-grid article {
    padding: 1.35rem;
}

.host-role-grid h3,
.host-process h2 {
    margin: 0;
    color: var(--host-ink);
}

.host-inquiry-form {
    display: grid;
    gap: 1.25rem;
    max-width: 920px;
    padding: 1.5rem;
}

.host-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.host-field {
    display: grid;
    gap: 0.45rem;
    color: var(--host-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.host-field input,
.host-field textarea {
    width: 100%;
    border: 1px solid var(--host-line);
    border-radius: 6px;
    background: #fbfcfb;
    color: var(--host-ink);
    padding: 0.85rem 0.95rem;
    outline: none;
}

.host-field input:focus,
.host-field textarea:focus {
    border-color: var(--host-primary);
    box-shadow: 0 0 0 3px rgba(18, 109, 87, 0.14);
}

.host-message {
    max-width: 920px;
    margin-bottom: 1rem;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.host-message strong {
    color: var(--host-ink);
}

.host-message--success {
    background: var(--host-soft);
    color: var(--host-primary-dark);
}

.host-message--error {
    background: #fff1ec;
    color: #9d381b;
}

.host-muted {
    color: var(--host-muted);
}

.host-auth-form {
    display: grid;
    gap: 1.1rem;
    max-width: 460px;
    border: 1px solid var(--host-line);
    border-radius: 8px;
    background: var(--host-surface);
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(23, 33, 28, 0.08);
}

.host-portal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--host-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 42px rgba(23, 33, 28, 0.06);
}

.host-portal-identity {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.host-portal-identity-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--host-primary);
}

.host-portal-identity strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 800;
    color: var(--host-ink);
}

.host-portal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.host-portal-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.host-portal-metrics article,
.host-list article,
.host-account-list li {
    border: 1px solid var(--host-line);
    border-radius: 8px;
    background: var(--host-surface);
    padding: 1.25rem;
    box-shadow: 0 16px 42px rgba(23, 33, 28, 0.06);
}

.host-portal-metrics span,
.host-list span,
.host-account-list span {
    color: var(--host-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.host-portal-metrics strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 2rem;
    line-height: 1;
}

.host-list,
.host-account-list {
    display: grid;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.host-list article {
    display: grid;
    gap: 0.5rem;
}

.host-list-card {
    display: grid;
    gap: 0.9rem;
}

.host-list-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.host-list-card__header strong {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.05rem;
    color: var(--host-ink);
}

.host-list-card__timestamp {
    color: var(--host-muted);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.host-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    background: rgba(18, 109, 87, 0.12);
    color: var(--host-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.host-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.host-detail-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.host-detail-grid div {
    display: grid;
    gap: 0.3rem;
}

.host-detail-grid span,
.host-summary-grid span {
    color: var(--host-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.host-detail-grid p,
.host-summary-grid strong {
    margin: 0;
    color: var(--host-ink);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.host-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.host-card-actions--start {
    justify-content: flex-start;
}

.host-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.host-summary-grid article,
.host-account-grid div {
    border: 1px solid var(--host-line);
    border-radius: 8px;
    background: var(--host-surface);
    padding: 1.25rem;
    box-shadow: 0 16px 42px rgba(23, 33, 28, 0.06);
}

.host-summary-grid strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.4rem;
}

.host-empty-state {
    display: grid;
    gap: 0.8rem;
    justify-items: flex-start;
    padding: 1.4rem;
    border: 1px dashed var(--host-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--host-muted);
}

.host-empty-state strong {
    color: var(--host-ink);
}

.host-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-account-grid dt {
    color: var(--host-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.host-account-grid dd {
    margin: 0.4rem 0 0;
    color: var(--host-ink);
    font-size: 1rem;
    font-weight: 700;
}

.host-domain-chip-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.host-domain-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.1rem 0.7rem;
    border: 1px solid var(--host-line);
    border-radius: 999px;
    background: var(--host-surface);
    color: var(--host-ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.host-domain-chip--requested {
    background: #f3ede1;
    border-color: #e2cfaa;
    color: #83561b;
}

.host-domain-chip--pending {
    background: #eef4f1;
    border-color: #c9d9d1;
    color: #406255;
}

.host-domain-chip--ready {
    background: #e4f3ec;
    border-color: #b8dacb;
    color: var(--host-primary-dark);
}

.host-list h3,
.host-account-list p {
    margin: 0;
}

.host-account-list strong {
    display: block;
    margin-top: 0.25rem;
}

.host-process {
    display: grid;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.host-process li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 1rem;
    padding: 1.35rem;
}

.host-loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    color: var(--host-muted);
    font-weight: 800;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    padding: 0.8rem 1rem;
    background: #fff1ec;
    color: #9d381b;
    z-index: 1000;
}

@media (max-width: 820px) {
    .host-header,
    .host-footer,
    .host-hero__actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .host-hero,
    .host-role-grid,
    .host-form-grid,
    .host-portal-metrics,
    .host-summary-grid,
    .host-detail-grid,
    .host-account-grid {
        grid-template-columns: 1fr;
    }

    .host-portal-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .host-portal-actions {
        justify-content: stretch;
    }

    .host-portal-actions .host-button {
        width: 100%;
    }

    .host-list-card__header {
        flex-direction: column;
    }

    .host-list-card__timestamp {
        white-space: normal;
    }

    .host-hero {
        gap: 2rem;
        padding-top: 2.5rem;
    }
}
