/*
 * 色值与圆角同控制台的墨主题 (apps/okcs-web/src/themes/ink.css, preset.css), 控件的尺寸与外观同 components/ui:
 * 输入框 h-8, 按钮 h-9, 报错同 Alert. 界面是平的, 不投影, 层次只靠底色与发丝线.
 * 登录页固定用墨, 不看控制台保存的主题与系统偏好 (进了控制台照常按用户的主题).
 * 样式放在单独的文件里, 页面的内容安全策略不允许内联样式.
 */
@font-face {
    font-family: "Inter Variable";
    src: url("/fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: dark;
    --font-sans:
        "Anthropic Sans", "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "PingFang TC",
        "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans", "Apple SD Gothic Neo", sans-serif;
    --app-bg: #0b0b0c;
    --bg: #131315;
    --border: #222226;
    --border-strong: #303035;
    --fg: #cfcfd4;
    --fg-muted: #98989f;
    --accent: #cfcfd4;
    --accent-fg: #0b0b0c;
    --danger: #d96f6a;
    --danger-subtle: #2c1716;
    --radius-md: 6px;
    --radius-xl: 12px;
}
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
body {
    margin: 0;
    min-height: 100dvh;
    background: var(--app-bg);
    color: var(--fg);
    font: 360 13px/19px var(--font-sans);
    -webkit-font-smoothing: antialiased;
}
.page {
    display: flex;
    gap: 12px;
    min-height: 100dvh;
    padding: 12px;
}
/* 画版: 一块圆角的墨, 四周留出纸边, 像一幅装了框的版画; 左上角是标志 */
.brand {
    position: sticky;
    top: 12px;
    display: flex;
    flex: 1.15 1 0;
    flex-direction: column;
    height: calc(100dvh - 24px);
    overflow: hidden;
    padding: 32px 36px;
    border-radius: var(--radius-xl);
    background: var(--app-bg);
    box-shadow: inset 0 0 0 1px var(--border);
}
.brand-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 540;
    letter-spacing: -0.01em;
}
.brand-head img {
    width: 28px;
    height: 28px;
}
.brand-art {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
}
.brand-art svg {
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    fill: none;
}
/* 版画的刻线: 一条上升的墨线, 底下是疏密不一的横线 */
.brand-art .hatch path {
    stroke: var(--fg);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.brand-art .rules path {
    stroke: var(--border-strong);
    stroke-width: 1;
    stroke-dasharray: 2 5;
}
.brand-foot {
    color: var(--fg-muted);
    font-size: 12px;
}
/* 右侧: 表单居中 */
.side {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    padding: 32px;
}
.side-main {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 0;
}
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 360px;
}
.intro {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}
h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 460;
    line-height: 25px;
    letter-spacing: -0.02em;
}
.lede {
    margin: 4px 0 0;
    color: var(--fg-muted);
}
label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    font-weight: 460;
    line-height: 16px;
    color: var(--fg);
}
/* 输入框同 ui/input.tsx 的 control: 一层描边, 聚焦时外观不变, 光标就是聚焦的标志 */
.control {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    font-size: 13px;
    outline: none;
}
.control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px var(--bg) inset;
    -webkit-text-fill-color: var(--fg);
    caret-color: var(--fg);
}
/* 报错同 Alert 的 destructive: 浅红底, 红字, 一枚图标 */
.error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-radius: var(--radius-xl);
    background: var(--danger-subtle);
    color: var(--danger);
    line-height: 20px;
}
.error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.error span {
    min-width: 0;
    overflow-wrap: anywhere;
}
/* 主按钮同 Button 的 default: h-9, 主色底, 按下缩一点 */
.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    margin-top: 4px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--accent-fg);
    font: inherit;
    font-size: 13px;
    font-weight: 460;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    transition:
        background 0.15s,
        transform 0.1s;
}
.primary:hover {
    background: color-mix(in oklab, var(--accent) 90%, transparent);
}
.primary:active {
    transform: scale(0.96);
}
.primary:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 50%, transparent);
}
@media (max-width: 800px) {
    .brand {
        display: none;
    }
    .side {
        padding: 24px 20px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .primary {
        transition: none;
    }
}
