:root {
    --primary: #2E7D6B;
    --primary-dark: #1F5A4D;
    --primary-light: #6FA092;
    --text: #1a1a1a;
    --text-secondary: #555;
    --bg: #F4F1EB;
    --bg-light: #ECE7DF;
    --border: #D9D3C8;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --error: #d33;
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    line-height: 1.5;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand-name { font-weight: 700; }
.logo-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.inline-form { display: inline; }
.link, .link-button { background: none; border: none; color: var(--text-secondary); cursor: pointer; text-decoration: none; padding: 6px 10px; border-radius: var(--radius); }
.link:hover, .link-button:hover { color: var(--primary); background: var(--bg-light); }

.language-form { margin: 0; }
.language-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: white; font-size: 0.9rem; cursor: pointer; }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }

/* Landing — legacy classes, kept in case any external link still points at them. The home page
   now uses .hero + .role-grid below; .landing-* are deprecated. */
.landing { max-width: 900px; margin: 60px auto; }
.landing h1 { font-size: 2.2rem; margin-bottom: 8px; }
.landing .lead { color: var(--text-secondary); margin-bottom: 32px; font-size: 1.1rem; }
.landing-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.landing-card { display: block; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: 0.15s ease; }
.landing-card:hover { border-color: var(--primary); background: var(--bg-light); }
.landing-card h2 { color: var(--primary); margin: 0 0 8px 0; font-size: 1.25rem; }
.landing-card p { color: var(--text-secondary); margin: 0; }

/* Hero — mirrors the marketing site (netvet.ro) so the portal entry feels like the same product.
   Visual only; the portal stays focused on sign-in/register. */
.hero { padding: 60px 0 40px; }
.hero-content { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; }
.hero-text h1 { font-size: 2.75rem; line-height: 1.15; margin: 0 0 20px; color: var(--text); }
.hero-highlight { color: var(--primary); }
.hero-description { font-size: 1.1rem; color: var(--text-secondary); margin: 0 0 28px; max-width: 620px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero { padding: 14px 28px; font-size: 1rem; width: auto; }
.btn-secondary { background: white; color: var(--primary-dark); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--bg-light); color: var(--primary-dark); }
.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-emoji { font-size: 7rem; filter: drop-shadow(0 6px 14px rgba(46, 125, 107, 0.22)); }

/* Section header — small reusable block for "Who are you signing in as?" and future sections. */
.section { padding: 40px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-header h2 { font-size: 1.65rem; margin: 0 0 6px; color: var(--text); }
.section-header p { font-size: 1rem; }

/* Role cards — two-up grid sitting under the hero. */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
.role-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.role-icon { font-size: 2.2rem; margin-bottom: 10px; }
.role-card h3 { font-size: 1.2rem; margin: 0 0 8px; color: var(--text); }
.role-card p { color: var(--text-secondary); margin: 0 0 14px; }
.role-cta { color: var(--primary); font-weight: 600; text-decoration: none; padding: 0; }
.role-cta:hover { color: var(--primary-dark); background: none; }

@media (max-width: 720px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-text h1 { font-size: 2.1rem; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-image { order: -1; }
  .hero-emoji { font-size: 5rem; }
}

/* Auth layout (login/register) */
.auth-body { background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg) 100%); }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-container { display: flex; max-width: 1100px; width: 100%; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-branding { flex: 1; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 60px 50px; display: flex; flex-direction: column; justify-content: center; color: white; }
.auth-branding h1 { font-size: 2rem; margin: 0 0 16px 0; }
.auth-branding p { color: rgba(255,255,255,0.9); font-size: 1.05rem; line-height: 1.6; }
.auth-branding .features { margin-top: 32px; list-style: none; padding: 0; }
.auth-branding .features li { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.auth-branding .pricing-preview { margin-top: 32px; background: rgba(255,255,255,0.1); border-radius: var(--radius); padding: 20px; }
.auth-branding .pricing-preview h3 { margin: 0 0 12px 0; font-size: 1.05rem; }
.auth-branding .pricing-preview ul { list-style: none; padding: 0; margin: 0; }
.auth-branding .pricing-preview li { padding: 6px 0; }
.auth-branding .pricing-preview li::before { content: '✓ '; color: #c8e6c9; }

.auth-form-container { flex: 1.15; padding: 40px 50px; display: flex; flex-direction: column; max-height: 100vh; overflow-y: auto; }
.auth-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }

.auth-form-container h2 { margin: 0 0 6px 0; }
.muted { color: var(--text-secondary); }
.muted.small { font-size: 0.9rem; }

/* Account type cards (register) */
.account-type-cards { display: flex; gap: 12px; margin: 20px 0; }
.account-type-card { flex: 1; padding: 18px; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; background: white; transition: 0.15s ease; }
.account-type-card:hover { border-color: var(--primary-light); }
.account-type-card.active { border-color: var(--primary); background: rgba(46, 125, 107, 0.06); }
.account-type-card .icon { font-size: 1.8rem; margin-bottom: 8px; }
.account-type-card h4 { margin: 0 0 4px 0; }
.account-type-card p { font-size: 0.85rem; margin: 0; color: var(--text-secondary); }

/* Site-style footer (used by _Layout). */
.site-footer { margin-top: 64px; padding: 20px 24px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; background: var(--bg); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* Cookie consent banner (mirrors the marketing site so both feel like one product). */
.cookie-consent {
    position: fixed; bottom: 16px; left: 16px; right: 16px;
    max-width: 720px; margin: 0 auto;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px 24px;
    z-index: 1000;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent-content { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cookie-consent-content > div:first-child { flex: 1; min-width: 240px; }
.cookie-consent-content strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 0.95rem; }
.cookie-consent-content p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.cookie-consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-consent .btn-sm { padding: 8px 16px; font-size: 13px; width: auto; }
@media (max-width: 600px) {
    .cookie-consent { bottom: 0; left: 0; right: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* Forms */
.auth-form .form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.95rem; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,107,0.15); }
.field-error { color: var(--error); font-size: 0.85rem; display: block; margin-top: 4px; }

.form-options { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; }
.remember-me { display: flex; align-items: center; gap: 8px; }
.forgot-link { color: var(--primary); text-decoration: none; font-size: 0.9rem; }
.forgot-link:hover { text-decoration: underline; }

.terms-checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.terms-checkbox label { font-size: 0.9rem; color: var(--text-secondary); }

.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: var(--radius); font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; transition: 0.15s ease; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-lg { padding: 14px 24px; width: 100%; font-size: 1.05rem; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert-error { background: rgba(221, 51, 51, 0.08); border: 1px solid rgba(221, 51, 51, 0.3); color: var(--error); }

.auth-footer { margin-top: 24px; text-align: center; padding-top: 20px; border-top: 1px solid var(--border); }
.auth-footer a { color: var(--primary); font-weight: 500; text-decoration: none; }

/* Dashboard */
.dashboard { max-width: 1000px; margin: 40px auto; }
.dashboard h1 { margin-bottom: 8px; }
.dashboard .lead { color: var(--text-secondary); margin-bottom: 24px; }
.card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.pet-list { list-style: none; padding: 0; }
.pet-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pet-item:last-child { border-bottom: none; }
.pet-name { font-weight: 500; }
.pet-species { color: var(--text-secondary); font-size: 0.9rem; }

@media (max-width: 768px) {
    .auth-branding { display: none; }
    .auth-form-container { padding: 30px 24px; }
    .form-row { flex-direction: column; gap: 0; }
    .account-type-cards { flex-direction: column; }
}

.membership-list { list-style: none; padding: 0; margin: 0; }
.membership-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.membership-item:last-child { border-bottom: none; }
.membership-item strong { min-width: 200px; }
.membership-path { font-size: 13px; }
.membership-path .path-sep { margin: 0 4px; opacity: 0.6; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-admin { background: var(--primary); color: white; }
