@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600;700;800&display=swap");

:root {
    --bg: #f7f9fc;
    --text: #0b1220;
    --muted: rgba(11, 18, 32, .55);
    --line: rgba(11, 18, 32, .14);

    --dc: #4a0f1a;
    --ops: #bfa14a;

    --radius: 16px;
    --shadow: 0 18px 50px rgba(11, 18, 32, .14);

    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --logo: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 var(--mono);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

h1 {
    margin: 0 0 10px;
    font-family: var(--logo);
    font-size: 18px;
    letter-spacing: .6px;
}

p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.canvas {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding:
            max(22px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(22px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
}

.shell {
    width: min(720px, 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}

.brand {
    font-family: var(--logo);
    letter-spacing: 1.1px;
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.brandMark {
    font-weight: 800;
    font-size: 20px;
    display: inline-flex;
}

.brandMark .dc { color: var(--dc); }

.brandMark .ops {
    background: linear-gradient(
            180deg,
            #eddc9a 0%,
            #d4bb63 30%,
            #bfa14a 52%,
            #a48732 72%,
            #8a6f24 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-shadow:
            0 0 0.4px rgba(230, 200, 120, .55),
            0 1px 1px rgba(120, 95, 30, .25);
}

.meta {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .4px;
}

.body { padding: 18px; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 680px) {
    .top { padding: 16px; }
    .body { padding: 16px; }
    .grid { grid-template-columns: 1fr; }
    .shell { border-radius: 18px; }
    .brandMark { font-size: 19px; }
}

.field { display: flex; flex-direction: column; gap: 6px; }

.label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .4px;
}

.labelRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    font: 14px/1.2 var(--mono);
    background: #ffffff;
}

.input:focus {
    border-color: rgba(191, 161, 74, .55);
    box-shadow: 0 0 0 4px rgba(191, 161, 74, .16);
}

.pwWrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input.pw {
    padding-right: 58px;
}

.pwBtn {
    position: absolute;
    right: 8px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(11, 18, 32, .18);
    background: rgba(11, 18, 32, .04);
    color: rgba(11, 18, 32, .72);
    font: 12px/1 var(--mono);
    cursor: pointer;
}

.pwBtn:hover {
    background: rgba(11, 18, 32, .07);
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(11, 18, 32, .18);
    background: rgba(11, 18, 32, .04);
    font: 14px/1 var(--mono);
    cursor: pointer;
}

.btn.primary {
    border-color: rgba(74, 15, 26, .28);
    background: linear-gradient(180deg, rgba(74, 15, 26, .06), rgba(74, 15, 26, .02));
}

.btn.primary:hover {
    background: linear-gradient(180deg, rgba(74, 15, 26, .09), rgba(74, 15, 26, .03));
}

.links {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.links a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(11, 18, 32, .25);
}

.error, .ok {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.error {
    border: 1px solid rgba(160, 30, 30, .22);
    background: rgba(160, 30, 30, .05);
    color: rgba(120, 15, 20, .92);
}

.ok {
    border: 1px solid rgba(20, 120, 60, .22);
    background: rgba(20, 120, 60, .05);
    color: rgba(10, 90, 45, .92);
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.footLink {
    position: relative;
    color: inherit;
    text-decoration: none;
    padding-bottom: 2px;
    transition: transform 0.12s ease, color 0.12s ease;
}

.footLink::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--dc), var(--ops));
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.footLink:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.footLink:hover::after {
    opacity: 0.8;
    transform: scaleX(1);
}

.footStrong {
    font-weight: 600;
}

.productSwitch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.switchBtn {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(11, 18, 32, .18);
    background: rgba(11, 18, 32, .04);
    font: 12px/1 var(--mono);
    color: rgba(11, 18, 32, .72);
    cursor: pointer;
}

.switchBtn:hover {
    background: rgba(11, 18, 32, .07);
}

.pop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
    z-index: 20;
}

.productSwitch::after {
    content: "";
    position: absolute;
    right: 0;
    top: 100%;
    width: 100%;
    height: 10px;
}

.productSwitch:hover .pop {
    display: block;
}

.pop a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
}

.pop a:hover {
    background: rgba(11, 18, 32, .04);
}

.badge { color: var(--muted); font-size: 11px; }

.hint {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hintBtn {
    width: 26px;
    height: 26px;
    border-radius: 10px;
    border: 1px solid rgba(11, 18, 32, .18);
    background: rgba(11, 18, 32, .04);
    color: rgba(11, 18, 32, .72);
    font: 12px/1 var(--mono);
    cursor: pointer;
}

.hintBtn:hover {
    background: rgba(11, 18, 32, .07);
}

.hintPop {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(320px, 80vw);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
    color: rgba(11, 18, 32, .72);
    font-size: 12px;
    display: none;
    z-index: 30;
}

.hint.open .hintPop {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
