:root {
    --bg-main: #16171a;
    --bg-surface: #1e2024;
    --bg-card: #262930;
    --text-main: #f5f6f7;
    --text-muted: #8a909a;
    --accent: #5865F2;
    --border: rgba(255, 255, 255, 0.08);
    --danger: #ed4245;
    --success: #2ecc71;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
}

.auth-logo { width: 40px; height: 40px; display: block; margin: 0 auto 16px auto; }
.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 15px;
    margin-bottom: 18px;
    outline: none;
    transition: border-color .15s ease;
}
input:focus { border-color: var(--accent); }

.btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }

.btn-ghost {
    width: 100%;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-top: 12px;
}
.btn-ghost:hover { border-color: var(--text-muted); }

.auth-footer { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
}
.alert-error { background: rgba(237,66,69,0.12); color: #ff8a8c; border: 1px solid rgba(237,66,69,0.3); }
.alert-success { background: rgba(46,204,113,0.1); color: #7be8a4; border: 1px solid rgba(46,204,113,0.3); }

/* Authorize / consent screen */
.consent-project { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.consent-project img { width: 56px; height: 56px; border-radius: 16px; }
.consent-x { color: var(--text-muted); font-size: 18px; }
.verified-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-size: 12px; font-weight: 700; margin-left: 6px; }

.scope-list { list-style: none; margin: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.scope-item { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.scope-check { width: 22px; height: 22px; border-radius: 50%; background: var(--success); color: #0b0f0d; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; margin-top: 1px; }
.scope-sensitive { font-size: 12px; color: var(--text-muted); }

/* Cloud dashboard (wider) */
.dash { max-width: 720px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.token-row { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.token-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-danger:hover { background: rgba(237,66,69,0.1); }

.token-reveal { background: var(--bg-card); border: 1px dashed var(--accent); border-radius: 10px; padding: 16px; font-family: monospace; font-size: 13px; word-break: break-all; margin: 16px 0; }
.small-note { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
