:root {
    --ink: #15131c;
    --muted: #777282;
    --line: #e8e4ec;
    --canvas: #f7f6f9;
    --card: #ffffff;
    --purple: #66508d;
    --purple-dark: #4b396b;
    --purple-soft: #eee9f5;
    --orange: #ff6a22;
    --green: #16845f;
    --green-soft: #e9f7f1;
    --red: #c94850;
    --red-soft: #fff0f1;
    --shadow: 0 12px 35px rgba(42, 31, 60, .07);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; display: flex; flex-direction: column; background: #fcfbfd; border-right: 1px solid var(--line); padding: 24px 18px 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; margin: 0 4px; font-size: 22px; font-weight: 790; letter-spacing: -.8px; }
.brand > span:last-child > span { color: var(--orange); }
.brand-mark { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: white; background: linear-gradient(145deg, #75609d, #4d3b70); box-shadow: 0 8px 18px rgba(83, 62, 119, .25); overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.7); border-radius: 6px; transform: rotate(45deg); }
.brand-mark span { position: relative; z-index: 1; font-size: 16px; font-weight: 850; color: #fff; }
.nav { margin-top: 39px; display: flex; flex-direction: column; gap: 7px; }
.nav-label { margin: 0 12px 7px; color: #a19ba9; font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.account-label { margin-top: 23px; }
.nav-link { min-height: 47px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 10px; color: #706b77; font-size: 14px; font-weight: 650; transition: .18s ease; }
.nav-link:hover { background: #f5f2f8; color: var(--purple); }
.nav-link.active { color: var(--purple-dark); background: #e9e2f2; box-shadow: inset 3px 0 var(--purple); }
.nav-icon { width: 20px; text-align: center; font-size: 19px; line-height: 1; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--red); color: white; font-size: 10px; }
.nav-action { margin-top: 10px; height: 47px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 10px; background: var(--purple); color: white; font-weight: 750; font-size: 14px; box-shadow: 0 8px 20px rgba(94, 72, 133, .18); transition: .18s ease; }
.nav-action:hover { background: var(--purple-dark); transform: translateY(-1px); }
.nav-action span { font-size: 19px; font-weight: 300; }
.sidebar-user { margin-top: auto; padding: 17px 3px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e8e0f2; color: var(--purple); font-size: 13px; font-weight: 800; }
.user-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy span { max-width: 138px; margin-top: 3px; color: #96919d; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user form { margin-left: auto; }
.logout-button { border: 0; background: transparent; color: #98939e; font-size: 18px; cursor: pointer; }

.main-wrap { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(249, 248, 251, .94); backdrop-filter: blur(14px); }
.topbar > div:first-of-type { display: flex; flex-direction: column; gap: 3px; }
.topbar > div:first-of-type strong { font-size: 15px; }
.topbar > div:first-of-type span { color: #96919e; font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: white; }
.icon-button span { font-size: 22px; }
.icon-button b { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 50px; background: var(--red); color: white; border: 2px solid var(--canvas); font-size: 9px; }
.sync-pill, .status-pill { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 7px 10px; border-radius: 999px; border: 1px solid #d9d4df; background: white; color: #6f6877; font-size: 11px; font-weight: 750; white-space: nowrap; }
.sync-pill i, .status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #9a93a2; }
.sync-pill i { background: var(--orange); animation: pulse 1.2s infinite; }
.status-pill.success { color: var(--green); border-color: #c5e8db; background: #f1fbf7; }
.status-pill.success i { background: #27a679; }
.status-pill.warning { color: #9a6a25; border-color: #f2ddb7; background: #fffaf0; }
.status-pill.warning i { background: #df9f3e; }
.status-pill.neutral { color: var(--purple); border-color: #ddd3e8; background: #f7f3fb; }
.status-pill.neutral i { background: var(--purple); }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }

.content { max-width: 1520px; margin: 0 auto; padding: 42px 36px 50px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 7px 0 4px; font-size: clamp(30px, 3vw, 40px); line-height: 1.06; letter-spacing: -1.6px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.compact-heading h1 { font-size: 34px; }
.eyebrow { color: var(--purple); font-size: 10px; font-weight: 850; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow.light { color: #ddd3ed; }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.status-cluster { display: flex; gap: 8px; padding-bottom: 3px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 2px 8px rgba(40, 27, 57, .018); }
.primary-button, .secondary-button { border: 0; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 10px; cursor: pointer; font-weight: 750; font-size: 13px; transition: .18s ease; }
.primary-button { background: var(--purple); color: white; box-shadow: 0 8px 18px rgba(84, 62, 122, .18); }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.primary-button.compact { min-height: 40px; }
.primary-button.disabled { opacity: .5; pointer-events: none; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--purple-dark); }
.secondary-button:hover { border-color: #cfc4dc; background: #faf8fc; }

.flash { position: relative; margin: -20px 0 24px; padding: 13px 42px 13px 16px; border: 1px solid #d7d1df; border-radius: 10px; background: white; font-size: 13px; }
.flash.success { background: var(--green-soft); border-color: #c5e8da; color: #126c4f; }
.flash.error { background: var(--red-soft); border-color: #f1cdd1; color: #9e343c; }
.flash button { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; cursor: pointer; font-size: 20px; }
.onboarding-banner { position: relative; min-height: 128px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 20px; padding: 24px 28px; overflow: hidden; border: 1px solid #ded5e9; border-left: 4px solid var(--purple); border-radius: 16px; background: linear-gradient(100deg, #fff, #faf7fd); }
.onboarding-banner::after { content:""; position:absolute; width:260px; height:260px; right:8%; border:1px solid #eee7f5; border-radius:50%; pointer-events:none; }
.onboarding-icon { width: 51px; height: 51px; display: grid; place-items: center; border-radius: 13px; background: var(--purple-soft); color: var(--purple); font-weight: 850; }
.onboarding-banner h2 { margin: 5px 0 4px; font-size: 19px; }
.onboarding-banner p { margin: 0; color: var(--muted); font-size: 13px; }
.onboarding-banner .primary-button { position: relative; z-index: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { min-width: 0; height: 96px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: white; transition: .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card > b { color: #b4afba; font-size: 18px; font-weight: 400; }
.stat-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; font-size: 18px; }
.stat-icon.violet { background: var(--purple-soft); color: var(--purple); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.orange { background: #fff2e9; color: #d97532; }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-card div { display: flex; flex-direction: column; }
.stat-card strong { font-size: 25px; line-height: 1; letter-spacing: -.8px; }
.stat-card div span { margin-top: 6px; color: #8b8591; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(300px, 1fr); gap: 18px; }
.watched-card, .alert-summary { min-height: 432px; padding: 22px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 16px; }
.card-header h2 { margin: 0; font-size: 16px; letter-spacing: -.25px; }
.card-header p { margin: 5px 0 0; color: #9a949f; font-size: 11px; }
.card-header > a { color: var(--purple); font-size: 11px; font-weight: 750; }
.watch-list { border-top: 1px solid var(--line); }
.watch-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto auto; align-items: center; gap: 13px; padding: 14px 2px; border-bottom: 1px solid #efecf1; }
.product-thumb { flex: 0 0 auto; width: 45px; height: 45px; display: grid; place-items: center; overflow: hidden; border: 1px solid #ebe6ef; border-radius: 10px; color: var(--purple); font-size: 16px; font-weight: 850; }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; background: white; }
.product-thumb.tone-1 { background: #f1edf7; }
.product-thumb.tone-2 { background: #eef7f3; color: var(--green); }
.product-thumb.tone-3 { background: #fff4ec; color: #bd6b31; }
.product-thumb.tone-4 { background: #f4f2f2; color: #6e6871; }
.product-main { min-width: 0; display: flex; flex-direction: column; }
.product-main strong { max-width: 390px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-main span { margin-top: 5px; color: #98929e; font-size: 10px; }
.price-pair { display: flex; align-items: center; gap: 20px; }
.price-pair > span { display: flex; flex-direction: column; color: #a09aa5; font-size: 9px; }
.price-pair strong { margin-top: 4px; color: var(--ink); font-size: 12px; white-space: nowrap; }
.danger-text { color: var(--red) !important; }
.success-text { color: var(--green) !important; }
.difference-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 70px; padding: 6px 8px; border-radius: 50px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 800; white-space: nowrap; }
.difference-badge.safe { background: var(--green-soft); color: var(--green); }
.difference-badge.warning { background: #fff7e8; color: #9a6a25; }
.difference-badge.pending { background: #f1eff3; color: #7d7682; }
.row-more { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #9c96a1; cursor: pointer; font-size: 17px; }
.row-more:hover { background: var(--purple-soft); color: var(--purple); }
.alert-summary { padding-bottom: 16px; }
.mini-alert { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 13px 0; border-top: 1px solid #efecf1; }
.mini-alert.unread::after { content:""; align-self: start; width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--orange); }
.alert-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); font-weight: 850; }
.mini-alert > div { min-width: 0; }
.mini-alert strong { font-size: 11px; }
.mini-alert p { margin: 4px 0; color: #716b76; font-size: 10px; line-height: 1.4; }
.mini-alert small { color: #aaa4ad; font-size: 9px; }
.automation-note { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 11px; background: #f5f1f8; }
.automation-note > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: white; color: var(--purple); font-size: 10px; font-weight: 850; }
.automation-note strong { font-size: 11px; }
.automation-note p { margin: 4px 0 0; color: #837c89; font-size: 10px; line-height: 1.45; }
.empty-state { min-height: 290px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 23px; }
.empty-state h3 { margin: 13px 0 5px; color: var(--ink); font-size: 15px; }
.empty-state p { max-width: 370px; margin: 0 0 16px; font-size: 12px; line-height: 1.5; }
.empty-mini { min-height: 180px; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: 12px; }
.empty-mini span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); }

.filter-card { margin-bottom: 15px; padding: 18px 20px 0; }
.manual-product-card { margin: -10px 0 15px; padding: 22px; border-color: #d9cde7; box-shadow: var(--shadow); }
.manual-product-card[hidden] { display: none; }
.manual-product-card .card-header { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.icon-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f4f1f6; color: #777080; cursor: pointer; font-size: 22px; line-height: 1; }
.manual-product-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.manual-product-form label:not(.manual-check) { display: flex; flex-direction: column; gap: 7px; color: #5d5663; font-size: 11px; font-weight: 750; }
.manual-product-form .wide-field { grid-column: span 3; }
.manual-product-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #ded9e3; border-radius: 10px; background: #fbfafc; color: var(--ink); outline: none; font-size: 12px; font-weight: 450; }
.manual-product-form input:focus { border-color: #9d8ab9; background: white; box-shadow: 0 0 0 3px #eee8f5; }
.price-input { position: relative; }
.price-input input { padding-right: 52px; }
.price-input b { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #908997; font-size: 10px; }
.manual-check { min-height: 45px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #ded9e3; border-radius: 10px; cursor: pointer; }
.manual-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.manual-check > span { width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid #c9c2cf; border-radius: 5px; background: white; }
.manual-check input:checked + span { background: var(--purple); border-color: var(--purple); box-shadow: inset 0 0 0 4px white; }
.manual-check div { display: flex; flex-direction: column; gap: 2px; }
.manual-check strong { color: #514b57; font-size: 10px; }
.manual-check small { color: #99929e; font-size: 9px; }
.manual-form-actions { grid-column: span 3; display: flex; justify-content: flex-end; gap: 9px; padding-top: 3px; }
.test-products-note { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; padding: 11px 14px 11px 18px; border: 1px dashed #d9cfe4; border-radius: 13px; background: #faf8fc; }
.test-products-note > div { display: flex; flex-direction: column; gap: 4px; }
.test-products-note strong { font-size: 11px; }
.test-products-note span { color: var(--muted); font-size: 10px; }
.product-link:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.source-badge { color: var(--purple); font-weight: 750; }
.source-edit { margin: 0; padding: 0; border: 0; background: transparent; color: var(--purple); cursor: pointer; font-size: 9px; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.offer-filters { display: grid; grid-template-columns: minmax(280px, 1fr) 250px auto; gap: 11px; }
.search-field { position: relative; }
.search-field > span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #918b97; font-size: 21px; }
.search-field input, .select-field select, .interval-select, .setting-label select { width: 100%; height: 44px; border: 1px solid #ded9e3; border-radius: 10px; background: #fbfafc; outline: none; color: var(--ink); font-size: 12px; transition: .15s; }
.search-field input { padding: 0 15px 0 44px; }
.search-field input:focus, .select-field select:focus, .interval-select:focus, .setting-label select:focus { border-color: #9d8ab9; box-shadow: 0 0 0 3px #eee8f5; }
.select-field select { padding: 0 36px 0 13px; }
.check-field { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #ded9e3; border-radius: 10px; color: #5f5965; background: #fbfafc; font-size: 12px; font-weight: 650; cursor: pointer; }
.check-field input { position: absolute; opacity: 0; }
.check-field > span { width: 16px; height: 16px; border: 1px solid #c9c2cf; border-radius: 4px; background: white; }
.check-field input:checked + span { background: var(--purple); border-color: var(--purple); box-shadow: inset 0 0 0 3px white; }
.results-meta { min-height: 49px; display: flex; align-items: center; justify-content: space-between; margin-top: 9px; border-top: 1px solid #efecf1; color: #88818e; font-size: 11px; }
.results-meta strong { color: var(--ink); }
.meta-hint { padding: 5px 8px; border-radius: 6px; background: #f6f3f8; }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 44px; padding: 0 15px; background: #faf9fb; border-bottom: 1px solid var(--line); color: #96909c; font-size: 9px; letter-spacing: .6px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 70px; padding: 10px 15px; border-bottom: 1px solid #efedf1; font-size: 11px; vertical-align: middle; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fcfbfd; }
.table-product { min-width: 290px; max-width: 430px; display: flex; align-items: center; gap: 11px; }
.table-product > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.table-product strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.table-product span { margin-top: 5px; color: #a29ca7; font-size: 9px; }
.offers-table td:nth-child(2) { min-width: 150px; }
.offers-table td:nth-child(2) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.offers-table td:nth-child(2) small, .offers-table td:nth-child(4) small { display: block; margin-top: 5px; color: #a49ea8; font-family: Inter, sans-serif; font-size: 9px; }
.ean-code { color: #433c48; font-size: 10px; }
.no-ean { display: inline-flex; padding: 4px 7px; border-radius: 5px; color: #8f8993; background: #f1eff2; font-family: Inter, sans-serif; font-size: 9px; }
.no-result { display: inline-flex; padding: 4px 7px; border-radius: 5px; color: #966c2e; background: #fff7e8; font-size: 9px; font-weight: 750; }
.table-price { font-size: 11px; white-space: nowrap; }
.muted { color: #aaa5ae; }
.interval-select { width: 100px; height: 34px; padding: 0 8px; background: white; font-size: 10px; }
.interval-select:disabled { opacity: .45; }
.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; width: 37px; height: 21px; border-radius: 999px; background: #d8d4dc; transition: .2s; }
.switch span::after { content:""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.17); transition: .2s; }
.switch input:checked + span { background: var(--purple); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.pagination { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 18px; color: #837d88; font-size: 10px; }
.pagination button { border: 1px solid var(--line); border-radius: 7px; background: white; padding: 7px 10px; color: var(--purple); cursor: pointer; font-size: 10px; }
.pagination button:disabled { opacity: .35; cursor: default; }

.alerts-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.alert-feed, .alert-rules { padding: 22px; }
.count-pill { padding: 6px 9px; border-radius: 50px; background: var(--purple-soft); color: var(--purple); font-size: 9px; font-weight: 750; }
.feed-item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px 2px; border-top: 1px solid #ece9ee; }
.feed-item.unread::before { content:""; position: absolute; left: -22px; top: 0; bottom: 0; width: 3px; background: var(--purple); }
.feed-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; font-size: 19px; font-weight: 800; }
.feed-icon.danger { background: var(--red-soft); color: var(--red); }
.feed-icon.success { background: var(--green-soft); color: var(--green); }
.feed-content { min-width: 0; }
.feed-title { display: flex; justify-content: space-between; gap: 15px; }
.feed-title strong { font-size: 11px; color: var(--red); }
.feed-title time { color: #aaa4ad; font-size: 9px; white-space: nowrap; }
.feed-content h3 { margin: 7px 0 4px; font-size: 14px; }
.feed-content > p { margin: 0; color: #78717d; font-size: 11px; }
.alert-price-strip { display: flex; align-items: center; gap: 17px; margin: 14px 0 10px; padding: 10px 12px; border-radius: 9px; background: #faf8fb; }
.alert-price-strip > span:not(.difference-badge) { display: flex; flex-direction: column; color: #9a949e; font-size: 9px; }
.alert-price-strip strong { margin-top: 3px; color: var(--ink); font-size: 12px; }
.alert-price-strip > b { color: #bbb4bf; font-weight: 400; }
.alert-price-strip .difference-badge { margin-left: auto; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 15px; color: #aaa4ad; font-size: 9px; }
.feed-meta a { color: var(--purple); font-weight: 750; }
.alert-rules h2 { margin: 0; font-size: 16px; }
.alert-rules > p { margin: 7px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.alert-rules ol { list-style: none; margin: 0; padding: 0; }
.alert-rules li { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 12px 0; border-top: 1px solid #efecf1; }
.alert-rules li > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--purple-soft); color: var(--purple); font-size: 10px; font-weight: 800; }
.alert-rules li strong { font-size: 11px; }
.alert-rules li p { margin: 3px 0 0; color: #918a96; font-size: 10px; line-height: 1.45; }
.privacy-note { margin-top: 17px; padding: 14px; border-radius: 10px; background: #f4faf7; color: #436a5b; }
.privacy-note strong { font-size: 10px; }
.privacy-note p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; align-items: stretch; }
.settings-card { min-height: 250px; padding: 22px; }
.settings-card.wide { grid-column: 1 / -1; min-height: 0; }
.settings-title { display: flex; align-items: center; gap: 12px; }
.settings-title > div { min-width: 0; }
.settings-title h2 { margin: 0; font-size: 15px; }
.settings-title p { margin: 4px 0 0; color: #938d98; font-size: 10px; }
.settings-title .status-pill { margin-left: auto; }
.settings-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; font-weight: 850; }
.settings-icon.allegro { color: white; background: linear-gradient(145deg, #ff8846, #f15d19); }
.settings-icon.scrape { color: var(--purple); background: var(--purple-soft); }
.settings-icon.schedule { color: #b46d33; background: #fff2e8; }
.settings-icon.security { color: var(--green); background: var(--green-soft); }
.connection-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 20px 0 17px; padding: 15px; border-radius: 10px; background: #faf9fb; }
.connection-details div { display: flex; flex-direction: column; }
.connection-details span { color: #9b959f; font-size: 9px; }
.connection-details strong { margin-top: 5px; font-size: 11px; }
.connection-empty { margin-top: 22px; }
.connection-empty p { max-width: 660px; margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.connection-empty small { display: block; margin-top: 10px; color: #9d7176; font-size: 9px; }
.usage-number { display: flex; align-items: baseline; gap: 8px; margin-top: 27px; }
.usage-number strong { font-size: 30px; letter-spacing: -1px; }
.usage-number span { color: #8e8793; font-size: 10px; }
.usage-bar { height: 7px; margin: 12px 0 9px; overflow: hidden; border-radius: 20px; background: #ece8ef; }
.usage-bar i { display: block; width: 0; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--purple), #9a78c6); transition: width .5s ease; }
.settings-card > small { color: #a09aa4; font-size: 9px; }
.setting-label { display: flex; flex-direction: column; gap: 8px; margin-top: 25px; color: #716b76; font-size: 10px; font-weight: 700; }
.setting-label select { height: 42px; padding: 0 12px; }
.setting-help { margin: 13px 0 0; color: #99939d; font-size: 10px; line-height: 1.55; }
.security-card { background: linear-gradient(110deg, #fff, #fbfdfc); }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.security-grid div { padding: 14px; border: 1px solid #e7eee9; border-radius: 10px; background: rgba(247,252,249,.72); }
.security-grid strong { font-size: 10px; }
.security-grid p { margin: 4px 0 0; color: #7f8e86; font-size: 9px; line-height: 1.5; }

.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 9px; }
.toast { min-width: 280px; max-width: 390px; display: flex; gap: 10px; padding: 13px 15px; border: 1px solid #dad5df; border-radius: 10px; background: white; box-shadow: 0 12px 35px rgba(28,20,38,.16); font-size: 11px; animation: toastIn .2s ease; }
.toast.success::before { content:"✓"; color: var(--green); font-weight: 900; }
.toast.error::before { content:"!"; color: var(--red); font-weight: 900; }
.error-card { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-card > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: var(--red-soft); font-weight: 850; }
.error-card h1 { margin: 15px 0 5px; font-size: 23px; }
.error-card p { margin: 0 0 18px; color: var(--muted); }

/* Logowanie */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, .96fr) minmax(520px, 1.04fr); background: white; }
.auth-showcase { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding: 36px 48px; background: linear-gradient(145deg, #44345f 0%, #594276 44%, #755d97 100%); color: white; }
.brand-light { position: relative; z-index: 2; color: white; }
.showcase-copy { position: relative; z-index: 2; margin: auto 0; max-width: 700px; transform: translateY(-5%); }
.showcase-copy h1 { margin: 14px 0 14px; font-size: clamp(42px, 4.2vw, 68px); line-height: 1.03; letter-spacing: -3.1px; }
.showcase-copy > p { max-width: 600px; margin: 0; color: #e0d9e9; font-size: 15px; line-height: 1.6; }
.process-line { display: flex; align-items: center; gap: 10px; margin-top: 42px; color: #ded6e8; font-size: 10px; font-weight: 650; }
.process-line span { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.process-line b { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.27); border-radius: 8px; font-size: 9px; }
.process-line i { width: 40px; height: 1px; background: rgba(255,255,255,.25); }
.showcase-trust { position: relative; z-index: 2; display: flex; gap: 18px; color: #cfc5dc; font-size: 9px; }
.showcase-orb { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.orb-one { width: 580px; height: 580px; right: -260px; bottom: -290px; }
.orb-two { width: 370px; height: 370px; right: -150px; bottom: -190px; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px; }
.auth-form-card { width: 100%; max-width: 440px; }
.auth-form-card .flash { margin: 0 0 20px; }
.auth-form-card h2 { margin: 8px 0 7px; font-size: 29px; letter-spacing: -1.1px; }
.auth-form-card > p { margin: 0 0 26px; color: #97909c; font-size: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form label { display: flex; flex-direction: column; gap: 7px; color: #514b56; font-size: 10px; font-weight: 750; }
.auth-form input { width: 100%; height: 47px; padding: 0 14px; border: 1px solid #dcd7e1; border-radius: 10px; background: #fbfafc; outline: 0; font-size: 12px; transition: .15s; }
.auth-form input:focus { border-color: #9d89b9; box-shadow: 0 0 0 3px #f0eaf6; background: white; }
.password-field { position: relative; }
.password-field input { padding-right: 45px; }
.password-field button { position: absolute; right: 7px; top: 50%; width: 35px; height: 35px; transform: translateY(-50%); border: 0; background: transparent; color: #8b8591; cursor: pointer; }
.auth-submit { width: 100%; min-height: 47px; margin-top: 4px; }
.auth-submit span { margin-left: auto; }
.auth-switch { margin-top: 20px; text-align: center; color: #a09aa4; font-size: 10px; }
.auth-switch a { color: var(--purple); font-weight: 800; }
.demo-separator { display: flex; align-items: center; gap: 10px; margin: 21px 0 14px; color: #aaa3ae; font-size: 9px; }
.demo-separator::before, .demo-separator::after { content:""; height: 1px; flex: 1; background: #ebe7ed; }
.demo-button { width: 100%; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1150px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .alerts-layout { grid-template-columns: 1fr; }
    .alert-summary { min-height: 0; }
    .offer-filters { grid-template-columns: 1fr 220px; }
    .check-field { grid-column: 1 / -1; width: fit-content; }
    .auth-page { grid-template-columns: 1fr 1fr; }
    .showcase-copy h1 { font-size: 45px; }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar { transform: translateX(-105%); box-shadow: 16px 0 40px rgba(28,20,38,.14); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { width: 100%; }
    .mobile-menu { display: block; cursor: pointer; }
    .topbar { height: 68px; padding: 0 18px; }
    .topbar > div:first-of-type span, .sync-pill, .topbar .primary-button { display: none; }
    .content { padding: 30px 19px 40px; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-card.wide { grid-column: auto; }
    .connection-details, .security-grid { grid-template-columns: 1fr; }
    .auth-page { display: block; background: #f8f6fa; }
    .auth-showcase { min-height: 310px; padding: 27px 25px; }
    .showcase-copy { margin: 50px 0 20px; transform: none; }
    .showcase-copy h1 { font-size: 35px; letter-spacing: -1.8px; }
    .showcase-copy > p, .process-line, .showcase-trust { display: none; }
    .auth-form-wrap { padding: 34px 20px 50px; }
    .auth-form-card { max-width: 490px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
}

@media (max-width: 640px) {
    .content { padding-left: 13px; padding-right: 13px; }
    .split-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions { width: 100%; flex-wrap: wrap; }
    .heading-actions .primary-button, .heading-actions .secondary-button { flex: 1; }
    .manual-product-form { grid-template-columns: 1fr; }
    .manual-product-form .wide-field, .manual-form-actions { grid-column: auto; }
    .test-products-note { align-items: stretch; flex-direction: column; }
    .status-cluster { flex-wrap: wrap; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { height: 90px; grid-template-columns: auto 1fr; padding: 13px; }
    .stat-card > b { display: none; }
    .stat-icon { width: 37px; height: 37px; }
    .stat-card strong { font-size: 21px; }
    .watched-card, .alert-summary, .alert-feed, .alert-rules, .settings-card { padding: 17px; }
    .watch-row { grid-template-columns: auto 1fr auto; }
    .watch-row .price-pair { grid-column: 2 / -1; justify-content: space-between; }
    .watch-row .difference-badge { grid-column: 2; width: fit-content; }
    .watch-row .row-more { grid-column: 3; grid-row: 1; }
    .offer-filters { grid-template-columns: 1fr; }
    .check-field { grid-column: auto; }
    .results-meta { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
    .meta-hint { display: none; }
    .alert-price-strip { align-items: flex-start; flex-wrap: wrap; }
    .alert-price-strip .difference-badge { margin-left: 0; }
    .connection-details { gap: 10px; }
    .settings-title { flex-wrap: wrap; }
    .settings-title .status-pill { margin-left: 54px; }
    .onboarding-banner { grid-template-columns: auto 1fr; }
    .onboarding-banner .primary-button { grid-column: 1 / -1; }
}
