:root {
    --bg: #0b0f0c;
    --surface: rgba(20, 28, 22, .84);
    --surface-strong: #151d17;
    --surface-soft: #1b251e;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(121, 185, 0, .34);
    --text: #f2f6f3;
    --muted: #98a49c;
    --primary: #79b900;
    --primary-light: #a0db30;
    --primary-dark: #5f9200;
    --danger: #ff5f6d;
    --warning: #ffb84d;
    --ok: #3ddc97;
    --shadow: 0 24px 70px rgba(0, 0, 0, .34);
    --radius: 22px;
    --radius-sm: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.auth-page {
    display: grid;
    place-items: center;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 20%, rgba(121, 185, 0, .13), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(83, 129, 0, .11), transparent 30%),
        #0a0e0b;
}

.ambient {
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .16;
    background: var(--primary);
    pointer-events: none;
    animation: float 9s ease-in-out infinite alternate;
}

.ambient-one { top: -120px; left: -120px; }
.ambient-two { right: -120px; bottom: -130px; animation-delay: -3s; }

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 28px;
}

.install-shell { width: min(100%, 640px); }

.auth-card {
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(24, 33, 27, .94), rgba(13, 19, 15, .9));
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
    animation: cardIn .65s cubic-bezier(.2,.8,.2,1) both;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    border-radius: 18px;
    color: #11180c;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 14px 34px rgba(121, 185, 0, .22);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 13px;
    font-size: 16px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(29px, 4vw, 42px); line-height: 1.06; letter-spacing: -.045em; }
h2 { letter-spacing: -.025em; }
.auth-copy, .muted { color: var(--muted); line-height: 1.65; }
.auth-copy { margin-bottom: 28px; }

.form-stack { display: grid; gap: 17px; }
.section-label {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.section-label:first-child { border: 0; padding-top: 0; }
.field-grid { display: grid; gap: 15px; }
.field-grid.two { grid-template-columns: 1fr 130px; }

.field { display: grid; gap: 8px; }
.field > span { color: #cbd3cd; font-size: 13px; font-weight: 700; }
.field input,
.search-box input {
    width: 100%;
    outline: none;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--text);
    background: rgba(255, 255, 255, .035);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input { min-height: 50px; padding: 0 15px; }
.field input:focus,
.search-box input:focus {
    border-color: var(--border-strong);
    background: rgba(121, 185, 0, .035);
    box-shadow: 0 0 0 4px rgba(121, 185, 0, .08);
}

.input-with-icon { position: relative; }
.input-with-icon svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    transform: translateY(-50%);
    color: var(--muted);
}
.input-with-icon input { padding-left: 46px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.button svg { width: 18px; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.985); }
.button.primary {
    color: #11180c;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 12px 30px rgba(121, 185, 0, .18);
}
.button.primary:hover { box-shadow: 0 16px 38px rgba(121, 185, 0, .28); }
.button.secondary { color: var(--text); border-color: var(--border); background: rgba(255, 255, 255, .035); }
.button.secondary:hover { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); }
.button.full { width: 100%; }

.alert {
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.5;
}
.alert.success { color: #b9f4d7; border-color: rgba(61, 220, 151, .25); background: rgba(61, 220, 151, .08); }
.alert.danger { color: #ffc3c8; border-color: rgba(255, 95, 109, .25); background: rgba(255, 95, 109, .08); }

.dashboard-page { overflow-x: hidden; }
.dashboard-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 5%, rgba(121, 185, 0, .11), transparent 25%),
        radial-gradient(circle at 92% 0%, rgba(121, 185, 0, .06), transparent 22%),
        linear-gradient(180deg, #0e140f 0, #090d0a 72%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    padding: 0 max(24px, calc((100vw - 1220px) / 2));
    border-bottom: 1px solid var(--border);
    background: rgba(10, 14, 11, .78);
    backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #ced7d0;
    background: rgba(255, 255, 255, .025);
    font-size: 13px;
    font-weight: 700;
}
.admin-chip svg { width: 16px; color: var(--primary-light); }

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.icon-button svg { width: 18px; }
.icon-button:hover { color: var(--text); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.055); transform: translateY(-1px); }
.icon-button.edit:hover { color: var(--primary-light); border-color: rgba(121,185,0,.28); background: rgba(121,185,0,.07); }
.icon-button.delete:hover { color: #ff8993; border-color: rgba(255,95,109,.26); background: rgba(255,95,109,.07); }

.dashboard-shell { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 70px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.hero-row h1 { max-width: 700px; margin-bottom: 11px; }
.hero-row .muted { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 112px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(25, 34, 28, .86), rgba(14, 20, 16, .78));
    box-shadow: 0 18px 42px rgba(0,0,0,.14);
    transition: transform .22s ease, border-color .22s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.13); }
.stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    color: var(--primary-light);
    background: rgba(121,185,0,.09);
}
.stat-icon svg { width: 22px; }
.stat-icon.danger-icon { color: #ff8a94; background: rgba(255,95,109,.09); }
.stat-icon.warning-icon { color: #ffc370; background: rgba(255,184,77,.09); }
.stat-card span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; }

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(21, 29, 23, .92), rgba(13, 18, 15, .9));
    box-shadow: var(--shadow);
}
.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}
.search-box { position: relative; flex: 1; max-width: 420px; }
.search-box svg { position: absolute; top: 50%; left: 14px; width: 17px; color: var(--muted); transform: translateY(-50%); }
.search-box input { height: 44px; padding: 0 14px 0 42px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--muted);
    background: rgba(255,255,255,.02);
    font-size: 12px;
    font-weight: 800;
    transition: all .18s ease;
}
.filter-chip:hover { color: var(--text); background: rgba(255,255,255,.05); }
.filter-chip.active { color: #17200e; border-color: transparent; background: var(--primary); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 17px 18px; text-align: left; }
th {
    color: #7f8d83;
    background: rgba(255,255,255,.018);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
td { border-top: 1px solid var(--border); color: #d6ddd8; font-size: 13px; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.client-cell { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(121,185,0,.16);
    border-radius: 12px;
    color: var(--primary-light);
    background: rgba(121,185,0,.07);
    font-weight: 900;
}
.due-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 185px; }
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.status.overdue { color: #ff8e98; background: rgba(255,95,109,.08); }
.status.today, .status.soon { color: #ffc370; background: rgba(255,184,77,.08); }
.status.ok { color: #72e8b1; background: rgba(61,220,151,.08); }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 245px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #bec8c0;
}
.tag svg { flex: 0 0 16px; width: 16px; color: #6f7f73; }
.actions-cell { display: flex; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.actions-cell form { margin: 0; }

.empty-state { display: grid; place-items: center; padding: 70px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 17px; border-radius: 18px; color: var(--primary-light); background: rgba(121,185,0,.08); }
.empty-icon svg { width: 25px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { margin-bottom: 21px; color: var(--muted); }

.floating-alert { margin-bottom: 18px; transition: opacity .3s ease, transform .3s ease; }
.floating-alert.hide { opacity: 0; transform: translateY(-8px); }

.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); animation: fadeIn .2s ease both; }
.modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: #141c16;
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    animation: modalIn .28s cubic-bezier(.2,.8,.2,1) both;
}
.modal-card h2 { margin-bottom: 23px; font-size: 27px; }
.modal-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 14px; color: var(--primary-light); background: rgba(121,185,0,.08); }
.modal-icon svg { width: 21px; }
.modal-close { position: absolute; top: 17px; right: 17px; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; font-size: 24px; line-height: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
body.modal-open { overflow: hidden; }

.reveal { opacity: 0; transform: translateY(13px); animation: reveal .55s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--delay, 0s); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { to { transform: translate3d(45px, 30px, 0) scale(1.08); } }

@media (max-width: 900px) {
    .panel-toolbar { align-items: stretch; flex-direction: column; }
    .search-box { max-width: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 94px; }
}

@media (max-width: 720px) {
    .topbar { min-height: 66px; padding: 0 16px; }
    .brand small, .admin-chip { display: none; }
    .dashboard-shell { width: min(100% - 26px, 1220px); padding: 35px 0 55px; }
    .hero-row { align-items: stretch; flex-direction: column; }
    .hero-row .button { width: 100%; }
    .panel { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .panel-toolbar { margin-bottom: 12px; padding: 0; border: 0; }
    .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
    .filters::-webkit-scrollbar { display: none; }
    .table-wrap { overflow: visible; }
    table, thead, tbody, tr, td { display: block; width: 100%; }
    thead { display: none; }
    tbody { display: grid; gap: 12px; }
    tbody tr { padding: 17px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(22,30,24,.95), rgba(13,18,15,.94)); box-shadow: 0 15px 35px rgba(0,0,0,.16); }
    td { display: grid; grid-template-columns: 115px 1fr; align-items: center; min-height: 42px; padding: 8px 0; border: 0; }
    td::before { content: attr(data-label); color: #77847b; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
    td:first-child { display: block; padding-top: 0; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
    td:first-child::before, td.actions-cell::before { display: none; }
    .actions-cell { display: flex; justify-content: flex-end; padding-top: 13px; border-top: 1px solid var(--border); }
    .tag { max-width: min(100%, 210px); }
    .modal-card { padding: 24px 20px; border-radius: 21px; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .button { width: 100%; }
}

@media (max-width: 520px) {
    .auth-shell { padding: 15px; }
    .auth-card { padding: 28px 21px; border-radius: 24px; }
    .field-grid.two { grid-template-columns: 1fr; }
    h1 { font-size: 31px; }
    td { grid-template-columns: 100px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.delay-1{--delay:.05s}.delay-2{--delay:.1s}.delay-3{--delay:.15s}.delay-4{--delay:.2s}

/* Wersja z pozycjami rachunku i powiadomieniami */
.logout-form { margin: 0; }
.logout-form .icon-button { font: inherit; }
.modal-card-wide { width: min(100%, 720px); }
.button.compact { min-height: 40px; padding: 0 13px; font-size: 12px; }
.button:disabled, .icon-button:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.services-cell {
    display: grid;
    gap: 7px;
    min-width: 250px;
    max-width: 430px;
}
.service-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding-bottom: 7px;
    border-bottom: 1px dashed rgba(255,255,255,.075);
}
.service-name {
    min-width: 0;
    color: #c7d0c9;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.service-price { color: #f0f5f1; white-space: nowrap; font-size: 12px; }
.service-total {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.service-total strong { color: var(--primary-light); white-space: nowrap; }
.wrap-tag {
    max-width: 280px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    align-items: flex-start;
    line-height: 1.45;
}
.wrap-tag span { overflow-wrap: anywhere; word-break: break-word; }

.service-editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 2px;
}
.field-title { display: block; margin-bottom: 4px; color: #cbd3cd; font-size: 13px; font-weight: 800; }
.service-editor-heading small { color: var(--muted); font-size: 11px; }
.service-editor { display: grid; gap: 10px; }
.service-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 155px 40px;
    align-items: end;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255,255,255,.018);
    animation: serviceRowIn .2s ease both;
}
.service-editor-row .field { gap: 6px; }
.service-editor-row .field input { min-height: 44px; }
.service-remove { margin-bottom: 2px; }
.price-input { position: relative; }
.price-input input { padding-right: 41px; }
.price-input > span {
    position: absolute;
    top: 50%;
    right: 13px;
    color: var(--muted);
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 800;
}
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.settings-card { padding: 24px; }
.settings-card h2 { margin-bottom: 8px; }
.settings-help { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.75; font-size: 13px; }
.code-box {
    display: block;
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #b9c4bc;
    background: rgba(0,0,0,.22);
    overflow-wrap: anywhere;
    word-break: break-all;
    font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.checkbox-field { display: flex; align-items: center; gap: 10px; color: #d7ded9; font-size: 13px; font-weight: 700; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--primary); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@keyframes serviceRowIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .services-cell { min-width: 0; max-width: none; width: 100%; }
    .wrap-tag { max-width: none; }
    .service-editor-heading { align-items: stretch; flex-direction: column; }
    .service-editor-heading .button { width: 100%; }
    .service-editor-row { grid-template-columns: minmax(0, 1fr) 115px 40px; }
    td[data-label="Usługi i ceny"] { align-items: start; }
}

@media (max-width: 520px) {
    .service-editor-row { grid-template-columns: 1fr 40px; }
    .service-editor-row .service-field { grid-column: 1 / -1; }
    .service-editor-row .price-field { grid-column: 1; }
    .service-remove { grid-column: 2; }
}
.notification-history { display: grid; gap: 10px; }
.notification-history-row {
    display: grid;
    grid-template-columns: minmax(160px, .7fr) minmax(240px, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}
.notification-history-row:first-child { border-top: 0; }
.notification-history-row span, .notification-history-row small { color: var(--muted); line-height: 1.45; }
.notification-history-row small { white-space: nowrap; }
@media (max-width: 720px) {
    .notification-history-row { grid-template-columns: 1fr; gap: 4px; }
}
.panel-gap { margin-top: 18px; }
.text-gap { margin-top: 15px; }
.no-bottom { margin-bottom: 0; }

/* Powiadomienia przeglądarki i dzwoneczek — v3 */
.notification-center { position: relative; }
.notification-button { position: relative; }
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #101612;
    border-radius: 999px;
    color: #101612;
    background: var(--primary-light);
    font-size: 9px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(121,185,0,.35);
}
.notification-badge.is-hidden { display: none; }
.notification-popover {
    position: absolute;
    z-index: 80;
    top: calc(100% + 13px);
    right: -46px;
    width: min(390px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 19px;
    background: rgba(14,20,16,.985);
    box-shadow: 0 26px 70px rgba(0,0,0,.48);
    backdrop-filter: blur(18px);
    animation: notificationPopoverIn .2s ease both;
}
.notification-popover[hidden] { display: none; }
.notification-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 17px;
    border-bottom: 1px solid var(--border);
}
.notification-popover-head > div { display: grid; gap: 2px; }
.notification-popover-head strong { font-size: 14px; }
.notification-popover-head small { color: var(--muted); font-size: 10px; }
.notification-popover-head a { color: var(--primary-light); font-size: 11px; font-weight: 850; text-decoration: none; }
.browser-permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    background: rgba(121,185,0,.035);
    font-size: 10px;
    line-height: 1.4;
}
.notification-list { max-height: 390px; overflow-y: auto; }
.notification-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .18s ease;
}
.notification-item:hover { background: rgba(255,255,255,.035); }
.notification-item.unread { background: rgba(121,185,0,.045); }
.notification-item > span:last-child { display: grid; gap: 5px; min-width: 0; }
.notification-item strong { color: #e9efeb; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.notification-item small { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.notification-dot {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
}
.notification-item.unread .notification-dot { background: var(--primary-light); box-shadow: 0 0 0 4px rgba(121,185,0,.09); }
.notification-empty { padding: 28px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.notification-mark-all {
    width: 100%;
    min-height: 42px;
    border: 0;
    color: var(--primary-light);
    background: rgba(0,0,0,.16);
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
}
.notification-mark-all:disabled { color: var(--muted); cursor: default; opacity: .55; }
.settings-note {
    margin: 18px 0 0;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
}
.browser-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.browser-info-grid > div {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
}
.browser-info-grid strong { font-size: 12px; }
.browser-info-grid span { color: var(--muted); font-size: 11px; line-height: 1.55; }
@keyframes notificationPopoverIn { from { opacity: 0; transform: translateY(-7px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .browser-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .notification-popover { position: fixed; top: 72px; right: 12px; left: 12px; width: auto; }
    .browser-permission-row { align-items: stretch; flex-direction: column; }
    .browser-permission-row .button { width: 100%; }
}
