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

:root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --text: #37352f;
    --text-muted: #787774;
    --border: #e9e9e7;
    --accent: #2383e2;
    --accent-hover: #1a6fc4;
    --success: #0f7b6c;
    --error: #e03e3e;
    --shadow: 0 8px 30px rgba(15, 15, 15, 0.08);
    --radius: 12px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-row svg {
    flex-shrink: 0;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 8px 0 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-notion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-notion:hover {
    background: #2f2f2f;
}

.btn-notion:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg);
}

.hidden {
    display: none !important;
}

.success-panel,
.error-panel {
    margin-top: 8px;
}

.success-panel h2,
.error-panel h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.workspace-meta {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.token-box {
    width: 100%;
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    resize: vertical;
    word-break: break-all;
}

.hint {
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.error-panel {
    color: var(--error);
}

.error-panel p {
    margin: 0 0 16px;
    color: var(--text);
}
