:root {
    --bg: #0f1113;
    --card: #1a1d21;
    --card-2: #25292e;
    --accent: #DB79DE;
    --text: #e1e1e1;
    --text-muted: #92959b;
    --danger: #ff5a5a;
    --success: #00d084;
    --gold: #ffaa00;
    --border: #333942;
}

* { box-sizing: border-box; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0 0 96px 0;
    -webkit-font-smoothing: antialiased;
}
header {
    background: rgba(26, 29, 33, 0.96);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
header img { height: 40px; display: block; }
.container { padding: 20px; max-width: 720px; margin: 0 auto; }
.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

h2 { font-size: 20px; margin: 0 0 18px 0; color: var(--accent); display: flex; align-items: center; gap: 10px; }
h3 { margin: 0 0 12px 0; font-size: 16px; color: #fff; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin: -8px 0 18px 0; line-height: 1.5; }
.glass-card { background: var(--card); border: 1px solid var(--border); padding: 18px; border-radius: 16px; margin-bottom: 18px; box-shadow: 0 10px 26px rgba(0,0,0,0.12); }
label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 800; }
input, select, textarea {
    background: var(--card-2);
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(219, 121, 222, 0.12); }
small { color: var(--text-muted); }

.btn-wmb {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, opacity 0.2s;
    text-decoration: none;
}
.btn-wmb:active { opacity: 0.85; transform: translateY(1px); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-buy, .btn-yt, .btn-outline {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 9px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}
.btn-buy { background: #fff; color: #000; }
.btn-yt { background: #ff0000; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.compact-btn { width: auto; padding: 0 15px; margin-bottom: 15px; background: var(--card-2); border: 1px solid var(--border); }
.secondary-btn { background: rgba(219,121,222,0.1); border: 1px solid var(--accent); color: var(--accent); }

.list-item { background: var(--card-2); padding: 15px; border-radius: 13px; margin-bottom: 10px; border: 1px solid var(--border); }
.list-item-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.list-item-subtitle { font-size: 12px; color: var(--text-muted); }
.stock-badge { background: rgba(219, 121, 222, 0.15); color: var(--accent); padding: 5px 9px; border-radius: 8px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.stock-badge.low { background: rgba(255, 90, 90, 0.15); color: var(--danger); }
.link-finish { color: var(--accent); cursor: pointer; font-weight: 700; }
.trophy-item { border-left: 4px solid var(--gold); }
.alert-card { border: 1px solid var(--border); border-left: 4px solid var(--gold); padding: 12px; margin-bottom: 14px; background: rgba(255, 170, 0, 0.05); border-radius: 12px; display: flex; gap: 12px; align-items: flex-start; }
.alert-card.critical { border-left-color: var(--danger); background: rgba(255, 90, 90, 0.06); }
.alert-card.success { border-left-color: var(--success); background: rgba(0, 208, 132, 0.06); }
.alert-card strong { font-size: 15px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.add-product-card { border-style: dashed; border-color: rgba(219, 121, 222, 0.65); }
.add-product-card h3 { color: var(--accent); }
.logout-link { display:block; text-align:center; margin-top:30px; }

.wash-section-title { font-size: 11px; color: var(--accent); font-weight: 800; margin: 20px 0 10px 0; border-bottom: 1px solid var(--border); padding-bottom: 7px; text-transform: uppercase; }
.product-use-title { margin-top: 30px; }
.type-selector { display: flex; gap: 8px; margin-bottom: 20px; }
.type-pill { flex: 1; text-align: center; background: var(--card-2); padding: 10px 5px; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer; border: 1px solid var(--border); transition: 0.2s; color: var(--text-muted); text-transform: uppercase; }
.type-pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.task-item { background: var(--card-2); padding: 10px; border-radius: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); transition: 0.2s; }
.task-item.selected { border-color: var(--accent); background: rgba(219, 121, 222, 0.1); color: var(--accent); }
.checkbox-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checkbox-row:last-child { border-bottom: none; }
.checkbox-row input[type="number"] { width: 92px; margin-bottom: 0; padding: 8px; text-align: right; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #000; display: flex; justify-content: space-around; padding: 9px 0 18px 0; border-top: 1px solid var(--border); z-index: 100; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #666; text-decoration: none; font-size: 9px; font-weight: 800; cursor: pointer; flex: 1; transition: color 0.25s; min-width: 0; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { color: var(--accent); }

.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-weight: 800; text-transform: uppercase; }
.cal-header button { background: transparent; border: none; color: var(--accent); font-size: 20px; cursor: pointer; padding: 5px 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-day-name { font-size: 10px; color: var(--text-muted); font-weight: 800; margin-bottom: 5px; }
.cal-day { background: var(--card-2); border: 1px solid var(--border); padding: 10px 0; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; position: relative; transition: 0.2s; }
.cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-day.active { border-color: var(--accent); background: rgba(219, 121, 222, 0.1); color: var(--accent); }
.cal-day .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); }
.calendar-actions { text-align: center; margin-top: 18px; }
.calendar-actions button { background: var(--card-2); border: 1px solid var(--border); color: var(--text); padding: 10px 18px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items:center; gap: 8px; }
.history-details { display: none; margin-top: 15px; border-top: 1px dashed #444; padding-top: 12px; font-size: 13px; }
.history-details.open { display: block; animation: fadeIn 0.25s ease; }
.history-details ul { margin: 5px 0 0 0; padding-left: 20px; color: var(--text-muted); }

.academy-card { background: var(--card-2); border: 1px solid var(--border); border-radius: 13px; padding: 15px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; }
.academy-title { font-size: 15px; font-weight: 800; color: #fff; margin: 0; }
.academy-desc { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.45; }
.academy-actions { display: flex; gap: 10px; margin-top: 5px; flex-wrap: wrap; }

.meteo-card p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.section-heading-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.section-heading-row > i { color: var(--accent); }
.meteo-search-row { display: flex; gap: 10px; }
.meteo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 8px; margin-top: 12px; }
.meteo-day { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; min-height: 128px; display: flex; flex-direction: column; gap: 6px; align-items:center; justify-content:center; }
.meteo-day.risky { border-color: rgba(255, 90, 90, 0.6); background: rgba(255, 90, 90, 0.06); }
.meteo-day.good { border-color: rgba(0, 208, 132, 0.35); }
.meteo-date { font-size: 11px; color: #fff; font-weight: 800; }
.meteo-icon { color: var(--accent); }
.meteo-rain { font-size: 12px; font-weight: 800; }
.meteo-tip { margin-top: 10px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.suggestion-list { display: grid; gap: 8px; margin-top: 10px; }
.suggestion-list button { background: var(--card-2); color: var(--text); border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; text-align: left; cursor: pointer; }

.smart-card { border-left: 4px solid var(--accent); }
.smart-card ul { margin: 10px 0 0 0; padding-left: 18px; color: var(--text-muted); }
.smart-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.forum-new-topic h3 { color: var(--accent); }
.forum-toolbar { margin-bottom: 14px; }
.forum-topic { cursor: pointer; transition: border-color 0.2s, transform 0.12s; }
.forum-topic:hover { border-color: rgba(219, 121, 222, 0.7); }
.forum-topic:active { transform: scale(0.995); }
.forum-meta { display:flex; gap:8px; flex-wrap:wrap; color: var(--text-muted); font-size: 11px; margin-top: 8px; }
.forum-chip { background: rgba(219, 121, 222, 0.12); color: var(--accent); border-radius: 999px; padding: 3px 8px; font-weight: 800; }
.thread-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 12px; }
.thread-back { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 9px; cursor: pointer; display:inline-flex; gap:6px; align-items:center; }
.forum-post { background: var(--card-2); border: 1px solid var(--border); border-radius: 13px; padding: 14px; margin-bottom: 10px; }
.forum-post.mine { border-color: rgba(219, 121, 222, 0.6); }
.post-author { font-weight:800; font-size: 12px; color:#fff; display:flex; justify-content:space-between; gap:10px; }
.post-content { white-space: pre-wrap; color: var(--text); font-size: 14px; line-height: 1.45; margin-top: 10px; }
.form-feedback { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.form-feedback.error { color: var(--danger); }
.form-feedback.ok { color: var(--success); }

.login-container { padding-top: 50px; }
.center-title { justify-content: center; font-size: 24px; }
.login-alert { margin-bottom: 20px; }
.whatsapp-help { margin-top: 14px; }
.whatsapp-btn { background: #25D366; font-size: 14px; padding: 10px; }
.login-button { margin-bottom: 24px; }
.register-zone { border-top: 1px dashed var(--border); padding-top: 24px; text-align: center; }
.register-zone p { font-size: 13px; color: var(--text-muted); margin: 0 0 15px 0; font-weight: 700; }

@media (max-width: 480px) {
    .container { padding: 16px; }
    .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
    .task-grid { grid-template-columns: 1fr; }
    .meteo-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-item span { font-size: 8px; }
    .nav-item svg { width: 18px; height: 18px; }
}

/* v3 - PWA, perfil, rutinas, favoritos y administración */
.bottom-nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-item { min-width: 66px; }
.list-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
.icon-action { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); border-radius: 9px; padding: 7px 9px; display:inline-flex; align-items:center; gap:6px; font-size: 11px; font-weight:800; cursor:pointer; text-decoration:none; }
.icon-action svg { width:14px; height:14px; }
.icon-action.active { color: var(--gold); border-color: rgba(255,170,0,0.55); background: rgba(255,170,0,0.08); }
.icon-action.danger { color: var(--danger); border-color: rgba(255,90,90,0.4); }
.stock-insight { color: var(--text-muted); font-size: 12px; line-height:1.4; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.04); padding: 8px 10px; border-radius: 10px; }
.list-item.soft-warning { border-left: 4px solid var(--gold); }
.favorites-card { border-left: 4px solid var(--gold); }
.favorite-grid { display:grid; gap:8px; margin-top:12px; }
.favorite-chip { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.favorite-chip span { font-size:13px; font-weight:800; }
.favorite-chip div { display:flex; gap:6px; }
.favorite-chip button, .favorite-chip a { width:32px; height:32px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,0.05); border:1px solid var(--border); color:var(--text); cursor:pointer; }
.favorite-chip svg { width:16px; height:16px; }

.routine-card p, .profile-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin: 8px 0 14px; }
.routine-top { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.routine-top > i { color: var(--accent); }
.routine-products { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 14px; }
.routine-product { background: rgba(219,121,222,0.12); color: var(--accent); border:1px solid rgba(219,121,222,0.25); border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; }
.routine-steps { display:grid; gap:8px; margin: 14px 0; }
.routine-step { display:flex; align-items:flex-start; gap:10px; background:var(--card-2); border:1px solid var(--border); border-radius:10px; padding:10px; text-transform:none; letter-spacing:0; font-size:13px; color:var(--text); font-weight:600; margin:0; }
.routine-step input { width:auto; margin:2px 0 0 0; accent-color: var(--accent); }
.history-routine { margin-top:8px; color:var(--accent); font-size:12px; display:flex; align-items:center; gap:6px; }
.history-routine svg { width:14px; height:14px; }

.settings-list { display:grid; gap:10px; margin-bottom:14px; }
.setting-switch { display:flex; justify-content:space-between; align-items:center; gap:12px; background:var(--card-2); border:1px solid var(--border); border-radius:12px; padding:12px; margin:0; text-transform:none; letter-spacing:0; }
.setting-switch.compact { margin-top: 10px; }
.setting-switch span { display:flex; flex-direction:column; gap:4px; }
.setting-switch strong { color:#fff; font-size:13px; }
.setting-switch small { font-size:11px; line-height:1.35; font-weight:500; text-transform:none; letter-spacing:0; }
.setting-switch input { width:22px; height:22px; min-width:22px; margin:0; accent-color: var(--accent); }
.notification-item { border:1px solid var(--border); border-left:4px solid var(--accent); background:var(--card-2); border-radius:12px; padding:12px; display:flex; align-items:flex-start; gap:12px; margin-bottom:10px; }
.notification-item.warning { border-left-color: var(--gold); }
.notification-item.critical { border-left-color: var(--danger); }
.notification-item.success { border-left-color: var(--success); }
.notification-item p { margin:4px 0; color: var(--text-muted); font-size:12px; line-height:1.4; }
.notification-item svg { color:var(--accent); min-width:18px; }
.favorite-profile-item { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.points-card { background:linear-gradient(135deg, rgba(219,121,222,0.18), rgba(255,170,0,0.10)); border:1px solid rgba(219,121,222,0.35); border-radius:14px; padding:14px; margin-bottom:12px; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.points-card strong { color:#fff; }
.achievement-item { background:var(--card-2); border:1px solid var(--border); border-radius:13px; padding:12px; display:flex; gap:12px; align-items:flex-start; margin-bottom:10px; opacity:0.72; }
.achievement-item.done { opacity:1; border-color:rgba(0,208,132,0.42); }
.achievement-item > i { color: var(--gold); min-width:20px; }
.achievement-item p { margin:4px 0 8px; color:var(--text-muted); font-size:12px; line-height:1.35; }
.progress { height:7px; border-radius:999px; background:rgba(255,255,255,0.08); overflow:hidden; margin-bottom:5px; }
.progress span { display:block; height:100%; background: var(--accent); }

.admin-container { max-width: 980px; }
.admin-tabs { display:flex; gap:8px; overflow-x:auto; margin-bottom:18px; padding-bottom:4px; }
.admin-tabs button { border:1px solid var(--border); background:var(--card-2); color:var(--text-muted); padding:10px 12px; border-radius:999px; font-weight:800; cursor:pointer; white-space:nowrap; }
.admin-tabs button.active { color:#fff; background:var(--accent); border-color:var(--accent); }
.admin-section { display:none; }
.admin-section.active { display:block; animation: fadeIn 0.2s ease; }
.admin-stats { display:grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap:10px; margin-bottom:18px; }
.admin-stat-card { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:6px; }
.admin-stat-card i { color:var(--accent); }
.admin-stat-card strong { font-size:24px; color:#fff; }
.admin-stat-card small { font-weight:800; }
.health-list { display:grid; gap:10px; color:var(--text-muted); font-size:13px; line-height:1.45; }
.admin-editor-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.admin-editor-header h3 { margin:0; }
.admin-edit-card textarea { min-height: 88px; }
.admin-row-card, .admin-topic-row { background:var(--card-2); border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:10px; display:grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap:8px; align-items:center; }
.admin-topic-row { grid-template-columns: minmax(0, 1fr) auto; cursor:default; }
.admin-topic-row > div:first-child { cursor:pointer; }
.admin-row-card input { margin-bottom:0; }
.mini-check { margin:0; text-transform:none; letter-spacing:0; color:var(--text-muted); font-size:12px; font-weight:700; display:flex; gap:6px; align-items:center; }
.mini-check input { width:auto; margin:0; }
hr { border:none; border-top:1px solid var(--border); margin:18px 0; }

@media (max-width: 560px) {
    .admin-row-card, .admin-topic-row { grid-template-columns: 1fr; }
    .favorite-profile-item, .points-card { flex-direction:column; align-items:flex-start; }
}

/* v4.1 - Navegación compacta sin scroll horizontal + accesos superiores */
.app-header { justify-content: center; min-height: 72px; }
.header-logo { display:inline-flex; align-items:center; justify-content:center; }
.header-actions {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-icon-link {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    text-decoration: none;
}
.header-icon-link.active, .header-icon-link:active { color: var(--accent); border-color: rgba(219,121,222,0.55); }
.header-icon-link svg { width: 19px; height: 19px; }
.header-badge {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    border: 2px solid #000;
    font-size: 9px;
    line-height: 14px;
    font-weight: 900;
    text-align: center;
}
.bottom-nav {
    overflow-x: visible;
    justify-content: space-around;
    gap: 0;
    padding: 8px 2px calc(12px + env(safe-area-inset-bottom)) 2px;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-item {
    min-width: 0;
    flex: 1 1 0;
    font-size: 7.5px;
    line-height: 1.1;
    gap: 3px;
    padding: 2px 1px;
    white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; }
.admin-nav-item { color: #8f6dff; }
@media (max-width: 380px) {
    header img { height: 34px; max-width: 190px; object-fit: contain; }
    .header-actions { right: 9px; gap: 5px; }
    .header-icon-link { width: 34px; height: 34px; }
    .nav-item span { font-size: 7px; }
    .nav-item svg { width: 16px; height: 16px; }
}

/* v4.2 - Panel real de notificaciones, rutinas y acciones de borrado */
.notifications-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:14px; }
.notifications-panel-head h3 { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.notification-body { flex:1; min-width:0; }
.notification-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.notifications-open-link { display:block; text-align:center; margin-top:10px; }
.history-actions { display:flex; justify-content:flex-end; margin-top:12px; }
.compact-actions { justify-content:flex-end; margin-top:0; }
.routine-help { margin-bottom:18px; }
.routine-card .btn-wmb { margin-top: 10px; }
@media (max-width: 520px) {
    .notifications-panel-head { flex-direction:column; }
    .notifications-panel-head .icon-action { width:100%; justify-content:center; }
}
.meteo-note { margin-top:10px; border:1px solid rgba(255,170,0,0.35); background:rgba(255,170,0,0.06); color:var(--text-muted); border-radius:12px; padding:10px; display:flex; gap:8px; align-items:flex-start; font-size:12px; line-height:1.4; }
.meteo-note svg { width:16px; height:16px; min-width:16px; color:var(--gold); }

/* v4.4 - Auditoría responsive y mejoras de stock */
.stock-item { overflow: hidden; }
.stock-topline { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; }
.stock-title-block { min-width:0; }
.stock-title-block .list-item-title { overflow-wrap:anywhere; }
.stock-progress { height:8px; border-radius:999px; background:rgba(255,255,255,0.08); overflow:hidden; margin:2px 0 10px; }
.stock-progress span { display:block; height:100%; min-width:3px; background:var(--accent); border-radius:999px; transition:width .25s ease; }
.soft-critical { border-left:4px solid var(--danger); }
.soft-critical .stock-progress span { background:var(--danger); }
.stock-actions .btn-buy { min-height:32px; }

button, a, input, select, textarea { -webkit-tap-highlight-color: rgba(219,121,222,0.18); }
.icon-action, .btn-buy, .btn-yt, .btn-outline { min-height:34px; }

.bottom-nav {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 4px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.nav-item {
    flex: 0 0 68px;
    min-width: 68px;
    scroll-snap-align: center;
    font-size: 8px;
    padding: 4px 2px;
}
.nav-item svg { width:18px; height:18px; }

@media (min-width: 760px) {
    body { padding-bottom: 110px; }
    .container { max-width: 880px; }
    .bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        width: min(920px, calc(100% - 32px));
        bottom: 14px;
        border: 1px solid var(--border);
        border-radius: 24px;
        padding: 10px 12px;
        box-shadow: 0 18px 40px rgba(0,0,0,.35);
        justify-content: center;
    }
    .nav-item { flex: 1 1 0; min-width: 74px; }
}

@media (max-width: 560px) {
    body { padding-bottom: 104px; }
    .container { padding: 16px 14px; }
    .glass-card { padding: 15px; border-radius: 15px; }
    h2 { font-size: 19px; line-height:1.25; }
    .stock-topline, .favorite-profile-item, .thread-header, .admin-editor-header { align-items:stretch; flex-direction:column; }
    .stock-badge { align-self:flex-start; }
    .list-actions, .stock-actions, .smart-actions, .academy-actions, .notification-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .list-actions > *, .stock-actions > *, .smart-actions > *, .academy-actions > *, .notification-actions > * { width:100%; justify-content:center; }
    .meteo-search-row { align-items:stretch; }
    .meteo-search-row .compact-btn { min-width:48px; }
    .checkbox-row { align-items:flex-start; }
    .checkbox-row input[type="number"] { width:110px; }
    .admin-tabs { padding-bottom:8px; }
}

@media (max-width: 380px) {
    .list-actions, .stock-actions, .smart-actions, .academy-actions, .notification-actions { grid-template-columns:1fr; }
    .bottom-nav { padding-left: 8px; padding-right: 8px; }
    .nav-item { flex-basis: 64px; min-width:64px; }
}
