:root {
    --bg-top: #f7f7f7;
    --bg-bottom: #d9d9d9;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-border: rgba(0, 0, 0, 0.1);
    --text: #111111;
    --muted: #5a5a5a;
    --accent: #111111;
    --accent-strong: #000000;
    --warning-bg: #f1f1f1;
    --warning-text: #111111;
    --error-bg: #ececec;
    --error-text: #111111;
    --info-bg: rgba(0, 0, 0, 0.06);
    --info-text: #111111;
    --success-bg: #efefef;
    --success-text: #111111;
    --soft-bg: rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Pretendard", "Noto Sans KR", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 35%),
        linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
}

body.page-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.shell {
    width: 100%;
}

.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.hero {
    padding: 32px 32px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0));
}

.eyebrow {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 16px 0 10px;
    font-size: 34px;
    line-height: 1.1;
}

.lead {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.content {
    padding: 0 32px 32px;
}

.notice {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.notice.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.notice.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.notice.info {
    background: var(--info-bg);
    color: var(--info-text);
}

.message-list {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.message-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.08);
    word-break: break-word;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.action-link:hover {
    text-decoration: none;
}

.ghost-link,
.ghost {
    color: var(--muted);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-size: 14px;
    font-weight: 700;
}

.hint,
.helper {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

input[type="text"],
input[type="password"],
input[type="url"] {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="url"]:focus {
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

button,
input[type="submit"] {
    appearance: none;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    white-space: nowrap;
}

button:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.choice-group {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.82);
}

.choice input {
    margin-top: 3px;
}

.choice strong {
    display: block;
    margin-bottom: 4px;
}

pre.snippet {
    margin: 16px 0 0;
    padding: 16px 18px;
    border-radius: 16px;
    background: #111111;
    color: #f5f5f5;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

body.page-install .shell,
body.page-home .shell {
    max-width: 760px;
}

body.page-admin-login .shell {
    max-width: 520px;
}

body.page-admin-console .shell {
    max-width: 980px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.domain-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #111111;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.domain-badge strong {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.domain-badge span {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-all;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7a1c1c, #4a0000);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(74, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}

.logout-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(74, 0, 0, 0.24);
    text-decoration: none;
}

.form-card,
.list-card,
.url-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
}

.form-card,
.list-card {
    padding: 20px;
}

.form-card {
    margin-bottom: 20px;
}

.url-item {
    margin: 12px 0;
    padding: 18px;
    position: relative;
    word-wrap: break-word;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 244, 0.94));
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.error {
    color: var(--error-text);
    margin: 0 0 20px;
    padding: 16px 18px;
    background: var(--error-bg);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.error.is-hidden {
    display: none;
}

.short-link {
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.top-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.top-form-grid.compact {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: end;
}

.inline-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-group.fixed {
    flex-wrap: nowrap;
}

.inline-group.fixed input {
    flex: 1 1 auto;
    min-width: 0;
}

.field.action-field {
    justify-content: flex-end;
}

.edit-form,
.delete-form {
    display: none;
    margin-top: 14px;
    text-align: left;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.item-main {
    font-size: 15px;
    line-height: 1.7;
}

.item-code {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.item-url {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    word-break: break-all;
}

.section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 720px) {
    body.page-shell {
        padding: 14px;
    }

    .hero,
    .content {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-admin-console .toolbar {
        align-items: flex-start;
    }

    body.page-admin-console .button-group,
    body.page-admin-console button,
    body.page-admin-console input[type="submit"] {
        width: 100%;
    }

    body.page-admin-console .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-admin-console .short-link {
        font-size: 14px;
    }

    body.page-admin-console .edit-form,
    body.page-admin-console .delete-form {
        text-align: center;
    }

    body.page-admin-console .edit-form div,
    body.page-admin-console .delete-form div {
        margin-bottom: 10px;
    }
}
