* { box-sizing: border-box; margin: 0; }
:root {
  --primary: #0d5c46;
  --primary-dark: #08402f;
  --gold: #c9962e;
  --bg: #f5f7f6;
  --card: #ffffff;
  --text: #1c2b26;
  --muted: #6b7a74;
  --border: #dfe6e3;
  --red: #c0392b;
  --green: #1e8449;
}
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }

.navbar { background: var(--primary); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.navbar .brand { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: #e8f2ee; text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: #fff; text-decoration: underline; }

.container { max-width: 1100px; width: 100%; margin: 1.5rem auto; padding: 0 1rem; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1.2rem; border-top: 1px solid var(--border); margin-top: 2rem; }

h1 { font-size: 1.6rem; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; margin: 1.2rem 0 0.6rem; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.2rem; margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; overflow: hidden; }
th, td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { background: #eef3f1; font-weight: 600; }
tr:hover td { background: #f7faf9; }
td.num, th.num { text-align: right; }

.btn { display: inline-block; background: var(--primary); color: #fff; border: none; padding: 0.55rem 1.1rem; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 0.95rem; }
.btn:hover { background: var(--primary-dark); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-gold { background: var(--gold); }
.btn-danger { background: var(--red); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

.badge { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-gold { background: var(--gold); color: #fff; }
.badge-free { background: #e0e7e4; color: var(--muted); }
.badge-green { background: #d9f2e3; color: var(--green); }

.flash { padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.92rem; }
.flash-success { background: #d9f2e3; color: #14532d; }
.flash-danger { background: #fde2e0; color: #7f1d1d; }
.flash-warning { background: #fdf3d7; color: #7a5b0d; }
.flash-info { background: #dde9f5; color: #1e3a5f; }

form.inline { display: inline; }
input, select, textarea { padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; width: 100%; background:#fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.form-group { margin-bottom: 0.9rem; }
.form-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 120px; }
.auth-card { max-width: 420px; margin: 2rem auto; }

.searchbar { display: flex; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.searchbar input, .searchbar select { width: auto; flex: 1; min-width: 150px; }

.up { color: var(--green); font-weight: 600; }
.down { color: var(--red); font-weight: 600; }

.lock-box { text-align: center; padding: 2rem 1rem; background: #fbf7ee; border: 1px dashed var(--gold); border-radius: 10px; }
.lock-box p { color: var(--muted); margin: 0.5rem 0 1rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem; text-align: center; }
.stat .val { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.stat .lbl { font-size: 0.8rem; color: var(--muted); }

.tabs { display: flex; gap: 0.4rem; border-bottom: 2px solid var(--border); margin: 1.2rem 0 1rem; flex-wrap: wrap; }
.tab { background: none; border: none; padding: 0.6rem 1rem; font-size: 0.95rem; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .badge { margin-left: 0.3rem; }
.tab-panel { display: none; animation: fadeIn 0.25s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.range-picker { display: flex; gap: 0.35rem; margin-bottom: 0.7rem; }
.range-btn { background: #eef3f1; border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem 0.7rem; font-size: 0.82rem; cursor: pointer; color: var(--muted); font-weight: 600; }
.range-btn:hover { border-color: var(--primary); color: var(--primary); }
.range-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.poll-widget { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.poll-widget h3 { font-size: 1rem; margin: 0 0 0.7rem; }
.poll-widget .poll-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.poll-option { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.6rem; margin: 0.35rem 0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: border-color 0.15s, background 0.15s; }
.poll-option:hover { border-color: var(--primary); background: #f2f8f5; }
.poll-option input { width: auto; accent-color: var(--primary); }
.poll-bar-row { margin: 0.5rem 0; }
.poll-bar-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.2rem; }
.poll-bar-label .win { font-weight: 700; color: var(--primary); }
.poll-bar-track { background: #e8eeeb; border-radius: 6px; height: 12px; overflow: hidden; }
.poll-bar-fill { background: var(--primary); height: 100%; width: 0; border-radius: 6px; transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.poll-bar-fill.mine { background: var(--gold); }
.poll-total { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }
.poll-thanks { color: var(--green); font-size: 0.85rem; font-weight: 600; margin-top: 0.4rem; display: none; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; }
.plan.featured { border: 2px solid var(--gold); }
.plan .price { font-size: 2rem; font-weight: 800; margin: 0.5rem 0; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0; text-align: left; }
.plan li { padding: 0.35rem 0; font-size: 0.92rem; }
