@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-soft: #eff6ff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --surface: #ffffff;
    --surface-muted: #f9fafb;
    --surface-card: #f3f4f6;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #059669;
    --success-soft: #ecfdf5;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--surface);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-hover);
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* ——— Header (marketing + app) ——— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
}

.site-nav__link:hover {
    color: var(--color-primary);
}

.site-nav__link--plain {
    color: var(--text);
}

/* Logo */
.logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.logo-lockup__text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo-lockup__name {
    font-weight: 700;
}

.logo-lockup__accent {
    color: var(--color-primary);
}

.logo-lockup__sep {
    color: var(--text-muted);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-sm {
    padding: 8px 16px;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff !important;
}

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-primary.btn-block,
button.btn-primary {
    width: 100%;
}

.btn-small {
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
}

.btn-blue {
    background: var(--color-primary);
    color: #fff !important;
}

.btn-blue:hover {
    background: var(--color-primary-hover);
    color: #fff !important;
}

.btn-red {
    background: var(--danger);
    color: #fff !important;
}

.btn-red:hover {
    background: #b91c1c;
    color: #fff !important;
}

/* Legacy .btn-primary used in forms */
button.btn-primary {
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}

button.btn-primary:hover {
    background: var(--color-primary-hover);
}

/* Cards / panels */
.screen {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    text-shadow: none;
}

.brand-tagline {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

.top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.panel-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
    text-shadow: none;
    letter-spacing: -0.02em;
}

.panel-subtitle {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.55;
    font-size: 15px;
}

.text-ok {
    color: var(--success);
    font-weight: 700;
}

.text-warn {
    color: var(--warn);
    font-weight: 700;
}

.text-danger {
    color: var(--danger);
    font-weight: 600;
}

/* Forms */
.monitor-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.monitor-form input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-size: 15px;
}

.monitor-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.monitor-select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-size: 15px;
}

.monitor-select:focus {
    border-color: var(--color-primary);
}

.error-box {
    background: var(--danger-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.feed-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.feed-link:hover {
    text-decoration: underline;
}

/* Login center layout */
.login-wrap {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    background: var(--surface-muted);
}

.login-box {
    width: 100%;
    max-width: 440px;
}

.register-screen.login-box {
    max-width: 520px;
}

/* Auth split (login / register) */
.page-auth {
    margin: 0;
    background: var(--surface-muted);
}

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 960px) {
    .auth-split {
        grid-template-columns: 1fr;
    }
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 48px;
}

.auth-panel--form {
    background: var(--surface);
}

.auth-panel--side {
    background: linear-gradient(165deg, var(--surface-muted) 0%, #e0e7ff 100%);
    border-left: 1px solid var(--border);
}

@media (max-width: 960px) {
    .auth-panel--side {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

.auth-panel__inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-side__title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.auth-side__lead {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.auth-side__list {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.auth-side__list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-side__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.auth-back {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
}

.auth-back:hover {
    color: var(--color-primary);
}

.auth-footer-links {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
    font-size: 13px;
}

.auth-footer-links .dot {
    color: var(--border);
    user-select: none;
}

.register-lead {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
}

.register-lead strong {
    color: var(--text);
}

.register-benefits {
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    border: 1px solid var(--border);
}

.register-benefits-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.register-benefits-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.register-benefits-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
}

.register-benefits-list li:last-child {
    margin-bottom: 0;
}

.register-benefits-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.register-benefits-list strong {
    color: var(--text);
}

.register-footnote {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    font-style: italic;
}

.register-form-heading {
    margin-bottom: 12px !important;
}

.register-footer-links {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    justify-content: center;
}

.register-footer-dot {
    color: var(--text-muted);
    user-select: none;
}

/* Tables */
.panel-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-muted);
}

.status-on,
.status-off {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-on {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.status-off {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 10px;
}

/* Feed */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.feed-item {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.last-offer-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.feed-title {
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.offer-price {
    color: var(--success);
    font-weight: 700;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}

/* Contact card */
.contact-card {
    margin: 0 auto;
    max-width: 400px;
}

.contact-card-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.contact-heading {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    color: var(--text);
    text-shadow: none;
}

.contact-hint {
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.contact-qr-wrap {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.contact-qr {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-telegram-link-wrap {
    margin: 14px 0 0;
    text-align: center;
}

.contact-telegram-link {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-telegram-link:hover {
    text-decoration: none;
}

.panel-col-side .contact-card {
    max-width: 260px;
}

.panel-col-side .contact-qr {
    max-width: 180px;
}

/* Marketing: home */
.marketing-main {
    padding-bottom: 0;
}

.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 20px 64px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 36px;
    }
}

.hero__kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.hero__title {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
}

.hero__text {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero__note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero__visual {
    display: flex;
    justify-content: center;
}

/* Telegram preview mockup */
.tg-preview {
    width: 100%;
    max-width: 340px;
    background: #0f172a;
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid #1e293b;
}

.tg-preview__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.tg-preview__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
}

.tg-preview__title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.tg-preview__bubble {
    background: #1e293b;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
    border: 1px solid #334155;
}

.tg-preview__tag {
    font-size: 12px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 8px;
}

.tg-preview__line {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}

.tg-preview__line--strong {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.tg-preview__link {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
}

.section {
    padding: 56px 20px;
}

.section--muted {
    background: var(--surface-muted);
}

.section__head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}

.section__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section__sub {
    margin: 12px 0 0;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.55;
}

.feature-grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.feature-card__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.feature-card__text {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "⌄";
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(-180deg);
}

.faq-item__body {
    padding: 0 18px 16px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

.cta-band {
    max-width: 1120px;
    margin: 0 auto 48px;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 50%, #e0e7ff 100%);
    border: 1px solid #bfdbfe;
    text-align: center;
}

.cta-band__title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
}

.cta-band__text {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
    padding: 28px 20px 40px;
}

.site-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
}

.site-footer__links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer__links a:hover {
    color: var(--color-primary);
}

.site-footer__copy {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.site-footer--minimal {
    padding: 20px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Panel two-column */
.panel-two-col {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.panel-col-main {
    flex: 1 1 auto;
    min-width: 0;
}

.panel-col-side {
    flex: 0 0 300px;
    max-width: 300px;
}

.panel-col-side .panel-side-screen {
    padding: 16px;
}

.panel-col-side .panel-title {
    font-size: 20px;
    margin-bottom: 4px;
}

.panel-side-subtitle {
    text-align: center;
    margin-bottom: 10px !important;
    font-size: 12px !important;
}

@media (max-width: 980px) {
    .panel-two-col {
        flex-direction: column;
    }
    .panel-col-side {
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
    }
}

/* Instruction page */
.instruction-page {
    max-width: 760px;
    margin: 0 auto;
}

.instruction-block {
    margin-bottom: 22px;
}

.instruction-block:last-child {
    margin-bottom: 0;
}

.instruction-h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.instruction-p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 15px;
}

.instruction-ol,
.instruction-ul {
    margin: 0;
    padding-left: 22px;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 15px;
}

.instruction-ul ul {
    margin-top: 8px;
    margin-bottom: 0;
}

.instruction-ol li,
.instruction-ul li {
    margin-bottom: 8px;
}

/* Instruction steps (icon row) */
.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .steps-row {
        grid-template-columns: 1fr;
    }
}

.step-card {
    text-align: center;
    padding: 18px 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.step-card__num {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-card__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.step-card__text {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Connect telegram */
.code-block {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: var(--text);
    overflow-x: auto;
}

.connect-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.65;
}

.connect-steps li {
    margin-bottom: 10px;
}

/* Admin dashboard */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.admin-page h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.admin-page h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 10px;
}

.admin-page p {
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.55;
}

.admin-toolbar {
    margin-bottom: 24px;
}

.admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 28px;
}

.admin-form-row label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.admin-form-row input[type="number"],
.admin-form-row select {
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-family: inherit;
}

.admin-form-row button {
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 32px;
}

/* Панель 2: монітори списком карток — без горизонтального скролу */
.admin-monitor-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.admin-monitor-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-monitor-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.admin-monitor-card__id {
    font-weight: 800;
    color: var(--text);
}

.admin-monitor-card__user {
    font-weight: 600;
    color: var(--text-muted);
}

.admin-monitor-card__status {
    margin-left: auto;
}

.admin-monitor-card__grid {
    display: grid;
    grid-template-columns: minmax(88px, 120px) 1fr;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.admin-monitor-card__grid dt {
    margin: 0;
    font-weight: 600;
    color: var(--text-muted);
}

.admin-monitor-card__grid dd {
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.admin-monitor-card__error {
    font-size: 12px;
    color: var(--danger);
}

.admin-monitor-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}

.admin-monitor-card__actions a {
    color: var(--color-primary);
}

.admin-link-danger {
    color: var(--danger) !important;
}

/* Деталі монітора: рядки як картки, без горизонтального скролу */
.table-wrap--admin-stack {
    overflow-x: visible;
}

.table-wrap--admin-stack table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table-wrap--admin-stack thead {
    display: none;
}

.table-wrap--admin-stack tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: var(--surface, #fff);
}

.table-wrap--admin-stack tbody td {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
    border: none;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.table-wrap--admin-stack tbody td::before {
    content: attr(data-label);
    flex: 0 0 min(38%, 112px);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.ok {
    color: var(--success);
    font-weight: 700;
}

.err {
    color: var(--danger);
    font-weight: 700;
}

/* --- Panel użytkownika: wyrazniejsze sekcje (nie „jedna masa”) --- */
body.panel-page {
    background: linear-gradient(180deg, #eef2f7 0%, #e2e8f0 42%, #f8fafc 100%);
}

.panel-page .wrap {
    padding-top: 20px;
    padding-bottom: 56px;
}

.panel-page .screen {
    background: #ffffff;
    border: 1px solid #c9d4e3;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 8px 28px rgba(15, 23, 42, 0.07);
}

.panel-page .screen > .panel-title:first-of-type {
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 2px solid #bfdbfe;
}

.panel-page .panel-subtitle {
    margin-bottom: 12px;
}

.panel-page .panel-two-col {
    gap: 28px;
}

.panel-page .panel-col-side .screen {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-color: #93c5fd;
    box-shadow:
        0 1px 2px rgba(37, 99, 235, 0.06),
        0 8px 24px rgba(37, 99, 235, 0.08);
}

.panel-page .panel-col-side .screen > .panel-title:first-of-type {
    border-bottom-color: #93c5fd;
}

.panel-page .monitor-form {
    margin-top: 10px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
}

.panel-page .monitor-form label:first-of-type {
    margin-top: 0;
}

.panel-page .table-wrap {
    margin-top: 10px;
    border: 1px solid #d1d9e6;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.panel-page .table-wrap table {
    margin: 0;
}

.panel-page .table-wrap th {
    background: #e2e8f0;
    color: #334155;
    border-bottom: 2px solid #cbd5e1;
}

.panel-page .table-wrap td {
    border-bottom-color: #e8edf3;
}

.panel-page .table-wrap tbody tr:nth-child(even) {
    background: #f8fafc;
}

.panel-page .table-wrap tbody tr:hover {
    background: #eff6ff;
}

.panel-page .feed-list {
    gap: 12px;
    margin-top: 10px;
    padding: 14px;
    background: #f1f5f9;
    border: 1px solid #d1d9e6;
    border-radius: var(--radius-lg);
}

.panel-page .feed-item {
    background: #fff;
    border: 1px solid #dce3ec;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.panel-page .site-header {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
}

/* Panel: toolbar (Telegram row) */
.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
}

.panel-toolbar__info {
    flex: 1;
    min-width: 0;
}

.panel-toolbar__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.table-wrap--panel {
    -webkit-overflow-scrolling: touch;
}

.table-panel {
    min-width: 520px;
}

/* Public nav — tablet (bez order — unika konfliktu z flex) */
@media (max-width: 720px) {
    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }
    .site-header__inner {
        justify-content: flex-start;
    }
    .site-header__actions {
        margin-left: auto;
    }
}

/* Telefon: wezsze marginesy, pionowy uklad, wieksze cele dotyku */
@media (max-width: 640px) {
    .wrap {
        padding: 12px 10px 36px;
    }

    .site-header__inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        padding: 8px 10px;
    }

    .logo-lockup__icon svg {
        width: 30px;
        height: 30px;
    }

    .logo-lockup__text {
        font-size: 15px;
        gap: 2px;
    }

    /* Strona marketingowa: logo + przyciski w 1 rzedzie, linki nawigacji pod spodem (scroll poziomy) */
    .site-header__inner:has(.site-nav) .logo-lockup {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-header__inner:has(.site-nav) .site-header__actions {
        order: 2;
        margin-left: 0;
        flex-shrink: 0;
    }

    .site-header__inner:has(.site-nav) .site-nav {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 12px;
        padding: 8px 0 4px;
        margin: 0 -2px;
        border-top: 1px solid var(--border);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .site-header__inner:has(.site-nav) .site-nav__link {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 13px;
    }

    /* Panel / strony bez nav w headerze */
    .site-header__inner:not(:has(.site-nav)) {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .site-header__inner:not(:has(.site-nav)) .logo-lockup {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-header__inner:not(:has(.site-nav)) .site-header__actions {
        flex-shrink: 0;
    }

    .hero {
        padding: 28px 12px 40px;
        gap: 28px;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .hero__text {
        font-size: 15px;
    }

    .section {
        padding: 36px 12px;
    }

    .section__title {
        font-size: 22px;
    }

    .cta-band {
        padding: 32px 16px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-panel {
        padding: 24px 16px;
    }

    .tg-preview {
        max-width: 100%;
    }

    /* Panel uzytkownika */
    .panel-page .wrap {
        padding: 10px 8px 32px;
    }

    .panel-page .screen {
        padding: 16px 14px;
        border-radius: 12px;
        margin-bottom: 14px !important;
    }

    .panel-page .panel-title {
        font-size: 1.25rem;
    }

    .panel-page .panel-subtitle {
        font-size: 14px;
    }

    .panel-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-toolbar__meta {
        display: block;
        margin-left: 0;
        margin-top: 6px;
        word-break: break-word;
    }

    .panel-toolbar .btn,
    .panel-toolbar__btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .panel-page .site-header__inner {
        padding: 8px 10px;
    }

    .panel-page .site-header__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-end;
    }

    .panel-page .site-header__actions .btn {
        min-height: 40px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 13px;
    }

    .panel-page .monitor-form {
        padding: 14px 12px;
    }

    .panel-page .monitor-form input,
    .panel-page .monitor-select {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .panel-page .table-wrap--panel {
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 10px;
    }

    .panel-page .table-wrap th,
    .panel-page .table-wrap td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .panel-page .table-wrap th {
        font-size: 10px;
    }

    .panel-page .panel-row-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .panel-page .panel-row-actions .btn-small {
        width: 100%;
        text-align: center;
        min-height: 40px;
        line-height: 1.2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .panel-page .feed-list {
        padding: 10px;
        max-height: 50vh;
    }

    .panel-page .feed-item,
    .feed-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .feed-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        line-height: 1.35;
    }

    .offer-price {
        align-self: flex-start;
    }

    .contact-card-inner {
        padding: 14px;
    }

    .contact-qr {
        max-width: 200px;
    }

    button.btn-primary {
        min-height: 48px;
        font-size: 16px;
    }

    .instruction-page .panel-title {
        font-size: 1.35rem;
    }

    .instruction-p,
    .instruction-ol,
    .instruction-ul {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .logo-lockup__text {
        font-size: 13px;
    }

    .table-panel {
        min-width: 480px;
    }
}
