/*
 * One stylesheet for every page, served from this origin so the
 * Content-Security-Policy can be style-src 'self' with no inline styles.
 * Generic Vakaros, not any one app: several apps sign in through here.
 */

:root {
  --vk-navy: #0c2340;
  --vk-accent: #1d4f91;
  --vk-border: #e1e8ed;
  --vk-muted: #666;
}

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

html { background: #07172b; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: radial-gradient(ellipse at top, #16365f 0%, #0c2340 50%, #07172b 100%) fixed;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.brand { display: block; width: fit-content; margin: 0 auto 28px; }
.brand img { display: block; width: 168px; height: auto; }

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.card--medium { max-width: 560px; }
.card--wide { max-width: 680px; padding: 48px; line-height: 1.6; }
@media (max-width: 480px) {
  .card, .card--wide { padding: 28px 20px; }
}

h1 { color: var(--vk-navy); font-size: 28px; margin-bottom: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.subtitle { color: var(--vk-muted); margin-bottom: 30px; font-size: 14px; }

.hidden { display: none !important; }

/* Forms */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; font-size: 14px; }
input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--vk-border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}
input:focus { outline: none; border-color: var(--vk-accent); }
.hint { color: #777; font-size: 13px; margin-top: 8px; line-height: 1.5; }

/* Buttons */
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-block {
  width: 100%;
  padding: 14px;
  background: var(--vk-navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-block:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(12, 35, 64, 0.35); }
.btn-block--secondary { background: #eef2f6; color: #333; }
.btn-block--secondary:hover:not(:disabled) { box-shadow: none; background: #e1e8ed; }

.btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #c9d3dd;
  background: white;
  color: var(--vk-navy);
}
.btn:hover:not(:disabled) { border-color: var(--vk-accent); }
.btn--primary { background: var(--vk-navy); border-color: var(--vk-navy); color: white; }
.btn-link { border: 0; padding: 0; background: none; color: var(--vk-accent); font-weight: 600; font-size: 14px; }
.btn-link:hover { text-decoration: underline; }

a { color: var(--vk-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Messages */
.message { padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; line-height: 1.5; }
.message--error { background: #fee; border: 1px solid #fcc; color: #c33; }
.message--error a { color: #c33; font-weight: 600; }
.message--ok { background: #e6f4ea; border: 1px solid #b7dfc3; color: #1e6b34; }

/* "Don't have an account? Sign up" and friends */
.alt { text-align: center; margin-top: 20px; color: var(--vk-muted); font-size: 14px; }
.alt a { font-weight: 600; }
.forgot-link { text-align: right; margin-top: 8px; font-size: 13px; }

/* Social sign-in. Both marks follow their owner's brand guidelines. */
.social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  background: white;
  transition: box-shadow 0.2s, opacity 0.2s;
}
.social-btn:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.social-btn--google { border: 1px solid #dadce0; color: #3c4043; }
.social-btn--apple { border: 1px solid #000; background: #000; color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: #999; font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--vk-border); }

/* Consent */
.client-name { font-weight: 600; color: #333; }
.scopes { background: #f8f9fa; border-radius: 8px; padding: 16px; margin-bottom: 24px; }
.scopes h3 { font-size: 13px; color: var(--vk-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.scope-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; overflow-wrap: anywhere; }
.scope-icon {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--vk-accent); color: white; font-size: 11px;
}
.buttons { display: flex; gap: 12px; }

/* Home */
.lede { color: #555; font-size: 17px; margin-bottom: 30px; }
.section-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vk-accent);
  margin: 32px 0 14px;
}
.prose p { margin-bottom: 14px; color: #444; }
.prose ul { margin: 0 0 14px 20px; color: #444; }
.prose li { margin-bottom: 6px; }
.app { border-left: 3px solid var(--vk-border); padding-left: 16px; margin-bottom: 18px; }
.app-name { font-weight: 600; color: #222; }
.app-platforms { color: #888; font-size: 13px; margin-left: 6px; }
.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 28px;
  background: var(--vk-navy);
  color: white;
  border-radius: 8px;
  font-weight: 600;
}
.cta:hover { text-decoration: none; }
.site-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--vk-border); font-size: 14px; color: #777; }
.site-footer .links { margin-bottom: 12px; }
.site-footer .links a { margin-right: 18px; }

/* Account */
.email { color: #555; font-size: 15px; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; vertical-align: 1px; }
.badge--ok { background: #e6f4ea; color: #1e6b34; }
.badge--warn { background: #fff4e0; color: #8a5300; }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vk-accent);
  margin: 32px 0 10px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--vk-border);
}
.rows > .row:last-child { border-bottom: 1px solid var(--vk-border); }
.row-main { min-width: 0; }
.row-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.row-sub { color: #777; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.empty { color: #777; font-size: 14px; padding: 14px 0; border-top: 1px solid var(--vk-border); }
.inline-form { padding: 4px 0 16px; }
.inline-form label { font-size: 13px; margin: 10px 0 6px; }
.inline-form input { padding: 10px 14px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.account-message { margin: 20px 0 0; }
.account-footer {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.account-footer a { margin-right: 14px; }

/* App callback landing */
.center { text-align: center; }
.center h1 { font-size: 20px; margin-bottom: 12px; }
.center p { color: #555; line-height: 1.6; margin-bottom: 10px; }
.center .btn--primary { margin: 10px 0 16px; padding: 12px 24px; font-size: 16px; }

/* Delete account */
.btn-block--danger { background: #b3261e; }
.btn-block--danger:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(179, 38, 30, 0.3); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; line-height: 1.5; margin: 20px 0; }
.check input { width: auto; margin-top: 4px; flex-shrink: 0; }
.danger-link { color: #b3261e; }
.delete-email { margin-bottom: 18px; }
