:root { --bg: #f1f5f9; --panel: #fff; --text: #0f172a; --muted: #64748b; --border: #e2e8f0; --accent: #16a34a; --danger: #dc2626; --radius: 10px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; font-size: 14px; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .7; }

.admin { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin__sidebar { background: #0f172a; color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; }
.admin__logo { font-weight: 700; font-size: 18px; }
.admin__logo span { color: #4ade80; }
.admin__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin__nav a { padding: 10px 14px; border-radius: 8px; color: #cbd5e1; font-weight: 500; transition: all .15s; }
.admin__nav a:hover, .admin__nav a.active { background: #1e293b; color: #fff; opacity: 1; }
.admin__nav-ext { color: #64748b !important; font-size: 13px; margin-top: auto; }
.admin__user { border-top: 1px solid #1e293b; padding-top: 20px; font-size: 13px; color: #94a3b8; }
.admin__user-name { margin-bottom: 12px; }
.admin__logout { background: transparent; border: 1px solid #334155; color: #cbd5e1; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; width: 100%; }
.admin__logout:hover { background: #1e293b; }
.admin__main { padding: 32px 40px; max-width: 1400px; }
.admin__header { margin-bottom: 32px; }
.admin__header h1 { font-size: 28px; font-weight: 700; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
.stat-card { background: var(--panel); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.stat-card--accent { border-color: var(--accent); background: #f0fdf4; }
.stat-card__value { font-size: 36px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 8px; }
.stat-card__label { color: var(--muted); font-size: 13px; }

.admin-section { background: var(--panel); border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); margin-bottom: 24px; }
.admin-section h2 { font-size: 18px; margin-bottom: 20px; }
.admin-actions { margin-bottom: 24px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.admin-table th, .admin-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: #f8fafc; font-weight: 600; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.is-new td { background: #fefce8; }
.admin-table__actions { display: flex; gap: 8px; align-items: center; }
.admin-table code { background: #f1f5f9; padding: 2px 8px; border-radius: 6px; font-size: 13px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: var(--muted); }
.badge--ok { background: #dcfce7; color: #166534; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: all .15s; text-decoration: none; }
.btn--primary { background: #0f172a; color: #fff; }
.btn--primary:hover { background: #1e293b; opacity: 1; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); opacity: 1; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--danger { background: #fee2e2; color: var(--danger); }
.btn--block { width: 100%; }
.inline-form { display: inline; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert--success { background: #dcfce7; color: #166534; }
.alert--error { background: #fee2e2; color: #991b1b; }
.alert ul { margin-left: 20px; }

.muted { color: var(--muted); }
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 20px 60px rgba(15,23,42,.1); width: 100%; max-width: 400px; }
.login-card__title { font-size: 22px; font-weight: 700; margin-bottom: 28px; text-align: center; }
.login-card__title span { color: var(--accent); }

.form__row { margin-bottom: 18px; }
.form__row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__row label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 13px; }
.form__row input, .form__row textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.form__row input:focus, .form__row textarea:focus { outline: none; border-color: var(--accent); }
.form__hint { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.form__actions { display: flex; gap: 12px; margin-top: 28px; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.checkbox input { width: auto; }

.pagination { display: flex; gap: 6px; margin: 24px 0; }
.pagination a { padding: 8px 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.pagination a.active { background: #0f172a; color: #fff; border-color: #0f172a; }

.lead-detail__list { display: grid; grid-template-columns: 140px 1fr; gap: 12px 20px; margin-bottom: 32px; }
.lead-detail__list dt { color: var(--muted); font-weight: 600; }
.lead-detail__message { background: #f8fafc; padding: 24px; border-radius: var(--radius); margin-bottom: 32px; line-height: 1.7; }
