:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #111522;
    color: #f3f4f8;
    font-synthesis: none;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% -12%, rgba(124, 103, 230, .21), transparent 48rem),
        #111522;
}

a { color: inherit; }

.shell {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.topbar, .account, .brand, .card-head {
    display: flex;
    align-items: center;
}

.topbar { justify-content: space-between; }
.brand { gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #8570ed;
    color: #fff;
}
.account { gap: 18px; color: #c8cada; font-size: .9rem; }
.account form { margin: 0; }
.account button {
    border: 1px solid #34394d;
    border-radius: 9px;
    padding: 8px 12px;
    background: transparent;
    color: #e5e5ef;
    cursor: pointer;
}

.page-intro { margin: 66px 0 28px; }
.eyebrow {
    color: #a99aff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
h1 { margin: 10px 0; font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.055em; }
.page-intro p, .welcome > p { color: #a6aabd; line-height: 1.65; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
    min-height: 0;
    padding: 23px;
    border: 1px solid #2a3041;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(31, 37, 55, .96), rgba(23, 28, 43, .96));
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}
.card-head { gap: 13px; }
.icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 14px;
    background: #302b55;
    color: #c0b2ff;
    font-size: 1.5rem;
}
.card h2 { margin: 0 0 5px; font-size: 1.15rem; }
.status { color: #a3a8ba; font-size: .75rem; }
.status-ok { color: #71ddb2; }
.status-error { color: #ff9b9b; }
.status-not_configured { color: #f0c57b; }
dl { margin: 22px 0 18px; }
.metric { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #303549; }
.metric:last-child { border-bottom: 0; }
.metric dt { color: #aeb2c3; font-size: .88rem; }
.metric dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.open-link { display: inline-flex; gap: 7px; margin-top: 4px; color: #b7aaff; font-size: .88rem; text-decoration: none; }
.open-link:hover { color: #fff; }
.integration-message { min-height: 46px; margin: 25px 0 17px; color: #b6bac9; font-size: .9rem; line-height: 1.5; }
.privacy { margin: 24px 0 0; color: #777d91; font-size: .82rem; line-height: 1.6; }
.welcome { max-width: 660px; margin: 15vh auto 0; text-align: center; }
.welcome h1 { margin-top: 18px; }
.welcome > p { max-width: 540px; margin: 0 auto 28px; }
.primary-button {
    display: inline-flex;
    justify-content: center;
    padding: 13px 21px;
    border-radius: 11px;
    background: #8168ee;
    color: white;
    font-weight: 700;
    text-decoration: none;
}
.primary-button:hover { background: #927df4; }
.welcome .privacy { margin-top: 30px; }
.notice { margin-top: 24px; padding: 14px 18px; border: 1px solid #71474a; border-radius: 12px; background: #392329; color: #ffc3c3; }
.welcome .notice-success { margin: 0 0 22px; border-color: #2f5a48; background: #1a2f28; color: #9ee8c8; text-align: left; }

@media (max-width: 760px) {
    .shell { width: min(100% - 28px, 560px); padding-top: 16px; }
    .page-intro { margin-top: 48px; }
    .cards { grid-template-columns: 1fr; gap: 13px; }
    .card { min-height: 0; }
}

@media (max-width: 420px) {
    .account { gap: 8px; font-size: .78rem; }
    .account button { padding: 7px 9px; }
}
