/* uyou global theme — shared tokens + button/badge/card/form primitives */
:root {
  --uy-bg: #0d1117;
  --uy-surface: #ffffff;
  --uy-surface-alt: #f6f8fb;
  --uy-border: #dfe4ec;
  --uy-text: #101828;
  --uy-text-muted: #667085;
  --uy-primary: #008000;
  --uy-primary-dark: #006400;
  --uy-success: #12805c;
  --uy-danger: #d92d20;
  --uy-warning: #b54708;
  --uy-radius: 10px;
  --uy-radius-lg: 16px;
  --uy-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
  --uy-max: 1120px;

  /* Dark sections (hero, testimonials, footer) */
  --uy-dark: #14181d;
  --uy-dark-2: #1b212a;
  --uy-on-dark: #e8ebf0;
  --uy-on-dark-muted: #9aa4b2;
  --uy-on-dark-border: #2a323d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--uy-text);
  background: var(--uy-surface-alt);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--uy-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--uy-max); margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--uy-radius); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1.2;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--uy-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--uy-primary-dark); }
.btn-secondary { background: var(--uy-surface); color: var(--uy-text); border-color: var(--uy-border); }
.btn-secondary:hover:not(:disabled) { background: var(--uy-surface-alt); }
.btn-danger { background: var(--uy-danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--uy-surface); border: 1px solid var(--uy-border);
  border-radius: var(--uy-radius-lg); box-shadow: var(--uy-shadow); padding: 24px;
}
.card + .card { margin-top: 16px; }
.card-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.card-subtitle { margin: 0 0 20px; color: var(--uy-text-muted); font-size: 14px; }

/* Badges */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--uy-surface-alt);
  color: var(--uy-text-muted); border: 1px solid var(--uy-border);
}
.badge-success { background: #e6f6f0; color: var(--uy-success); border-color: #b7e4d3; }
.badge-danger  { background: #fee4e2; color: var(--uy-danger);  border-color: #fda29b; }
.badge-warning { background: #fef0c7; color: var(--uy-warning); border-color: #fedf89; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.form-control {
  width: 100%; padding: 11px 14px; font-size: 15px; color: var(--uy-text);
  background: var(--uy-surface); border: 1px solid var(--uy-border);
  border-radius: var(--uy-radius); outline: none;
}
.form-control:focus { border-color: var(--uy-primary); box-shadow: 0 0 0 3px rgba(0, 128, 0, .15); }
/* Validation: any input with the `.invalid`/`.is-invalid` class (manual validation) or that
   Angular has marked ng-invalid after being touched (attribute validators) is highlighted red.
   Bind [class.invalid]="<fieldError>" on an input to flag it when its validation fails. */
.form-control.invalid, .form-control.is-invalid, .form-control.ng-invalid.ng-touched { border-color: var(--uy-danger); }
.form-control.invalid:focus, .form-control.is-invalid:focus, .form-control.ng-invalid.ng-touched:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, .18); }
.form-hint { margin-top: 5px; font-size: 13px; color: var(--uy-text-muted); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--uy-radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fee4e2; color: #912018; border: 1px solid #fda29b; }
.alert-success { background: #e6f6f0; color: #05603a; border: 1px solid #b7e4d3; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--uy-border); }
.table th { color: var(--uy-text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }

/* Layout helpers */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.muted { color: var(--uy-text-muted); }
.text-center { text-align: center; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .table { font-size: 13px; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
}

.ellipsis { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.page-title { margin: 0 0 16px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- Legal pages (Terms / Privacy / Refund) ---------- */
.legal-hero { padding: 56px 0 8px; }
.legal-hero h1 { margin: 0; font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.legal-updated { margin: 8px 0 0; color: var(--uy-text-muted); font-size: 14px; }
.legal { max-width: 820px; padding-top: 24px; padding-bottom: 72px; line-height: 1.7; color: var(--uy-text); }
.legal h2 { margin: 34px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 0 0 8px; }
.legal a { color: var(--uy-primary); font-weight: 600; }
.legal a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .legal-hero { padding: 40px 0 4px; }
  .legal-hero h1 { font-size: 30px; }
}
