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

html, body {
  min-height: 100%;
  font-family: system-ui, -apple-system, "Google Sans", sans-serif;
  background: #FAFAF7;
  color: #1B1B1B;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: #6E6E6E; }
.hint { color: #6E6E6E; font-size: 14px; }
.hint.error { color: #C62828; }

.screen {
  min-height: 100vh;
  padding: 40px 24px;
  max-width: 860px;
  margin: 0 auto;
}

/* === Login === */

#screen-login { display: flex; flex-direction: column; justify-content: center; align-items: center; }

.hero { text-align: center; max-width: 560px; }

.hero h1 {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero h1 .accent { color: #2E7D32; }

.tagline {
  font-size: 20px;
  line-height: 1.55;
  color: #4A4A4A;
  margin-bottom: 24px;
}

.benefit {
  font-size: 17px;
  line-height: 1.6;
  color: #4A4A4A;
  background: #F4F8F4;
  border-left: 3px solid #2E7D32;
  padding: 16px 20px;
  border-radius: 10px;
  text-align: left;
  margin: 0 auto 28px;
  max-width: 520px;
}
.benefit strong { color: #1B1B1B; }

.price {
  font-size: 18px;
  color: #2E7D32;
  font-weight: 600;
  margin-bottom: 40px;
}

#google-signin { display: flex; justify-content: center; margin-bottom: 16px; }

/* === Dashboard === */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.topbar h2 {
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 4px;
}

.parents-section { margin-bottom: 48px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 { font-size: 20px; font-weight: 500; }

.parents-list { display: flex; flex-direction: column; gap: 12px; }

.parent-card {
  background: #fff;
  border: 1px solid #EAEAE4;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.parent-card.revoked { opacity: 0.5; }

.parent-info { flex: 1; min-width: 200px; }
.parent-info .name { font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.parent-info .url { font-size: 13px; color: #6E6E6E; word-break: break-all; }

.parent-actions { display: flex; gap: 8px; }

.footer { margin-top: 40px; text-align: center; }
.link {
  background: none;
  border: none;
  color: #6E6E6E;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

/* === Buttons === */

.btn-green-sm {
  background: #2E7D32;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-green-sm:hover { background: #256528; }
.btn-green-sm:disabled { background: #A0A0A0; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: #2E7D32;
  border: 1px solid #2E7D32;
  padding: 11px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover { background: #EAF5EB; }

.btn-grey {
  background: #E0E0E0;
  color: #1B1B1B;
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 15px;
  cursor: pointer;
}

.btn-danger {
  background: transparent;
  color: #C62828;
  border: 1px solid #E6BCBC;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.btn-danger:hover { background: #FBEAEA; }

.btn-copy {
  background: #F0F0EC;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
}
.btn-copy:hover { background: #E6E6E0; }
.btn-copy.copied { background: #C8E6C9; }

/* === Modals === */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal-card.wide { max-width: 540px; }

.modal-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
}

.modal-card p { margin-bottom: 16px; color: #4A4A4A; }

.modal-card input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #D0D0C8;
  border-radius: 12px;
  margin-bottom: 16px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #F7F7F2;
  border-radius: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cred-label {
  font-size: 13px;
  color: #6E6E6E;
  min-width: 40px;
  font-weight: 500;
}
.cred-value {
  flex: 1;
  font-size: 14px;
  color: #1B1B1B;
  font-family: ui-monospace, monospace;
  word-break: break-all;
  min-width: 150px;
}
.cred-value.big { font-size: 28px; letter-spacing: 4px; font-weight: 600; }

.warn {
  background: #FFF4E0;
  color: #8B5A00;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0;
}

/* === Error screen === */

#screen-error { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 24px; }
#screen-error h1 { font-size: 48px; color: #C62828; }
#error-message { font-size: 20px; color: #4A4A4A; max-width: 500px; }
