.admin-body { background: #f0ede8; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border: 1px solid #e0ddd6; border-radius: 16px; padding: 36px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.login-logo { font-size: 40px; margin-bottom: 10px; }
.login-card h2 { font-size: 20px; font-weight: 800; color: #c0392b; }
.login-sub { font-size: 13px; color: #888; margin-bottom: 24px; }
.alert-err { background: #fdf0ee; color: #c0392b; border: 1px solid #f5c5be; border-radius: 8px; padding: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 600; }

.admin-header { background: #c0392b; padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.admin-header-inner { max-width: 1100px; margin: 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid #e0ddd6; border-radius: 12px; padding: 18px; text-align: center; }
.stat-num { font-size: 28px; font-weight: 900; color: #c0392b; }
.stat-label { font-size: 12px; color: #888; margin-top: 4px; font-weight: 600; }
.stat-link { font-size: 14px; font-weight: 700; color: #c0392b; text-decoration: none; }
.stat-link:hover { text-decoration: underline; }

.table-card { background: #fff; border: 1px solid #e0ddd6; border-radius: 14px; overflow: hidden; }
.table-header { padding: 16px 20px; border-bottom: 1px solid #e0ddd6; }
.table-header h3 { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.table-wrap { overflow-x: auto; }

.links-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.links-table th { background: #f9f7f4; padding: 10px 14px; text-align: right; font-weight: 700; color: #666; border-bottom: 1px solid #e0ddd6; white-space: nowrap; }
.links-table td { padding: 10px 14px; border-bottom: 1px solid #f0ede8; vertical-align: middle; }
.links-table tr:last-child td { border-bottom: none; }
.links-table tr:hover td { background: #fdf9f8; }
.row-inactive td { opacity: 0.5; }

.td-code { font-family: monospace; font-weight: 700; color: #c0392b; }
.short-link { color: #c0392b; text-decoration: none; font-size: 12px; }
.short-link:hover { text-decoration: underline; }
.td-orig { max-width: 220px; }
.orig-title { display: block; color: #999; font-size: 11px; margin-top: 2px; }
.clicks-badge { background: #fdf0ee; color: #c0392b; padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px; }
.td-date { color: #999; white-space: nowrap; font-size: 12px; }
.td-actions { white-space: nowrap; display: flex; gap: 4px; }

.status-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.badge-on  { background: #e8fdf0; color: #1e7e34; }
.badge-off { background: #f0f0ec; color: #888; }

.pagination { display: flex; gap: 6px; padding: 16px; justify-content: center; }
.page-btn { padding: 6px 14px; background: #f0ede8; border: 1px solid #e0ddd6; border-radius: 7px; color: #333; text-decoration: none; font-size: 13px; font-weight: 600; }
.page-btn.active { background: #c0392b; color: #fff; border-color: #c0392b; }

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .td-orig, .td-date { display: none; }
}
