/* ==========================================================================
   FEUILLE DE STYLE PRINCIPALE (app.css) - VERSION COMPLÈTE UNIFIÉE
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES ET STYLES GLOBAUX
   ========================================================================== */

:root {
  --bg: #181818;
  --fg: #f5f5f5;
  --accent: #e5a00d;
  --accent-2: #ffc107;
  --panel: #222;
  --muted: #444;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Cinzel', serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ==========================================================================
   2. ÉLÉMENTS DE BASE (TYPOGRAPHIE, LIENS)
   ========================================================================== */
h1, h2, h3 {
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

a:hover {
  opacity: 0.9;
}

ul {
  padding-left: 1.1rem;
}

code {
  background: #111;
  padding: .2rem .4rem;
  border-radius: .3rem;
  font-family: monospace;
}

.mono {
  color: var(--accent);
  font-family: monospace;
  font-size: 1.05em;
  display: block;
  margin: .3rem 0;
}

/* ==========================================================================
   3. STRUCTURE ET MISE EN PAGE (LAYOUT)
   ========================================================================== */

.page {
  padding: 2.5rem;
}

.container {
  background: var(--panel);
  padding: 2.5rem;
  border-radius: 1.2rem;
  box-shadow: 0 0 40px 10px var(--muted), 0 0 0 10px var(--accent) inset;
  border: 2px solid var(--muted);
}

.topbar {
  text-align: right;
  margin-bottom: 1.2rem;
  font-size: 1.1em;
}

/* ==========================================================================
   4. COMPOSANTS UI
   ========================================================================== */

/* --- Barre de menu responsive --- */
.menu-bar {
  background: #181818;
  padding: .75rem 1rem;
  border-radius: 1.2rem;
  box-shadow: 0 0 24px #660000;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .8rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.menu-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  height: 40px;
  padding: .55rem .95rem;
  border-radius: .7rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #f5f5f5;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: background .15s, color .15s, box-shadow .15s, transform .05s;
}

.menu-bar a:hover,
.menu-bar a:focus {
  background: #f5f5f5;
  color: #cc0000;
  box-shadow: 0 0 0 3px var(--accent);
  outline: none;
}

.menu-bar a:active {
  transform: translateY(1px);
}

.menu-bar a.active {
  background: var(--accent);
  color: #181818;
  border-color: transparent;
}


/* --- Formulaires et champs de saisie --- */
input, button, select {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
}

input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  padding: 1.1rem;
  margin-bottom: 1.1rem;
  border-radius: .7rem;
  border: 1px solid var(--muted);
  background: #222;
  color: var(--fg);
  font-weight: bold;
}

input::placeholder {
  color: #aaa;
  opacity: .6
}

button {
  background-color: var(--accent);
  color: var(--fg);
  padding: 1.1rem 1.6rem;
  border: none;
  border-radius: .7rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--muted);
  transition: background .2s;
}

button:hover {
  background-color: var(--accent-2);
}

.search-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: 1.2rem;
  background: #444;
  border-radius: 1.1rem;
  padding: 1.2rem 2rem;
  border: 2px solid var(--accent);
  box-shadow: 0 0 16px #444;
  align-items: center;
}

.search-form input[type="text"] {
  flex-grow: 1;
  font-size: 1.2rem;
  background: #222;
  color: var(--accent);
  border: 1px solid var(--muted);
  border-radius: .7rem;
  padding: 1rem;
  font-weight: bold;
}


/* --- Tableaux de données --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  box-shadow: 0 0 20px #444
}

th, td {
  padding: 1rem;
  border-bottom: 2px solid #444;
}

th {
  background-color: #181818;
  color: #e5a00d;
  font-family: 'UnifrakturCook', serif;
  letter-spacing: .08em;
  text-align: left;
}

tr:nth-child(even) { background-color: var(--muted); }
tr:nth-child(odd) { background-color: var(--bg); }


/* --- Badges (étiquettes colorées) --- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: .9rem;
}
.badge-reso { background: #1e3a8a; }
.badge-lang { background: #e65100; }
.badge-quality { background: #6a1b9a; }
.badge-size { background: #2e7d32; }
.badge-admin { background: #455a64; }


/* ==========================================================================
   5. STYLES SPÉCIFIQUES AUX PAGES ET COMPOSANTS COMPLEXES
   ========================================================================== */

/* --- Page de Connexion --- */
.page-login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
.login-card {
  width: 360px;
  text-align: center;
}

/* --- Panneaux SABnzbd et Plex --- */
.sab-panels {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 0 auto 18px;
  max-width: 1300px;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 320px;
  max-width: 440px;
  max-height: 350px;
  overflow: auto;
  word-break: break-word;
}

.panel-title {
  color: red;
  font-family: 'UnifrakturCook', serif;
  font-size: 1.05em;
}

.terminal-text {
  color: #e5a00d;
  font-size: 1.05em;
}

.progress-wrap {
  background: #444;
  border-radius: 6px;
  overflow: hidden;
  height: 14px;
}
.progress {
  height: 100%;
  background: #e5a00d;
  width: var(--p, 0%);
}


/* --- Style des résultats de recherche --- */
.item-title {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: .4rem;
}
.tag-row {
  font-size: 1.05em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-downloaded {
  background: #9c27b0 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 12px rgba(156, 39, 176, .55) !important;
  transform: translateZ(0);
}

.downloaded-note {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.downloaded-note .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(46, 125, 50, .55);
}
.downloaded-note .text {
  background: linear-gradient(90deg, #1b5e20, #2e7d32);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25), 0 0 14px rgba(46, 125, 50, .45);
}


/* --- Panneau des sessions Plex --- */
#plex-sessions-content .session { margin: .6rem 0; }
#plex-sessions-content .file-box {
  display: inline-block;
  background: #111;
  border: 1px solid #333;
  border-radius: .4rem;
  padding: .35rem .6rem;
  font-weight: 700;
  color: #e5a00d;
}
#plex-sessions-content code {
  background: transparent;
  padding: 0;
}
#plex-sessions-content .mode {
  margin-left: .6rem;
  padding: .25rem .5rem;
  border-radius: .4rem;
  border: 1px solid #333;
  font-size: .9rem;
}
#plex-sessions-content .mode.direct {
  color: #1db954;
  border-color: #1db95433;
  background: #1db9541a;
}
#plex-sessions-content .mode.transcode {
  color: #ff7043;
  border-color: #ff704333;
  background: #ff70431a;
}

.inline-form { display: inline-flex; gap: 10px; align-items: center; }
select { background-color: #222; color: var(--fg); border: 1px solid var(--muted); border-radius: .5rem; padding: .5rem 1rem; }
.summary { display: flex; gap: 2rem; margin: 2rem 0; background: #222; padding: 1rem 2rem; border: 2px solid var(--accent); border-radius: 1rem; justify-content: space-around; font-size: 1.1em; }
.summary div { color: var(--fg); text-align: center; }
.summary div strong { display: block; font-size: 2rem; color: var(--accent); }
.button-row, .nav-buttons, .filter-buttons { margin: 1rem 0; }
.button-row form, .nav-buttons form, .filter-buttons form { display: inline-block; margin-right: 10px; }
.button, .nav-buttons button, .filter-buttons button { padding: .6rem 1.2rem; font-weight: bold; border-radius: 8px; border: none; cursor: pointer; background: #444; color: #fff; }
.button.primary, .nav-buttons .primary, .filter-buttons .primary { background: var(--accent); color: #fff; }
.result-message.success { color: #43a047; }
.result-message.error { color: #9c0000; }
.card { background: #222; border: 2px solid var(--accent); border-radius: 12px; padding: 18px; max-width: 720px; margin: 2rem auto; }
.card code { background: #111; color: #fff; padding: .3rem .5rem; border-radius: .3rem; font-size: 1.1em; }
.row { display: flex; gap: 10px; align-items: center; margin-top: .8rem; }
.inline { display: inline-flex; gap: 10px; align-items: center; margin: .25rem 0; }
.hint { color: #aaa; font-size: .9em; margin-top: .4rem; }
#sab-history { line-height: 1.35; }
#sab-history .history-item { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; flex-wrap: wrap; }
#sab-history .file-box { display: inline-block; background: #111; border: 1px solid #333; border-radius: .4rem; padding: .35rem .6rem; font-weight: 700; color: #e5a00d; max-width: 100%; }
#sab-history .size { font-size: .95em; opacity: .85; }
#sab-history .status { border: 1px solid #333; border-radius: .35rem; padding: .15rem .45rem; font-size: .9em; }
#sab-history .status.ok { color: #16ff16; border-color: #16ff1633; background: #16ff161a; }
.sab-item .status.ok { color: #22c55e !important; font-weight: bold; }
.sab-item .status.fail { color: #ef4444 !important; font-weight: bold; }
.sab-item .status.other { color: #999 !important; }
.sab-user .sab-username { color: #eab308 !important; font-weight: bold; font-size: 0.95em; display: inline-block; margin-top: 2px; }

/* ==========================================================================
   6. STATISTIQUES DE STOCKAGE
   ========================================================================== */
.storage-stats-panel { background: var(--panel); border: 2px solid #ffc107; box-shadow: 0 0 12px rgba(255, 193, 7, 0.3); }
.storage-stats-panel .panel-title { color: #ffc107; font-family: 'UnifrakturCook', serif; font-size: 1.05em; margin-bottom: 12px; display: block; }
.storage-item { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.storage-item:last-child { border-bottom: none; }
.storage-label { color: #e5a00d; font-weight: bold; font-size: 0.95em; flex: 1; min-width: 0; }
.storage-value { color: #f5f5f5; font-family: monospace; font-size: 1.2em; text-align: right; font-weight: bold; flex: 0 0 auto; margin-left: 8px; }
.storage-free { color: #4caf50 !important; }
.storage-used { color: #ff9800 !important; }
.storage-traffic-ok { color: #4caf50 !important; }
.storage-traffic-used { color: #f44336 !important; }
.storage-reset { color: #2196f3 !important; }
.storage-separator { height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 12px 0; opacity: 0.5; }

/* ==========================================================================
   7. STYLES EXTRAITS DU JAVASCRIPT (Erreurs, Tautulli, Recettes, Épicerie)
   ========================================================================== */

/* --- Page d'erreur (Application désactivée) --- */
.page-disabled { background: #0e0e0e; display: flex; justify-content: center; align-items: center; height: 100vh; text-align: center; }
.disabled-container { max-width: 800px; padding: 40px; }
.disabled-container h1 { color: #ff6b6b; font-size: 28px; margin-bottom: 20px; }
.disabled-container p { font-size: 18px; margin: 15px 0; color: #e0e0e0; }

/* --- Historique Tautulli --- */
.tautulli-table { width: 100%; margin-top: 20px; }
.tautulli-table th { background: #2c3e50; color: #ecf0f1; padding: 12px; text-align: left; }
.tautulli-table td { padding: 10px; border-bottom: 1px solid #34495e; }
.percent-bar { background: #34495e; height: 20px; border-radius: 4px; overflow: hidden; position: relative; }
.percent-fill { background: linear-gradient(90deg, #3498db, #2ecc71); height: 100%; transition: width 0.3s ease; }
.percent-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-weight: bold; font-size: 12px; }
.toolbar { margin: 20px 0; display: flex; gap: 10px; align-items: center; }
.toolbar select, .toolbar button { padding: 8px 12px; }
.error-message { background: #e74c3c; color: white; padding: 15px; border-radius: 4px; margin: 20px 0; }
.spinner { border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.title-cell { display: flex; flex-direction: column; gap: 4px; }
.title-main { font-weight: 500; }
.file-name { font-size: 11px; color: #7f8c8d; font-family: monospace; word-break: break-all; opacity: 0.8; }

/* --- Épicerie --- */
.page-epicerie { background: #e8e8e8; }
.ep-wrap { max-width: 960px; margin: 16px auto; padding: 20px 24px 60px; background: #ccc; border-radius: 12px; color: #222; }
.ep-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.ep-title { font-size: 26px; font-weight: 700; flex: 1; color: #222; font-family: 'Cinzel', serif; }
.ep-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; border: none; font-family: 'Cinzel', serif; text-transform: uppercase; letter-spacing: .04em; }
.ep-btn-copy { background: #1a8a1a; color: #fff; }
.ep-btn-copy:hover { background: #157015; }
.ep-btn-print { background: #1565c0; color: #fff; }
.ep-btn-print:hover { background: #1050a0; }
.ep-btn-clear { background: #b34700; color: #fff; }
.ep-btn-clear:hover { background: #8a3500; }
.ep-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.ep-section-title { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px solid #f0c040; }
.gi-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 8px; border-bottom: 1px solid #bbb; border-radius: 6px; transition: background .1s; }
.gi-item:hover { background: #c5c5c5; }
.gi-checked .gi-name { text-decoration: line-through; color: #888; }
.gi-label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.gi-cb { width: 17px; height: 17px; cursor: pointer; accent-color: #1a8a1a; flex-shrink: 0; }
.gi-name { font-size: 13px; font-weight: 700; color: #222; text-transform: uppercase; letter-spacing: .05em; }
.gi-qty { font-size: 13px; font-weight: 700; color: #d4761a; background: #fff8f0; border-radius: 20px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0; border: 1px solid #e0c090; }
.gi-divider { font-size: 11px; font-weight: 700; color: #777; text-transform: uppercase; letter-spacing: .06em; padding: 14px 0 6px; margin-top: 8px; }
.gi-empty { color: #888; font-size: 14px; padding: 20px 0; text-align: center; }
.gr-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 8px; border-bottom: 1px solid #bbb; border-radius: 6px; }
.gr-item:hover { background: #c5c5c5; }
.gr-title { font-size: 13px; font-weight: 700; color: #222; flex: 1; line-height: 1.3; text-decoration: none; text-transform: uppercase; letter-spacing: .03em; }
.gr-title:hover { text-decoration: underline; color: #1565c0; }
.gr-remove { background: none; border: none; color: #888; cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.gr-remove:hover { background: #ffebee; color: #c62828; }
.ep-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 999; }
.ep-toast.show { opacity: 1; }
.ep-fab { position: fixed; bottom: 24px; right: 24px; background: #1a8a1a; color: #fff; border: none; border-radius: 50px; padding: 13px 20px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.25); text-decoration: none; display: flex; align-items: center; gap: 8px; z-index: 50; }
.ep-fab:hover { background: #157015; }

/* --- Cartes Recettes & Favoris (Styles partagés) --- */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 0 24px 40px; }
.rc-card { display: block; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.1); overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; color: inherit; }
.rc-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.16); }
.rc-img { height: 180px; background-size: cover; background-position: center; background-color: #f0f0f0; }
.rc-no-img { display: flex; align-items: center; justify-content: center; font-size: 40px; }
.rc-no-img::after { content: '🍽️'; }
.rc-body { padding: 14px 16px; color: #222; }
.rc-name { font-size: 15px; font-weight: 700; color: #222; line-height: 1.35; }
.rc-folder { font-size: 11px; color: #999; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.rc-card-wrap { position: relative; display: block; }
.rc-fav-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5); border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #aaa; transition: all .15s; z-index: 2; line-height: 1; }
.rc-fav-btn:hover, .rc-fav-btn.active { color: #e8a547; background: rgba(0,0,0,.7); }
.rc-match { font-size: 11px; color: #1a8a1a; font-weight: 700; margin-top: 4px; }

/* --- Page Favoris --- */
.page-favoris { background: var(--bg); }
.fav-header { max-width: 1100px; margin: 28px auto 16px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.fav-title { font-size: 1.3rem; font-weight: 700; color: var(--text, #f0ede8); }
.fav-count { font-size: .82rem; color: #888; }
.fav-empty { text-align: center; padding: 60px 24px; color: #888; font-size: 15px; }

/* --- Index des Recettes (Recherche & Filtres) --- */
.page-recipes { background: var(--bg); }
.rc-search-wrap { max-width: 640px; margin: 32px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.rc-search-row { display: flex; gap: 8px; }
.rc-search-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #888; margin-bottom: 2px; }
.rc-search-input { flex: 1; padding: 11px 16px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; outline: none; box-shadow: 0 1px 4px rgba(0,0,0,.07); background: #fff; color: #222;}
.rc-search-input:focus { border-color: #555; box-shadow: 0 1px 6px rgba(0,0,0,.13); }
.rc-search-input-ing { border-color: #a0c4a0; }
.rc-search-input-ing:focus { border-color: #1a8a1a; box-shadow: 0 1px 6px rgba(26,138,26,.2); }
.rc-search-btn { padding: 11px 22px; border-radius: 8px; background: #222; color: #fff; border: none; font-size: 15px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.rc-search-btn:hover { background: #444; }
.rc-search-btn-ing { background: #1a8a1a; }
.rc-search-btn-ing:hover { background: #157015; }
.rc-hint { text-align: center; color: #888; padding: 40px 20px; font-size: 15px; }
.rc-count { text-align: center; color: #666; font-size: 13px; margin: 18px 0 10px; padding: 0 24px; }
.rc-filters-bar { max-width: 1100px; margin: 16px auto 0; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rc-filter-label { font-size: .72rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.rc-site-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 20px; border: 1px solid #333; background: #1a1a1a; color: #aaa; font-size: .75rem; cursor: pointer; transition: all .15s; user-select: none; }
.rc-site-chip:hover { border-color: #888; color: #fff; }
.rc-site-chip.active { border-color: #e8c547; background: #2a2a1a; color: #e8c547; font-weight: 600; }
.rc-site-chip .rc-chip-check { font-size: .65rem; }
.rc-fav-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 20px; border: 1px solid #333; background: #1a1a1a; color: #aaa; font-size: .75rem; cursor: pointer; transition: all .15s; user-select: none; }
.rc-fav-chip:hover { border-color: #e8a547; color: #e8a547; }
.rc-fav-chip.active { border-color: #e8a547; background: #2a1a0a; color: #e8a547; font-weight: 600; }

/* --- Page Vue Détaillée d'une Recette --- */
.page-recipe-view { background: var(--bg); }
.rv-wrap { max-width: 960px; margin: 16px auto; padding: 20px 24px 60px; background: #ccc; border-radius: 12px; color: #222; }
.rv-back { display: inline-block; color: #666; text-decoration: none; font-size: 13px; margin-bottom: 16px; }
.rv-back:hover { color: #222; }
.rv-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; display: block; }
.rv-title { font-size: 26px; font-weight: 700; color: #222; margin: 0 0 6px; line-height: 1.25; }
.rv-description { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 14px; }
.rv-actions { display: flex; gap: 10px; margin: 14px 0 20px; flex-wrap: wrap; align-items: center; }
.rv-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; }
.rv-btn-grocery { background: #1a8a1a; color: #fff; }
.rv-btn-grocery:hover:not([disabled]) { background: #157015; }
.rv-btn-grocery[disabled] { opacity: .85; cursor: default; }
.rv-btn-list { background: #f0f0f0; color: #333; }
.rv-btn-list:hover { background: #e0e0e0; }
.rv-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rv-badge { padding: 5px 12px; border-radius: 20px; font-size: 13px; background: #f5f5f5; border: 1px solid #e0e0e0; color: #444; }
.rv-source { font-size: 12px; color: #aaa; margin-bottom: 24px; word-break: break-all; }
.rv-source a { color: #aaa; }
.rv-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; }
.rv-section-title { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #f0c040; }
.rv-ing-row { padding: 7px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; color: #222; line-height: 1.4; }
.rv-ing-row:last-child { border-bottom: none; }
.rv-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.rv-step:last-child { border-bottom: none; }
.rv-step-num { min-width: 30px; height: 30px; border-radius: 50%; background: #f0c040; color: #222; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 3px; }
.rv-step-text { font-size: 15px; color: #222; line-height: 1.7; }
.rv-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 22px; border-radius: 8px; font-size: 14px; color: #fff; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 999; background: #333; }

/* ==========================================================================
   8. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1200px) {
  .sab-panels { flex-wrap: wrap; justify-content: center; }
  .storage-stats-panel { order: -1; width: 100%; max-width: none; }
}

@media (max-width: 900px) {
  .menu-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .menu-bar a { flex: 0 0 auto; }
  .page { padding: 1.5rem; }
  .sab-panels { flex-direction: column; }
  .storage-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .storage-label { font-size: 0.9em; }
  .storage-value { text-align: left; margin-left: 0; font-size: 0.95em; }
}

@media (max-width: 640px) {
  .rv-layout { grid-template-columns: 1fr; }
  .rv-image { max-height: 220px; }
}

@media print {
  .topbar, .ep-btn, .gr-remove, .ep-fab { display: none !important; }
  .ep-layout { grid-template-columns: 1fr; }
  .gi-checked { display: none; }
}
