
@font-face {
  font-family: 'AlegreyaSansRegular';
  src: url('AlegreyaSans-Regular.ttf') format('truetype');
}

:root {
  --primary: #555eaa;
  --primary-dark: #3e4169;
  --accent: #8e5ed6;
  --accent-deep: #3615ad;
  --teal: #4ca1a3;
  --teal-dark: #3d8385;
  --mint: #a5e1ad;
  --bg: #eeeef4;
  --surface: #ffffff;
  --ink: #2b2d42;
  --muted: #6b7089;
  --border: #e3e4ef;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(62, 65, 105, .05), 0 4px 14px rgba(62, 65, 105, .07);
  --shadow-md: 0 10px 30px rgba(62, 65, 105, .14);
  --ring: 0 0 0 4px rgba(142, 94, 214, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'AlegreyaSansRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 400px at 85% -10%, rgba(142, 94, 214, .10), transparent 60%),
    radial-gradient(800px 380px at 0% -5%, rgba(85, 94, 170, .10), transparent 55%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 700; color: var(--ink); }

p { margin: 0 0 1rem; }

fieldset { border: none; padding: 0; margin: 0; }

/* ---------- App shell ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 45%, var(--accent) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.app-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .01em;
  color: #fff;
  text-decoration: none;
}

.app-brand .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  font-size: 1rem;
}

.app-brand .brand-logo {
  height: 38px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  padding: 2px 6px;
}

.app-header .header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.header-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .9rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  transition: background .2s, transform .2s;
}

.header-chip:hover { background: rgba(255, 255, 255, .26); color: #fff; transform: translateY(-1px); }

.app-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.page-intro { margin-bottom: 1.5rem; }

.page-intro .intro-logo {
  display: block;
  width: min(220px, 55vw);
  height: auto;
  margin: 0 0 1rem;
  border-radius: 14px;
  background: var(--surface);
  padding: .35rem .55rem;
  box-shadow: var(--shadow-sm);
}

.page-intro h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 .25rem;
}

.page-intro h1 .wave { color: var(--accent); }

.page-intro .sub { color: var(--muted); margin: 0; }

.page-intro .sub a { color: var(--primary); font-weight: 600; text-decoration: none; }
.page-intro .sub a:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.card-header p { margin: 0; }

.card-header .card-title-text {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.card-header .card-sub { font-size: .84rem; color: var(--muted); margin: 0; }

.section-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: .95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(85, 94, 170, .35);
}

.section-icon.teal { background: linear-gradient(135deg, var(--teal), var(--mint)); box-shadow: 0 4px 12px rgba(76, 161, 163, .35); }
.section-icon.purple { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: 0 4px 12px rgba(142, 94, 214, .35); }

.card-body { padding: 1.4rem; }

@media (min-width: 768px) {
  .card-body { padding: 1.75rem; }
}

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink); }

.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #fbfbfd;
  padding: .65rem .95rem;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.form-control:focus {
  border-color: var(--accent);
  background-color: #fff;
  box-shadow: var(--ring);
}

.form-control::placeholder { color: #a3a7bd; }

.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn,
.input-group input[type="submit"] { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Buttons ---------- */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: .6rem 1.25rem;
  transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 120%) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(85, 94, 170, .35);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 120%) !important;
  box-shadow: 0 6px 18px rgba(62, 65, 105, .45);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--teal) !important;
  border-color: var(--teal) !important;
  box-shadow: 0 4px 14px rgba(76, 161, 163, .35);
}

.btn-danger:hover, .btn-danger:focus {
  background-color: var(--teal-dark) !important;
  border-color: var(--teal-dark) !important;
  transform: translateY(-1px);
}

.btn-warning {
  background-color: #a366cc !important;
  border-color: #a366cc !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(163, 102, 204, .35);
}

.btn-warning:hover, .btn-warning:focus {
  background-color: var(--accent-deep) !important;
  border-color: var(--accent-deep) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border: 1.5px solid var(--border);
  color: var(--primary);
  background: #fff;
}

.btn-outline-secondary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-ghost-danger {
  background: #fff !important;
  border: 1.5px solid #e5b8b8 !important;
  color: #b45454 !important;
  box-shadow: none;
}

.btn-ghost-danger:hover { background: #fdf2f2 !important; border-color: #d49090 !important; }

/* ---------- Provider picker (radios) ---------- */
.provider-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  margin-top: 1rem;
}

@media (min-width: 576px) {
  .provider-grid { grid-template-columns: repeat(3, 1fr); }
}

.provider-option {
  position: relative;
  display: block;
  cursor: pointer;
  margin: 0;
}

.provider-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.provider-option .provider-card {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  height: 100%;
  padding: .8rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfbfd;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.provider-option .provider-name {
  font-weight: 700;
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.provider-option .provider-desc { font-size: .78rem; color: var(--muted); }

.provider-option .provider-badge {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: .1rem .5rem;
}

.provider-option:hover .provider-card { border-color: #c9cce6; }

.provider-option input:checked + .provider-card {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(142, 94, 214, .09), rgba(85, 94, 170, .07));
  box-shadow: var(--ring);
}

.provider-option input:focus-visible + .provider-card { box-shadow: var(--ring); }

/* ---------- Crawler console ---------- */
.console-wrap { position: relative; }

#output {
  background: #23253a;
  color: #c5e8c9;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: .82rem;
  line-height: 1.55;
  padding: 1rem;
  resize: vertical;
}

#output:focus { box-shadow: var(--ring); color: #c5e8c9; background: #23253a; }

.console-dots {
  display: flex;
  gap: .35rem;
  margin-bottom: .55rem;
}

.console-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.console-dots span:nth-child(1) { background: #e97e7e; }
.console-dots span:nth-child(2) { background: #ecc978; }
.console-dots span:nth-child(3) { background: var(--mint); }

.crawler-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.1rem;
}

.crawler-actions .btn,
.crawler-actions form { flex: 1 1 180px; }

.crawler-actions form .btn { width: 100%; }

/* ---------- AI assistant ---------- */
.assistant-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.assistant-hero img.hero-img {
  max-width: min(100%, 420px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.assistant-update {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(135deg, rgba(142, 94, 214, .12), rgba(85, 94, 170, .12));
  border: 1px solid rgba(142, 94, 214, .25);
  color: var(--accent-deep);
  font-size: .82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: .35rem .95rem;
  margin-bottom: 1rem;
}

.chat-log { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.25rem; }

.chat-bubble {
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-size: .92rem;
  word-break: break-word;
}

.chat-bubble .chat-role {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}

.chat-bubble.user {
  background: linear-gradient(135deg, rgba(85, 94, 170, .10), rgba(142, 94, 214, .10));
  border: 1px solid rgba(85, 94, 170, .18);
}

.chat-bubble.user .chat-role { color: var(--primary); }

.chat-bubble.assistant {
  background: #fbfbfd;
  border: 1px solid var(--border);
}

.chat-bubble.assistant .chat-role { color: var(--teal-dark); }

.assistant-status {
  font-size: .84rem;
  color: var(--muted);
  margin: .35rem 0 0;
}

/* ---------- Search results ---------- */
.results-count {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(76, 161, 163, .12);
  color: var(--teal-dark);
  border: 1px solid rgba(76, 161, 163, .3);
  font-size: .84rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .3rem .9rem;
}

.result-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfbfd;
  margin-bottom: .8rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.result-item:hover {
  border-color: rgba(142, 94, 214, .45);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.result-item .form-check-input {
  margin-top: .3rem;
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  border: 1.5px solid #c2c5dd;
}

.result-item .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.result-body { min-width: 0; }

.result-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  word-break: break-word;
}

.result-title:hover { color: var(--accent-deep); text-decoration: underline; }

.result-url {
  font-size: .78rem;
  color: var(--teal-dark);
  word-break: break-all;
  margin: .1rem 0 .3rem;
}

.result-desc { font-size: .9rem; color: var(--muted); margin: 0; }

.highlight {
  background: linear-gradient(180deg, transparent 40%, rgba(255, 224, 102, .95) 40%);
  border-radius: 3px;
  padding: 0 .1em;
}

/* ---------- Footer ---------- */
.app-footer {
  margin-top: 2.5rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}

.app-footer .footer-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.1rem;
}

.app-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

/* ---------- Snackbar ---------- */
#snackbar {
  visibility: hidden;
  min-width: 260px;
  max-width: min(92vw, 480px);
  background: rgba(43, 45, 66, .96);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  position: fixed;
  z-index: 2000;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30px;
  font-size: .95rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
}

#snackbar p { margin: 0; }

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.4s, fadeout 0.4s 2.6s;
  animation: fadein 0.4s, fadeout 0.4s 2.6s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

/* ---------- Misc / mobile ---------- */
#loadingImage { margin: .5rem auto; }

@media (max-width: 575.98px) {
  .app-main { padding: 1.25rem .9rem 2.5rem; }
  .card-header { padding: .9rem 1.1rem; }
  .card-body { padding: 1.1rem; }
  .crawler-actions .btn, .crawler-actions form { flex: 1 1 100%; }
}

.toast-group {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}

/* ---------- Pagination ---------- */
.gms-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 1.75rem;
}

.gms-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: .5rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, color .2s, background .2s;
}

.gms-page:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}

.gms-page.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(85, 94, 170, .35);
}

.gms-page.disabled {
  opacity: .45;
  pointer-events: none;
}

.gms-page.ellipsis {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
  min-width: auto;
  padding: .5rem .3rem;
}

/* ---------- Auth (login / register) pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.25rem 1.9rem;
  text-align: center;
}

.auth-card .auth-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1rem;
}

.auth-card h1.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.auth-card .auth-sub {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 1.5rem;
}

.auth-card .form-control {
  padding: .78rem 1rem;
  font-size: .98rem;
  text-align: left;
}

.auth-field { margin-bottom: 1rem; text-align: left; }

.auth-field .help-block {
  display: block;
  color: #c0392b;
  font-size: .82rem;
  font-weight: 600;
  margin-top: .3rem;
}

.auth-card .btn-login {
  width: 100%;
  padding: .78rem 1rem;
  font-size: 1rem;
  margin-top: .25rem;
}

.auth-links { font-size: .92rem; margin-top: 1.25rem; }
.auth-links a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-links a:hover { color: var(--accent-deep); text-decoration: underline; }

.auth-news {
  background: linear-gradient(135deg, rgba(142, 94, 214, .09), rgba(85, 94, 170, .08));
  border: 1px solid rgba(142, 94, 214, .22);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  font-size: .86rem;
  color: var(--ink);
  text-align: left;
  margin-top: 1.4rem;
}

.auth-news b, .auth-news strong { color: var(--accent-deep); }
.auth-news a { color: var(--primary); font-weight: 700; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  margin: 1.4rem 0 .5rem;
}

.store-badges img { max-width: 200px; height: auto; border-radius: 13px; }

.auth-footer {
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
  padding: 1.5rem 1rem 2rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

.auth-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1.25rem;
  margin-bottom: .8rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1rem;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}

.lang-switch:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--accent-deep); }

/* ---------- Summarizer output ---------- */
.gms-summary {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1rem;
}

.gms-summary-shell {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(85, 94, 170, .04), transparent 120px),
    var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.gms-summary-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(85, 94, 170, .08), rgba(142, 94, 214, .06));
}

.gms-summary-head .gms-summary-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  flex-shrink: 0;
}

.gms-summary-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.gms-summary-head p {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.gms-summary-body {
  padding: .9rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.gms-summary-cards {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.gms-summary-status {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.gms-summary-status.info {
  background: rgba(85, 94, 170, .08);
  border-color: rgba(85, 94, 170, .16);
  color: var(--primary-dark);
}

.gms-summary-status.ok {
  background: rgba(76, 161, 163, .12);
  border-color: rgba(76, 161, 163, .22);
  color: var(--teal-dark);
}

.gms-summary-status.error {
  background: rgba(196, 69, 105, .08);
  border-color: rgba(196, 69, 105, .18);
  color: #8a2448;
}

.gms-summary-status.fetching {
  background: rgba(142, 94, 214, .08);
  border-color: rgba(142, 94, 214, .16);
  color: var(--accent-deep);
}

.gms-summary-status .gms-spin {
  width: .85rem;
  height: .85rem;
  margin-top: .2rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: gms-spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes gms-spin {
  to { transform: rotate(360deg); }
}

.gms-summary-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: .95rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}

.gms-summary-card:hover {
  border-color: rgba(85, 94, 170, .35);
  box-shadow: var(--shadow-sm);
}

.gms-summary-card.is-error {
  border-color: rgba(196, 69, 105, .28);
  background: rgba(196, 69, 105, .04);
}

.gms-summary-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.gms-summary-card-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.gms-summary-card-url {
  display: inline-block;
  margin: 0 0 .7rem;
  font-size: .78rem;
  color: var(--teal-dark);
  text-decoration: none;
  word-break: break-all;
}

.gms-summary-card-url:hover { text-decoration: underline; color: var(--primary); }

.gms-summary-badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(85, 94, 170, .1);
  color: var(--primary-dark);
}

.gms-summary-badge.error {
  background: rgba(196, 69, 105, .12);
  color: #8a2448;
}

.gms-summary-lines {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.gms-summary-lines li {
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.5;
}

.gms-summary-combined {
  margin-top: .25rem;
  border: 1.5px dashed rgba(85, 94, 170, .35);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(165, 225, 173, .12), rgba(85, 94, 170, .04));
  padding: 1rem;
}

.gms-summary-combined h4 {
  margin: 0 0 .85rem;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}

.gms-summary-combined-item {
  padding: .75rem 0;
  border-top: 1px solid rgba(85, 94, 170, .12);
}

.gms-summary-combined-item:first-of-type { border-top: none; padding-top: 0; }

.gms-summary-combined-item strong {
  display: block;
  margin-bottom: .2rem;
  font-size: .92rem;
}

@media (max-width: 575.98px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .auth-wrap { padding: 1.5rem .9rem; }
  .gms-summary-head,
  .gms-summary-body { padding-left: .85rem; padding-right: .85rem; }
}
