/* Общие стили NearMatch */
html { background: #eef0f4; min-height: 100vh; }
* { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, sans-serif; margin: 0; background: #eef0f4; color: #222; min-height: 100vh; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.card { background: white; border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid #eee; margin-bottom: 20px; border-radius: 8px; flex-wrap: wrap; gap: 10px; }
.topbar h1 { font-size: 18px; margin: 0; }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #333; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.nav-links a:hover { background: #f0f4ff; }
.nav-links a.active { background: #e6efff; color: #2563eb; font-weight: 600; }
.logout-btn { background: #fff; border: 1px solid #fbb; color: #c33; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.logout-btn:hover { background: #fff5f5; }

.btn { padding: 8px 16px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; font-size: 14px; transition: 0.2s; }
.btn-primary { background: #4a6cf7; color: white; }
.btn-primary:hover { background: #3a5ce7; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.error-box { background: #fee2e2; color: #dc2626; padding: 12px; border-radius: 8px; margin-bottom: 15px; display: none; }

@media (max-width: 640px) {
    .wrap { padding: 8px; }
    .topbar { flex-direction: column; align-items: flex-start; }
    .nav-links { width: 100%; }
    .nav-links a, .logout-btn { flex: 1 1 40%; text-align: center; min-height: 40px; display: flex; align-items: center; justify-content: center; }
}
/* Бейджи на навигации */
.nav-links a { position: relative; }
.nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    pointer-events: none;
}