/* ===== WEBVARÁZS – KÖZÖS STÍLUSOK ===== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

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

:root {
  --sun: #F5A623; --sun-light: #FEF3DC; --sun-dark: #C47D0E;
  --teal: #0D7A6B; --teal-light: #E0F5F1; --teal-dark: #085248;
  --warm: #F7F3EE; --text: #1A1208; --text-muted: #6B5E4A;
  --white: #FFFDF9; --danger: #C0392B; --success: #0D7A6B;
  --sidebar-w: 240px;
}

body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--warm); color: var(--text); }

/* AUTH PAGES */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--teal-dark); position: relative; overflow: hidden; }
.auth-wrap::before { content: ''; position: absolute; top:-100px; right:-100px; width:400px; height:400px; border-radius:50%; background:var(--sun); opacity:.1; }
.auth-card { background: var(--white); border-radius: 24px; padding: 2.5rem 2rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); position: relative; z-index: 1; }
.auth-logo { font-family: 'Fraunces', serif; font-size: 1.6rem; font-weight: 700; color: var(--teal-dark); text-align: center; margin-bottom: 0.25rem; }
.auth-logo span { color: var(--sun-dark); }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-card h2 { font-family: 'Fraunces', serif; font-size: 1.5rem; text-align: center; margin-bottom: 1.75rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
.field input { width: 100%; padding: 0.85rem 1.1rem; border: 2px solid #DDD5C8; border-radius: 12px; font-family: inherit; font-size: 0.95rem; background: white; color: var(--text); outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--teal); }
.btn-full { width: 100%; background: var(--teal-dark); color: white; border: none; border-radius: 100px; padding: 0.9rem; font-weight: 600; font-size: 1rem; cursor: pointer; font-family: inherit; transition: all .2s; margin-top: .5rem; }
.btn-full:hover { background: var(--teal); transform: translateY(-1px); }
.auth-link { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-top: 1.25rem; }
.auth-link a { color: var(--teal); font-weight: 600; text-decoration: none; }
.msg-error { background: #fde8e8; border: 1px solid #f5c6c6; border-radius: 10px; padding: .75rem 1rem; color: var(--danger); font-size: .88rem; margin-bottom: 1rem; }
.msg-success { background: var(--teal-light); border: 1px solid #9FE1CB; border-radius: 10px; padding: .75rem 1rem; color: var(--teal-dark); font-size: .88rem; margin-bottom: 1rem; }

/* DASHBOARD LAYOUT */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--teal-dark); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; overflow-y: auto; }
.sidebar-logo { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: white; padding: 1.75rem 1.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-logo span { color: var(--sun); }
.sidebar-user { padding: .85rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-user .uname { color: white; font-size: .88rem; font-weight: 600; }
.sidebar-user .uplan { font-size: .75rem; color: var(--sun); }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-label { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: .75rem 1.5rem .35rem; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; font-weight: 500; transition: all .2s; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: rgba(255,255,255,.12); color: white; border-left-color: var(--sun); }
.nav-item .icon { font-size: 1.1rem; width: 1.4rem; text-align: center; flex-shrink: 0; }
.sidebar-bottom { padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 2.5rem 2rem; max-width: calc(100% - var(--sidebar-w)); }
.page-title { font-family: 'Fraunces', serif; font-size: 1.8rem; font-weight: 700; margin-bottom: .35rem; }
.page-sub { color: var(--text-muted); font-size: .95rem; margin-bottom: 2rem; }
.card { background: var(--white); border-radius: 16px; padding: 1.75rem; box-shadow: 0 2px 16px rgba(26,18,8,.06); margin-bottom: 1.5rem; }
.card h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: .35rem; }
.card .card-sub { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.25rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: .4rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .8rem 1rem; border: 2px solid #DDD5C8; border-radius: 10px; font-family: inherit; font-size: .93rem; background: white; color: var(--text); outline: none; transition: border-color .2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--teal); }
.form-group textarea { resize: vertical; min-height: 90px; }
.btn { display: inline-block; border: none; border-radius: 100px; padding: .75rem 1.75rem; font-weight: 600; font-size: .93rem; cursor: pointer; font-family: inherit; transition: all .2s; text-decoration: none; }
.btn-teal { background: var(--teal-dark); color: white; }
.btn-teal:hover { background: var(--teal); transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: var(--teal-dark); }
.btn-sun:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline { background: none; border: 2px solid #DDD5C8; color: var(--text-muted); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.result-box { background: var(--teal-dark); border-radius: 14px; padding: 1.5rem; color: white; margin-top: 1.5rem; white-space: pre-wrap; line-height: 1.75; font-size: .95rem; display: none; }
.result-box.show { display: block; }
.result-box .copy-btn { margin-top: 1rem; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); color: white; border-radius: 100px; padding: .5rem 1.2rem; font-size: .83rem; cursor: pointer; font-family: inherit; transition: all .2s; }
.result-box .copy-btn:hover { background: rgba(255,255,255,.25); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; margin-right: .5rem; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: 14px; padding: 1.25rem 1.5rem; box-shadow: 0 2px 12px rgba(26,18,8,.06); }
.stat-card .s-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; }
.stat-card .s-val { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 700; color: var(--teal-dark); }
.stat-card .s-note { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.trial-banner { background: var(--sun-light); border: 1px solid var(--sun); border-radius: 14px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.trial-banner p { font-size: .9rem; color: var(--sun-dark); font-weight: 500; }
.history-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.history-table th { text-align: left; padding: .6rem .75rem; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid #EDE9E3; }
.history-table td { padding: .65rem .75rem; border-bottom: 1px solid #EDE9E3; vertical-align: top; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .25rem .65rem; border-radius: 100px; }
.badge-landing { background: var(--teal-light); color: var(--teal-dark); }
.badge-quiz { background: var(--sun-light); color: var(--sun-dark); }
.badge-email { background: #EDE9F5; color: #5B3DA0; }

@media (max-width: 768px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .main-content { margin-left: 0; max-width: 100%; padding: 1.5rem 1rem; }
  .app-wrap { flex-direction: column; }
}
