/* ── Design tokens — FIFA World Cup 2026 ──────────────────────────────────── */
:root {
    --primary: #0B2265;
    --primary-light: #1a3a8f;
    --accent: #00A651;
    --accent-dark: #007A3D;
    --orange: #F5C518;
    --purple: #6a0dad;
    --blue: #1565c0;
    --red: #D4001A;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --border: #dde3ec;
    --text: #1a2332;
    --text-muted: #8293a8;
    --input-bg: #ffffff;
    --sidebar-w: 210px;
    --header-h: 54px;
    --radius: 10px;
}

[data-theme="dark"] {
    --bg: #080d18;
    --card-bg: #0f1626;
    --border: #1e2a40;
    --text: #ffffff;
    --text-muted: #c0cde0;
    --input-bg: #0f1626;
    --blue: #7ab8ff;
    --accent: #00c860;
    --orange: #F5C518;
    --purple: #c084fc;
    --red: #ff6b84;
}

/* Dark mode: override primary-colored text to white */
[data-theme="dark"] .country-name,
[data-theme="dark"] .album-title-row h2,
[data-theme="dark"] .section-title,
[data-theme="dark"] .wishlist-country,
[data-theme="dark"] .missing-country,
[data-theme="dark"] .wishlist-section-block .section-toggle-btn,
[data-theme="dark"] .matches-section .section-toggle-btn,
[data-theme="dark"] .can-offer-section .section-toggle-btn,
[data-theme="dark"] .auth-title,
[data-theme="dark"] .profile-page .section-title,
[data-theme="dark"] .trades-section .section-title { color: var(--text); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { max-width: 100%; overflow-x: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); transition: background 0.2s, color 0.2s; max-width: 100%; overflow-x: hidden; }
button, a { touch-action: manipulation; }
.hidden { display: none !important; }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: #b0bec8 transparent; }
[data-theme="dark"] * { scrollbar-color: #2e3f56 transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b0bec8; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #8293a8; }
::-webkit-scrollbar-corner { background: transparent; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2e3f56; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #3d5270; }

/* ── Auth ─────────────────────────────────────────────────────────────────── */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #0B2265 0%, #1a3a8f 40%, #0d6b3a 100%); }
.auth-card { background: var(--card-bg); border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.auth-logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.auth-logo img { width: 110px; height: auto; }
.auth-title { font-size: 22px; font-weight: 700; text-align: center; color: var(--primary); }
.auth-subtitle { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-error { background: #ffebee; color: #c62828; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; margin-top: 14px; }
.auth-form input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; background: var(--input-bg); color: var(--text); transition: border 0.2s; }
.auth-form input:focus { border-color: var(--primary); }
.auth-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ── App shell ────────────────────────────────────────────────────────────── */
.app-wrapper { display: grid; grid-template-rows: var(--header-h) 1fr; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

.app-header { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, #0B2265 0%, #1a3a8f 50%, #0B2265 100%); color: white; padding: 0 14px; height: var(--header-h); box-shadow: 0 2px 12px rgba(0,0,0,0.3); position: sticky; top: 0; z-index: 100; gap: 8px; }
.header-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.brand-logo { height: 24px; width: auto; max-width: 36px; object-fit: contain; display: block; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow: hidden; }

.sidebar { background: var(--card-bg); border-right: 1px solid var(--border); overflow-y: auto; padding: 14px 0; }
.sidebar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 0 14px 8px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 9px 14px; text-decoration: none; color: var(--text); transition: background 0.15s; }
.sidebar-user:hover { background: var(--bg); }
.sidebar-user.active { background: #fce4ec; border-right: 3px solid var(--primary); }
[data-theme="dark"] .sidebar-user.active { background: #2a1520; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-info .username { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .completion { font-size: 11px; color: var(--text-muted); }

.layout-body { display: contents; }
.main-content { overflow-y: auto; padding: 18px 20px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary { background: var(--primary); color: white; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-block { width: 100%; margin-top: 16px; padding: 12px; font-size: 16px; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.modal-count-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 10px; min-height: 16px; }
.feedback-char-count { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.sidebar-footer { border-top: 1px solid var(--border); margin-top: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer-btn { background: none; border: 1.5px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; text-align: left; text-decoration: none; transition: all 0.15s; display: block; }
.sidebar-footer-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-link { color: var(--accent-dark); border-color: var(--accent); }
.admin-link:hover { background: #e8f5e9; color: var(--accent-dark); }
.admin-feedback-page { max-width: 700px; }
.admin-users-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.admin-user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 14px; flex-wrap: wrap; }
.admin-user-name { font-size: 13px; font-weight: 700; }
.admin-pw-form { display: flex; gap: 6px; align-items: center; }
.admin-pw-input { padding: 6px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; background: var(--input-bg); color: var(--text); outline: none; width: 160px; }
.admin-pw-input:focus { border-color: var(--primary); }
.admin-pw-btn { padding: 6px 12px; font-size: 13px; }
.feedback-count { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.feedback-entry-card { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.feedback-entry-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.feedback-entry-user { font-size: 13px; font-weight: 700; }
.feedback-entry-username { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.feedback-entry-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.feedback-entry-msg { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }

.btn-edit { background: rgba(255,255,255,0.14); color: white; border: 1.5px solid rgba(255,255,255,0.35); border-radius: 7px; padding: 5px 11px; font-size: 12px; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.btn-edit:hover, .btn-edit.active { background: rgba(255,255,255,0.26); border-color: white; }
.icon-btn { background: none; border: none; color: white; font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 6px; transition: background 0.15s; }
.icon-btn:hover { background: rgba(255,255,255,0.15); }
.viewing-label { font-size: 13px; color: rgba(255,255,255,0.85); white-space: nowrap; }

/* Notification */
.notif-wrapper { position: relative; }
.notif-btn { background: none; border: none; color: white; font-size: 20px; cursor: pointer; position: relative; padding: 4px 6px; }
.badge { position: absolute; top: -1px; right: -3px; background: #f44336; color: white; border-radius: 10px; font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center; }
.changelog-box { max-width: 420px; }
.changelog-list { display: flex; flex-direction: column; max-height: 55vh; overflow-y: auto; margin-top: 6px; }
.changelog-entry { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.changelog-entry:last-child { border-bottom: none; }
.changelog-entry.changelog-new { background: #e8f4fd; border-radius: 7px; padding: 9px 10px; margin: 2px -10px; }
[data-theme="dark"] .changelog-entry.changelog-new { background: #0d1f35; }
.changelog-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; font-weight: 600; min-width: 38px; padding-top: 1px; }
.changelog-text { font-size: 13px; line-height: 1.45; }

.user-chip { display: flex; align-items: center; gap: 6px; font-size: 13px; color: white; min-width: 0; }
.user-chip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.user-avatar-sm { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.logout-link { color: rgba(255,255,255,0.65); font-size: 11px; text-decoration: none; margin-left: 2px; flex-shrink: 0; }
.logout-link:hover { color: white; }

/* ── Album header ─────────────────────────────────────────────────────────── */
.album-header { margin-bottom: 18px; }
.album-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.album-title-row h2 { font-size: 18px; font-weight: 700; color: var(--primary); }
.header-controls { display: flex; gap: 8px; flex-wrap: wrap; }

.sort-controls, .view-controls { display: inline-flex; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; gap: 0; flex-shrink: 0; }
.sort-btn { background: transparent; border: none; border-right: 1px solid var(--border); border-radius: 0; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; }
.sort-btn:last-child { border-right: none; }
.sort-btn:hover { background: rgba(11,34,101,0.07); color: var(--primary); }
.sort-btn.active { background: var(--primary); color: white; }
[data-theme="dark"] .sort-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* Search bar */
.search-bar { position: relative; margin-bottom: 10px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.search-bar input { width: 100%; padding: 8px 36px 8px 32px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--input-bg); color: var(--text); outline: none; transition: border 0.2s; }
.search-bar input:focus { border-color: var(--primary); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 14px; cursor: pointer; padding: 2px 6px; }

/* Stats chips */
.stats-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.chip-blue { background: #e3f2fd; color: var(--blue); }
.chip-orange { background: #fff3e0; color: var(--orange); }
.chip-purple { background: #f3e5f5; color: var(--purple); }
.chip-green { background: #e8f5e9; color: var(--accent-dark); }
[data-theme="dark"] .chip-blue { background: #1a2a3a; }
[data-theme="dark"] .chip-orange { background: #2a1f0a; }
[data-theme="dark"] .chip-purple { background: #20102a; }
[data-theme="dark"] .chip-green { background: #0d1f0f; }

.progress-container { background: var(--border); border-radius: 8px; height: 9px; overflow: hidden; margin-bottom: 5px; }
.progress-bar { background: linear-gradient(90deg, var(--accent) 0%, #00c860 100%); height: 100%; border-radius: 8px; transition: width 0.4s ease; }
.progress-label { font-size: 12px; color: var(--text-muted); }

/* ── Missing list view ────────────────────────────────────────────────────── */
.missing-view { margin-bottom: 16px; }
.missing-view-title { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.missing-list { display: flex; flex-direction: column; gap: 6px; }
.missing-row { display: flex; align-items: baseline; gap: 10px; background: var(--card-bg); border-radius: 8px; padding: 8px 12px; border: 1px solid var(--border); flex-wrap: wrap; }
.missing-row.missing-complete { border-color: var(--accent); background: rgba(0,166,81,0.04); }
[data-theme="dark"] .missing-row.missing-complete { background: rgba(0,200,96,0.04); }
.missing-country { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; display: flex; align-items: center; gap: 5px; min-width: 160px; }
.missing-row.missing-complete .missing-country { color: var(--accent-dark); }
[data-theme="dark"] .missing-row.missing-complete .missing-country { color: var(--accent); }
.missing-complete-badge { font-size: 12px; font-weight: 700; color: var(--accent-dark); background: #e8f5e9; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
[data-theme="dark"] .missing-complete-badge { background: #0d1f0f; color: var(--accent); }
.flag-img-sm { width: 16px; height: auto; max-height: 16px; border-radius: 2px; }
.missing-nums { font-size: 13px; color: var(--text-muted); flex: 1; }

/* ── Country card ─────────────────────────────────────────────────────────── */
.country-card { background: var(--card-bg); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.07); border-left: 4px solid var(--primary); transition: box-shadow 0.15s; }
.country-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.11); }
.country-card.hidden-card { display: none; }
.country-card.country-complete { border-left-color: var(--accent); }
.country-card.country-complete .country-name { color: var(--accent-dark); }
[data-theme="dark"] .country-card.country-complete .country-name { color: var(--accent); }
.country-header { display: flex; align-items: center; padding-bottom: 0; cursor: pointer; user-select: none; gap: 6px; }
.country-header:hover { opacity: 0.85; }
.country-chevron { font-size: 9px; color: var(--text-muted); flex-shrink: 0; }
.country-name { font-weight: 700; font-size: 14px; color: var(--primary); display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.country-name-display { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-card:not(.open) .country-mini-bar { display: none; }
.country-card:not(.open) .btn-complete-country { display: none; }
.country-name-code { font-size: 11px; font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.flag-img { width: 20px; height: auto; max-height: 20px; border-radius: 2px; flex-shrink: 0; }
.country-page { font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--bg); border-radius: 4px; padding: 1px 5px; margin-left: 2px; white-space: nowrap; }
.flag-emoji { font-size: 18px; }
.country-meta { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.country-mini-bar { width: 48px; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.country-mini-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.35s ease; }
.country-complete .country-mini-fill { background: var(--accent); }
.country-count { font-size: 11px; background: var(--bg); padding: 2px 7px; border-radius: 10px; font-weight: 700; color: var(--text-muted); }
.btn-repetidas { background: none; border: 1.5px solid var(--border); border-radius: 5px; font-size: 11px; padding: 2px 7px; cursor: pointer; color: var(--text-muted); transition: all 0.15s; white-space: nowrap; }
.btn-repetidas:hover, .btn-repetidas.open { background: #fff3e0; border-color: var(--orange); color: var(--orange); }
.btn-complete-country { background: none; border: 1.5px solid var(--accent); border-radius: 5px; font-size: 11px; padding: 2px 7px; cursor: pointer; color: var(--accent-dark); font-weight: 700; transition: all 0.15s; white-space: nowrap; }
.btn-complete-country:hover { background: var(--accent); color: white; }
[data-theme="dark"] .btn-complete-country { color: var(--accent); }
[data-theme="dark"] .btn-repetidas:hover, [data-theme="dark"] .btn-repetidas.open { background: #2a1f0a; }

/* Sticker grid */
.stickers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 5px; margin-top: 10px; }
.sticker { display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 52px; padding: 5px 3px 4px; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 6px; cursor: default; user-select: none; transition: all 0.15s; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.sticker-num { font-size: 11px; font-weight: 700; color: var(--text-muted); line-height: 1; }
.sticker.checked .sticker-num { color: white; }
.sticker.wished .sticker-num { color: #b8860b; }
.sticker-rep-bar { display: none; align-items: center; justify-content: center; gap: 2px; width: 100%; }
.sticker.checked .sticker-rep-bar { display: flex; }
.sticker-rep-btn { width: 14px; height: 14px; border: none; border-radius: 3px; font-size: 11px; font-weight: 800; line-height: 1; cursor: pointer; background: rgba(0,0,0,0.2); color: white; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.1s; }
.sticker-rep-btn:hover:not(:disabled) { background: rgba(0,0,0,0.38); }
.sticker-rep-btn:disabled { opacity: 0.3; cursor: default; }
.sticker-rep-qty { font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.9); min-width: 10px; text-align: center; }
.sticker.checked { background: var(--accent); color: white; border-color: var(--accent-dark); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); }
.sticker.wished { background: #fff8e1; border-color: #fbc02d; color: #f9a825; }
.sticker.wished::after { content: '⭐'; position: absolute; top: -5px; right: -5px; font-size: 9px; }
[data-theme="dark"] .sticker.wished { background: #2a200a; border-color: #f9a825; color: #f9a825; }
.sticker.wished { background: #fff8e1; border-color: #fbc02d; color: #b8860b; }
.sticker.wished::after { content: '⭐'; position: absolute; top: -5px; right: -4px; font-size: 8px; line-height: 1; }
[data-theme="dark"] .sticker.wished { background: #2a200a; border-color: #f9a825; color: #F5C518; }
.sticker.editable { cursor: pointer; }
.sticker.editable:hover:not(.checked):not(.wished) { background: #e8f5e9; border-color: var(--accent); color: var(--accent-dark); }
.sticker.wish-mode-on { cursor: pointer; }
.sticker.wish-mode-on:not(.checked):hover { background: #fff8e1; border-color: #fbc02d; color: #f9a825; }

/* Repetidas */
.repetidas-section { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.rep-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; }
.rep-item { display: flex; flex-direction: column; align-items: center; background: var(--bg); border: 1.5px solid var(--border); border-radius: 7px; padding: 5px 3px; gap: 3px; }
.rep-item.has-stock { border-color: var(--orange); background: #fff8f0; }
.rep-item.i-need { border-color: var(--accent); background: #e8f5e9; }
[data-theme="dark"] .rep-item.has-stock { background: #2a1f0a; }
[data-theme="dark"] .rep-item.i-need { background: #0d1f0f; }
.rep-num { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.rep-item.has-stock .rep-num { color: var(--orange); }
.rep-item.i-need .rep-num { color: var(--accent-dark); }
.rep-controls { display: flex; align-items: center; gap: 3px; }
.rep-btn { width: 20px; height: 20px; border: none; border-radius: 4px; background: var(--border); font-size: 15px; line-height: 1; cursor: pointer; font-weight: 700; color: var(--text-muted); transition: all 0.12s; }
.rep-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }
.rep-qty, .rep-qty-view { font-size: 13px; font-weight: 700; min-width: 16px; text-align: center; color: var(--orange); }
.btn-trade-sm { background: var(--primary); color: white; border: none; border-radius: 4px; font-size: 11px; padding: 2px 5px; cursor: pointer; }
.btn-trade-sm:hover { background: var(--primary-light); }
.btn-trade-need { background: var(--accent) !important; }
.btn-trade-need:hover { background: var(--accent-dark) !important; }
.rep-item.i-need .rep-num { color: var(--accent-dark); }
.need-badge { font-size: 9px; font-weight: 800; text-transform: uppercase; color: white; background: var(--accent-dark); border-radius: 4px; padding: 1px 4px; }
.wish-badge { font-size: 9px; font-weight: 700; color: #f9a825; background: #fff8e1; border-radius: 4px; padding: 1px 4px; }
[data-theme="dark"] .wish-badge { background: #2a200a; }

/* ── Match finder ─────────────────────────────────────────────────────────── */
.matches-section { margin-top: 20px; margin-bottom: 4px; }
.section-toggle-btn { background: none; border: none; border-bottom: 2px solid var(--border); border-radius: 0; padding: 11px 0; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--primary); width: 100%; text-align: left; transition: border-color 0.15s, color 0.15s; display: block; letter-spacing: -0.1px; }
.section-toggle-btn:hover { border-bottom-color: var(--primary); }
[data-theme="dark"] .section-toggle-btn { color: var(--text); }
.match-count { color: var(--text-muted); font-weight: 400; }
.matches-body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.matches-summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #e8f4fd; border-radius: 8px; font-size: 13px; border: 1px solid #c3dff7; }
[data-theme="dark"] .matches-summary { background: #0d1f35; border-color: #1e3a5f; }
.matches-summary strong { color: var(--primary); font-size: 15px; }
[data-theme="dark"] .matches-summary strong { color: #7ab8ff; }
.match-card { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 12px 14px; }
.match-card.match-mutual { border-color: var(--accent); }
.match-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.user-avatar-sm-inline { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.mutual-badge { background: #e8f5e9; color: var(--accent-dark); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
[data-theme="dark"] .mutual-badge { background: #0d1f0f; }
.match-row { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; align-items: flex-start; }
.match-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; padding-top: 2px; }
.match-stickers { display: flex; flex-wrap: wrap; gap: 4px; }
.match-trade-btn { margin-top: 6px; }

/* ── Trades ───────────────────────────────────────────────────────────────── */
.trades-section { margin-top: 28px; border-top: 2px solid var(--border); padding-top: 20px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.trades-subtitle { font-size: 13px; font-weight: 700; color: var(--text-muted); margin: 0; }
.trades-list-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 7px; flex-wrap: wrap; }
.trade-sort-controls .sort-btn { padding: 2px 8px; font-size: 11px; }
.trades-empty { color: var(--text-muted); font-size: 14px; padding: 12px 0; }

.trade-card { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 12px 14px; margin-bottom: 8px; }
.trade-card.trade-past { opacity: 0.72; }
.trade-header { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.trade-date { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.trade-chip-sort { display: flex; gap: 4px; margin-bottom: 5px; }
.trade-items { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 7px; }
.trade-items-inner { display: flex; gap: 20px; flex-wrap: wrap; }
.trade-col { display: flex; flex-direction: column; gap: 4px; }
.trade-col-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.trade-chip { background: #e3f2fd; color: var(--blue); border-radius: 10px; padding: 2px 7px; font-size: 11px; font-weight: 700; display: inline-block; }
.trade-chip.muted { background: var(--bg); color: var(--text-muted); }
.trade-chip.give { background: #e8f5e9; color: var(--accent-dark); }
[data-theme="dark"] .trade-chip { background: #1a2a3a; }
[data-theme="dark"] .trade-chip.give { background: #0d1f0f; color: var(--accent); }
.trade-note { font-size: 12px; color: var(--text-muted); font-style: italic; margin: 3px 0 7px; }
.trade-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.trade-waiting { font-size: 12px; color: var(--text-muted); font-style: italic; }
.btn-finalize { background: var(--accent); color: white; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-finalize:hover { background: var(--accent-dark); }
.btn-archive { background: none; border: 1.5px solid var(--border); color: var(--text-muted); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.btn-archive:hover { border-color: #f44336; color: #f44336; }
.btn-past-trades { background: transparent; border: 1.5px solid var(--border); border-radius: 20px; padding: 7px 18px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-muted); margin-top: 14px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px; }
.btn-past-trades:hover { background: var(--primary); border-color: var(--primary); color: white; }
.past-trades-section { margin-top: 10px; }
.trade-status-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.trade-status-chip.completed { background: #e8f5e9; color: var(--accent-dark); }
.trade-status-chip.archived { background: var(--bg); color: var(--text-muted); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 16px; }
.modal-box { background: var(--card-bg); border-radius: 14px; padding: 24px; width: 480px; max-width: 100%; position: relative; max-height: 85vh; overflow-y: auto; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.modal-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.modal-hint code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-family: monospace; }
.modal-section { margin-bottom: 14px; }
.modal-section label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 0; }
.label-hint { font-weight: 400; }
.modal-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.modal-label-row label { flex: 1; }
.modal-sort-controls { display: flex; gap: 3px; flex-shrink: 0; }
.modal-sort-btn { background: none; border: 1.5px solid var(--border); border-radius: 12px; padding: 2px 7px; font-size: 10px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.modal-sort-btn:hover { border-color: var(--primary); color: var(--primary); }
.modal-sort-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.trade-want-label { font-size: 14px; font-weight: 700; background: #e3f2fd; color: var(--blue); padding: 7px 11px; border-radius: 7px; }
[data-theme="dark"] .trade-want-label { background: #1a2a3a; }
.offer-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 180px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px; background: var(--bg); }
.offer-item { display: inline-flex; align-items: center; gap: 4px; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 12px; transition: all 0.15s; color: var(--text); }
.offer-item:hover { border-color: var(--orange); }
.offer-item.selected { background: #fff3e0; border-color: var(--orange); color: var(--orange); font-weight: 700; }
.offer-item.suggested { border-color: var(--accent); }
.offer-item.suggested::before { content: '⭐ '; }
[data-theme="dark"] .offer-item.selected { background: #2a1f0a; }
.want-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 150px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px; background: var(--bg); margin-top: 6px; }
.want-item { display: inline-flex; align-items: center; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 12px; transition: all 0.15s; color: var(--text); }
.want-item:hover { border-color: var(--blue); }
.want-item.selected { background: #e3f2fd; border-color: var(--blue); color: var(--blue); font-weight: 700; }
[data-theme="dark"] .want-item.selected { background: #1a2a3a; }
.modal-input { width: 100%; padding: 8px 11px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; outline: none; background: var(--input-bg); color: var(--text); }
.modal-input:focus { border-color: var(--primary); }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }

/* Bulk entry */
.bulk-mode-toggle { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.mode-option { flex: 1; display: flex; align-items: center; gap: 10px; border: 2px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all 0.15s; background: var(--bg); }
.mode-option:has(input:checked) { border-color: var(--primary); background: #eef2ff; }
[data-theme="dark"] .mode-option:has(input:checked) { background: #1a2040; }
.mode-option input[type=radio] { display: none; }
.mode-icon { font-size: 22px; flex-shrink: 0; }
.mode-option strong { display: block; font-size: 13px; color: var(--text); }
.mode-option small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.bulk-textarea { width: 100%; height: 120px; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: monospace; resize: vertical; outline: none; background: var(--input-bg); color: var(--text); margin-top: 10px; }
.bulk-textarea:focus { border-color: var(--primary); }

/* ── Trade message modal ───────────────────────────────────────────────────── */
.trade-msg-box { max-width: 720px; }
.trade-msg-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.trade-msg-section { display: flex; flex-direction: column; gap: 8px; }
.trade-msg-section-hdr { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.trade-msg-section-title { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.trade-msg-hdr-btns { display: flex; gap: 4px; }
.trade-msg-list { max-height: 220px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.trade-msg-empty { font-size: 12px; color: var(--text-muted); }
.trade-msg-group-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.trade-msg-group-name { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.trade-msg-tog { background: none; border: 1px solid var(--border); border-radius: 4px; font-size: 10px; padding: 1px 5px; cursor: pointer; color: var(--text-muted); transition: all 0.12s; }
.trade-msg-tog:hover { border-color: var(--primary); color: var(--primary); }
.trade-msg-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.trade-msg-chip { display: inline-flex; align-items: center; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: 11px; font-weight: 700; color: var(--text-muted); transition: all 0.12s; user-select: none; }
.trade-msg-chip.selected { background: #e3f2fd; border-color: var(--blue); color: var(--blue); }
[data-theme="dark"] .trade-msg-chip.selected { background: #1a2a3a; }
.trade-msg-preview { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.trade-msg-preview-hdr { display: flex; align-items: center; justify-content: space-between; }
.trade-msg-preview-hdr .btn-primary { padding: 6px 14px; font-size: 13px; margin-top: 0; }
.trade-msg-output { width: 100%; height: 140px; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; font-family: inherit; resize: none; outline: none; background: var(--bg); color: var(--text); line-height: 1.5; }
@media (max-width: 600px) { .trade-msg-sections { grid-template-columns: 1fr; } .trade-msg-list { max-height: 160px; } }
.bulk-preview { margin-top: 10px; background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 13px; max-height: 150px; overflow-y: auto; }
.bulk-preview-row { padding: 2px 0; }
.bulk-ok { color: var(--accent-dark); }
.bulk-trading { color: var(--orange); }
.bulk-err { color: #f44336; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; background: #323232; color: white; padding: 11px 18px; border-radius: 8px; font-size: 13px; z-index: 600; box-shadow: 0 4px 14px rgba(0,0,0,0.3); animation: slideIn 0.25s ease; max-width: calc(100vw - 48px); display: flex; align-items: center; gap: 10px; }
.toast-undo { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4); border-radius: 5px; color: white; font-size: 12px; font-weight: 700; padding: 3px 9px; cursor: pointer; white-space: nowrap; transition: background 0.15s; flex-shrink: 0; }
.toast-undo:hover { background: rgba(255,255,255,0.3); }
[data-theme="dark"] .toast { background: #3a3f4a; }
@keyframes slideIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Announcement notification item ──────────────────────────────────────── */

/* ── Hamburger button ─────────────────────────────────────────────────────── */
.hamburger { display: none; flex-direction: column; justify-content: space-between; width: 28px; height: 20px; background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.hamburger span { display: block; height: 2px; background: white; border-radius: 2px; transition: all 0.2s; }
.header-left { display: flex; align-items: center; gap: 10px; }
.brand-text { display: inline; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 149; }
.sidebar-backdrop.visible { display: block; }
.sidebar-header { display: none; justify-content: space-between; align-items: center; padding: 14px 14px 6px; }
.sidebar-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); padding: 4px; }

/* ── Sidebar actions ──────────────────────────────────────────────────────── */
.sidebar-actions { border-top: 1px solid var(--border); margin-top: 12px; padding: 12px 0 8px; }
.sidebar-actions-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 0 14px 8px; }
.sidebar-action-btn { display: flex; align-items: center; width: 100%; padding: 11px 16px; background: none; border: none; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; transition: background 0.15s; gap: 8px; }
.sidebar-action-btn:hover { background: var(--bg); }
.sidebar-action-btn.active { color: var(--primary); background: #eef2ff; }
[data-theme="dark"] .sidebar-action-btn.active { background: #1a2040; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    /* Layout */
    .app-wrapper { grid-template-columns: 1fr; grid-template-rows: var(--header-h) 1fr; }
    .layout-body { display: flex; flex-direction: column; overflow: hidden; height: calc(100dvh - var(--header-h)); }
    .main-content { padding: 12px 12px 100px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

    /* Header */
    .hamburger { display: flex; }
    .viewing-label { display: none; }
    .brand-text { font-size: 13px; }
    .user-chip-name { display: none; }
    .logout-link { display: none; }
    .icon-btn { font-size: 16px; padding: 3px 5px; }
    .notif-btn { font-size: 18px; }
    .header-actions { gap: 6px; flex-shrink: 0; }

    /* Sidebar as drawer */
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 260px;
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
        padding-top: 0;
        overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-header { display: flex; }
    .sidebar-title { padding: 0; }

    /* Stickers — larger touch targets */
    .stickers-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
    .sticker { height: 56px; border-radius: 8px; }
    .sticker-num { font-size: 13px; }
    .sticker-rep-btn { width: 16px; height: 16px; font-size: 12px; }

    /* Repetidas */
    .rep-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
    .rep-item { padding: 7px 4px; gap: 5px; }
    .rep-btn { width: 26px; height: 26px; font-size: 17px; }
    .rep-qty, .rep-qty-view { font-size: 15px; min-width: 20px; }
    .btn-trade-sm { padding: 4px 8px; font-size: 12px; }

    /* Cards */
    .country-card { padding: 10px 12px; margin-bottom: 8px; }
    .country-name { font-size: 13px; }
    .country-count { font-size: 11px; }
    .btn-repetidas { font-size: 11px; padding: 3px 8px; }

    /* Stats chips */
    .stats-chips { gap: 4px; }
    .chip { font-size: 11px; padding: 3px 8px; }

    /* Search */
    .search-bar input { font-size: 16px; } /* prevents iOS zoom on focus */

    /* Sort/view controls */
    .header-controls { gap: 6px; }
    .sort-btn { font-size: 11px; padding: 4px 7px; }

    /* Modals — bottom sheet on mobile */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-box {
        border-radius: 20px 20px 0 0;
        padding: 16px 20px 32px;
        width: 100%;
        max-width: 100%;
        max-height: 88dvh;
    }
    .modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 4px; margin: 0 auto 16px; }
    .modal-close { top: 16px; right: 16px; }
    .modal-input { font-size: 16px; } /* prevents iOS zoom */
    .bulk-textarea { font-size: 16px; }

    /* Offer list in modal */
    .offer-list { max-height: 160px; }
    .offer-item { padding: 8px 10px; font-size: 13px; }

    /* Toast */
    .toast { bottom: 90px; left: 16px; right: 16px; text-align: center; }

    /* Trade cards */
    .trade-actions { gap: 10px; }
    .btn-finalize, .btn-archive { padding: 9px 16px; font-size: 13px; }

    /* Missing view */
    .missing-row { padding: 8px 10px; }
    .missing-country { min-width: 130px; font-size: 12px; }

    /* Album header */
    .album-title-row { flex-direction: column; align-items: flex-start; gap: 6px; }
    .album-title-row h2 { font-size: 16px; }
    .header-controls { width: 100%; justify-content: space-between; }
    .sort-controls, .view-controls { flex: 1; min-width: 0; }
    .sort-controls .sort-btn, .view-controls .sort-btn { flex: 1; min-width: 0; text-align: center; font-size: 10px; padding: 5px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stats-chips { gap: 4px; }
    .chip { font-size: 10px; padding: 3px 7px; }
}

/* Very small screens */
@media (max-width: 360px) {
    .stickers-grid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
    .sticker { height: 52px; }
    .chip { font-size: 10px; padding: 2px 6px; }
}

/* ── Change log ───────────────────────────────────────────────────────────── */
.change-log { margin: 10px 0; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.stats-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.log-toggle { flex: 1; background: none; border: none; text-align: left; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.log-toggle:hover { background: var(--bg); }
.copy-btn { background: none; border: 1.5px solid var(--border); border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; flex-shrink: 0; margin-right: 10px; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.log-items { padding: 0 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.log-entry { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.log-entry:last-child { border-bottom: none; }
.log-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.log-add { background: #e8f5e9; color: #2e7d32; }
.log-remove { background: #ffebee; color: #c62828; }
.log-text { font-weight: 700; flex: 1; color: var(--text); }
.log-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.log-undo { background: none; border: 1.5px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.log-undo:hover { border-color: var(--orange); color: var(--orange); }

/* ── Repetidas list view ──────────────────────────────────────────────────── */
.rep-list-view { display: flex; flex-direction: column; gap: 6px; }
.rep-list-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.rep-list-header { font-size: 13px; font-weight: 700; color: var(--text-muted); }

/* Add bar */
.rep-add-bar { display: flex; align-items: center; gap: 6px; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 4px; }
.rep-add-code { width: 60px; padding: 8px 8px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 15px; font-weight: 700; text-align: center; background: var(--input-bg); color: var(--text); outline: none; text-transform: uppercase; }
.rep-add-code:focus { border-color: var(--primary); }
.rep-add-hash { font-size: 16px; color: var(--text-muted); font-weight: 700; }
.rep-add-num { width: 52px; padding: 8px 6px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 15px; font-weight: 700; text-align: center; background: var(--input-bg); color: var(--text); outline: none; }
.rep-add-num:focus { border-color: var(--primary); }
.rep-add-btn { flex: 1; padding: 9px 12px; background: var(--accent); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rep-add-btn:active { opacity: 0.8; }

/* List items */
.rep-list-item { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border-radius: 10px; padding: 10px 12px; border: 1.5px solid var(--border); }
.rep-list-flag { width: 26px; text-align: center; flex-shrink: 0; font-size: 18px; }
.rep-list-flag img { width: 26px; height: auto; border-radius: 3px; }
.rep-list-label { flex: 1; display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.rep-list-prefix { font-size: 14px; font-weight: 800; color: var(--text); }
.rep-list-num { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.rep-list-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rep-list-qty { font-size: 18px; font-weight: 800; color: var(--orange); min-width: 26px; text-align: center; }
.rep-list-btn { width: 40px; height: 40px; border: none; border-radius: 50%; font-size: 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.1s, opacity 0.1s; }
.rep-list-btn:active { opacity: 0.8; transform: scale(0.9); }
.btn-red { background: var(--red); color: white; }
.btn-green { background: var(--accent); color: white; }
.btn-red:hover { opacity: 0.85; }
.btn-green:hover { opacity: 0.85; }
.rep-clear-btn { background: transparent; border: 1.5px solid var(--red); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--red); transition: all 0.15s; white-space: nowrap; }
.rep-clear-btn:hover { background: var(--red); color: white; }

@media (max-width: 700px) {
    .rep-list-topbar { flex-direction: column; align-items: flex-start; }
    .rep-list-topbar .sort-btn { flex: 1; text-align: center; }
    .rep-add-bar { gap: 8px; }
    .rep-add-code { font-size: 16px; }
    .rep-add-num { font-size: 16px; }
}

/* ── Profile page ─────────────────────────────────────────────────────────── */
.profile-page { max-width: 520px; }
.profile-avatar-section { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-avatar-wrap { position: relative; }
.profile-avatar-letter { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; }
.profile-avatar-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.upload-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.profile-success { background: #e8f5e9; color: var(--accent-dark); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
[data-theme="dark"] .profile-success { background: #0d1f0f; }
.profile-form { display: flex; flex-direction: column; gap: 0; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.form-group input { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 15px; background: var(--input-bg); color: var(--text); outline: none; }
.form-group input:focus { border-color: var(--primary); }
.form-group small { font-size: 11px; color: var(--text-muted); }
.input-disabled { opacity: 0.55; cursor: not-allowed; }
.form-divider { font-size: 13px; font-weight: 700; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 14px; margin: 6px 0 10px; }
.form-divider span { font-weight: 400; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--bg); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.toggle-title { font-size: 14px; font-weight: 600; display: block; }
.toggle-desc { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }
.toggle-switch { position: relative; flex-shrink: 0; }
.toggle-switch input { display: none; }
.toggle-slider { display: block; width: 44px; height: 24px; background: var(--border); border-radius: 12px; position: relative; transition: background 0.2s; }
.toggle-slider::after { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }
.user-avatar-sm-link { display: flex; }
.user-avatar-sm-img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.user-avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ── Wishlist section ─────────────────────────────────────────────────────── */
.wishlist-section-block { margin-top: 20px; }
.wishlist-body { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.wishlist-row { display: flex; align-items: flex-start; gap: 10px; background: var(--card-bg); border-radius: 8px; padding: 8px 12px; border: 1px solid var(--border); flex-wrap: wrap; }
.wishlist-country { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; display: flex; align-items: center; gap: 5px; min-width: 120px; }
.wishlist-nums { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.wish-chip { background: #fff8e1; color: #b8860b; border: 1.5px solid #fbc02d; border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
[data-theme="dark"] .wish-chip { background: #2a200a; color: #F5C518; border-color: #8a6a00; }
.wish-remove { background: none; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 11px; padding: 0; line-height: 1; }
.wish-remove:hover { opacity: 1; }

/* ── Ver mais button ──────────────────────────────────────────────────────── */
.btn-ver-mais { background: none; border: 1.5px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.btn-ver-mais:hover { border-color: var(--primary); color: var(--primary); }
.past-trade-toggle { margin-left: auto; }
.user-avatar-sm-inline-img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
