/* Modul Newsletter — editor kampaně (administrace) */
.nws-designer-name { min-width: 260px; flex: 1 1 260px; max-width: 560px; }
.nws-designer-name-input { font-weight: 600; font-size: 1.1rem; }
.nws-blocks { display: flex; flex-direction: column; gap: .5rem; }
.nws-block-card { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.nws-block-card.nws-block-open { border-color: var(--aav-adm-accent, #3e97ff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aav-adm-accent, #3e97ff) 12%, transparent); }
.nws-block-card.nws-block-over { outline: 2px dashed var(--aav-adm-accent, #3e97ff); outline-offset: -2px; }
.nws-block-card.nws-block-dragging { opacity: .5; }
.nws-block-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; cursor: pointer; }
.nws-block-grip { color: #a1a5b7; cursor: grab; letter-spacing: -2px; user-select: none; }
.nws-block-type { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; }
.nws-block-summary { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5e6278; font-size: .9rem; }
.nws-block-tools { display: flex; gap: .25rem; }
.nws-block-body { border-top: 1px solid var(--bs-border-color); padding: .75rem; }
.nws-block-footer { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; }
.nws-image-thumb { max-width: 160px; max-height: 100px; border: 1px solid var(--bs-border-color); border-radius: .25rem; background: #f8f8f8; }
.nws-palette-item { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .5rem .6rem; border: 0; background: transparent; border-radius: .4rem; }
.nws-palette-item:hover { background: #f1f3f7; }
.nws-palette-icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: .35rem; background: #f1f3f7; color: #5e6278; }
.nws-palette-name { display: block; font-weight: 600; font-size: .9rem; }
.nws-palette-hint { display: block; font-size: .78rem; color: #a1a5b7; }
.nws-preview-frame { width: 100%; height: 720px; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: #f2f2f2; }
.nws-preview-frame.nws-preview-mobile { width: 390px; max-width: 100%; }
.nws-issue-block { color: #f8285a; }
.nws-issue-warn { color: #b58b00; }
.nws-stat { text-align: center; padding: .75rem .5rem; }

/* Přehled nad kampaněmi (NewsletterOverviewCard): dlaždice oddělené linkou, koláče a sparkline jako inline SVG */
.nws-ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nws-ov-tile { padding: 1rem 1.25rem; border-left: 1px solid var(--aav-adm-border, #eff2f5); min-width: 0; }
.nws-ov-tile:nth-child(2n+1) { border-left: 0; }
.nws-ov-tile:nth-child(n+3) { border-top: 1px solid var(--aav-adm-border, #eff2f5); }
.nws-ov-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.nws-ov-label { font-size: .85rem; font-weight: 600; color: #3f4254; }
.nws-ov-note { font-size: .78rem; color: #78829d; margin-top: .15rem; }
.nws-ov-gauge { display: flex; align-items: center; gap: .9rem; }
.nws-ov-gauge-text { min-width: 0; }
.nws-donut { width: 72px; height: 72px; flex: 0 0 auto; }
.nws-donut-text { font-size: 6.5px; font-weight: 700; }
.nws-spark { display: block; width: 100%; max-width: 160px; height: 28px; margin: .45rem 0 .1rem; }
/* Mřížky dashboardu reagují na šířku obsahu vedle druhého menu (container aav-subnav-body v admin.css),
   ne na šířku okna; bez podpory container queries zůstane základní (nejužší) rozložení. */
@container aav-subnav-body (min-width: 700px) {
    .nws-ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nws-ov-tile:nth-child(2n+1) { border-left: 1px solid var(--aav-adm-border, #eff2f5); }
    .nws-ov-tile:nth-child(3n+1) { border-left: 0; }
    .nws-ov-tile:nth-child(n+3) { border-top: 0; }
    .nws-ov-tile:nth-child(n+4) { border-top: 1px solid var(--aav-adm-border, #eff2f5); }
}
@container aav-subnav-body (min-width: 1100px) {
    .nws-ov-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .nws-ov-tile:nth-child(3n+1) { border-left: 1px solid var(--aav-adm-border, #eff2f5); }
    .nws-ov-tile:first-child { border-left: 0; }
    .nws-ov-tile:nth-child(n+4) { border-top: 0; }
}

/* Miniatura zprávy v seznamu kampaní: zmenšený iframe náhledu, tlačítko přes něj otevírá modal */
.nws-thumb-cell { width: 1%; white-space: nowrap; }
.nws-thumb { position: relative; width: 96px; height: 72px; overflow: hidden; border: 1px solid var(--bs-border-color); border-radius: .35rem; background: #f2f2f2; }
.nws-thumb iframe { display: block; width: 640px; height: 480px; border: 0; transform: scale(.15); transform-origin: 0 0; pointer-events: none; }
.nws-thumb-open { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: zoom-in; border-radius: inherit; }
.nws-thumb-open:hover, .nws-thumb-open:focus-visible { background: rgba(62, 151, 255, .1); outline: 2px solid var(--aav-adm-accent, #3e97ff); outline-offset: -2px; }
#nws-preview-modal .modal-body { background: #f2f2f2; }
#nws-preview-modal .nws-preview-frame { height: 78vh; border: 0; border-radius: 0; }
/* Průběh odesílání (NewsletterProgress): pruh, pozastavené šedě; čísla obnovuje newsletter.js */
.nws-progress-track { height: 8px; margin-top: .4rem; border-radius: 4px; background: #eff2f5; overflow: hidden; }
.nws-progress-bar { height: 100%; border-radius: 4px; background: var(--aav-adm-accent, #3e97ff); transition: width .6s ease; }
.nws-progress-bar.nws-progress-paused { background: #b5b5c3; }
.nws-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.nws-stat-label { font-size: .8rem; color: #78829d; }
@media (max-width: 991px) { .nws-designer-name { min-width: 0; } }

/* Dashboard modulu: velké dlaždice hlavních akcí */
.nws-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.nws-action { display: flex; align-items: center; gap: .9rem; width: 100%; padding: 1.1rem 1.25rem; text-align: left; background: #fff; border: 1px solid transparent; border-radius: var(--aav-adm-card-radius, .85rem); box-shadow: var(--aav-adm-shadow); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.nws-action:hover, .nws-action:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(76, 87, 125, .12); color: inherit; border-color: color-mix(in srgb, var(--aav-adm-accent, #3e97ff) 35%, #fff); }
.nws-action-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: .75rem; background: #f4f6f9; color: var(--aav-adm-accent, #3e97ff); }
.nws-action-text { display: flex; flex-direction: column; min-width: 0; }
.nws-action-title { font-weight: 650; line-height: 1.25; }
.nws-action-sub { font-size: .78rem; color: #78829d; }
.nws-action-primary { background: var(--aav-adm-accent, #3e97ff); color: #fff; }
.nws-action-primary:hover, .nws-action-primary:focus-visible { color: #fff; border-color: transparent; }
.nws-action-primary .nws-action-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.nws-action-primary .nws-action-sub { color: rgba(255, 255, 255, .78); }

/* Přehled (KPI dlaždice v kartě, oddělené linkou) */
.nws-kpi-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.nws-kpi { display: flex; align-items: center; gap: .9rem; min-width: 0; padding: 1.1rem 1.25rem; border-left: 0; color: inherit; text-decoration: none; }
.nws-kpi:nth-child(n+2) { border-top: 1px solid var(--aav-adm-border, #eff2f5); }
.nws-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
a.nws-kpi:hover { background: #f9fafc; color: inherit; }
.nws-kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: .7rem; background: color-mix(in srgb, var(--aav-adm-accent, #3e97ff) 12%, #fff); color: var(--aav-adm-accent, #3e97ff); }
.nws-kpi-icon-success { background: #e8fff3; color: #17c653; }
.nws-kpi-icon-info { background: #f8f5ff; color: #7239ea; }
.nws-kpi-icon-warning { background: #fff8dd; color: #d99f00; }
.nws-kpi-text { display: flex; flex-direction: column; min-width: 0; }
.nws-kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.nws-kpi-value-sm { font-size: 1.05rem; }
.nws-kpi-label { font-size: .82rem; color: #78829d; }
.nws-kpi-note { font-size: .78rem; color: #99a1b7; margin-top: .2rem; }
.nws-card-link { display: inline-flex; align-items: center; gap: .15rem; font-size: .85rem; font-weight: 600; color: var(--aav-adm-accent, #3e97ff); text-decoration: none; }
.nws-card-link:hover { text-decoration: underline; }
.nws-thumb-lg { width: 128px; height: 96px; }
.nws-thumb-lg iframe { transform: scale(.2); }
.nws-mini-stats { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .82rem; color: #78829d; }
.nws-mini-stats strong { color: #181c32; }
@container aav-subnav-body (min-width: 560px) {
    .nws-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nws-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nws-kpi { border-left: 1px solid var(--aav-adm-border, #eff2f5); }
    .nws-kpi:nth-child(2n+1) { border-left: 0; }
    .nws-kpi:nth-child(n+2) { border-top: 0; }
    .nws-kpi:nth-child(n+3) { border-top: 1px solid var(--aav-adm-border, #eff2f5); }
}
@container aav-subnav-body (min-width: 760px) {
    .nws-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@container aav-subnav-body (min-width: 1000px) {
    .nws-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nws-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nws-kpi:nth-child(2n+1) { border-left: 1px solid var(--aav-adm-border, #eff2f5); }
    .nws-kpi:first-child { border-left: 0; }
    .nws-kpi:nth-child(n+3) { border-top: 0; }
}

/* Přehled rozesílek: stav jako ikona + datum, ikonové akce vpravo */
.nws-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; }
.nws-status-sent { color: #17c653; }
.nws-status-sent .text-muted, .nws-status-scheduled .text-muted, .nws-status-sending .text-muted { font-size: .82rem; }
.nws-status-scheduled { color: #7239ea; }
.nws-status-sending { color: var(--aav-adm-accent, #3e97ff); }
.nws-status-paused { color: #d99f00; }
.nws-status-muted { color: #78829d; }
.nws-status .aav-icon { flex: 0 0 auto; }
.nws-campaigns .nws-campaign-name { color: inherit; text-decoration: none; }
.nws-campaigns .nws-campaign-name:hover { color: var(--aav-adm-accent, #3e97ff); }
.nws-row-actions { display: inline-flex; gap: .25rem; }
.nws-row-actions .btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; }
.nws-row-actions .dropdown-item { font-size: .9rem; }
