/* NewsPick admin system · same angular editorial language as the public site. */
.admin-body,
.auth-body {
  --admin-bg: #111113;
  --admin-surface: #18181b;
  --admin-surface-2: #202024;
  --admin-border: #343438;
  --admin-text: #f5f5f2;
  --admin-muted: #aaaab0;
  --accent: #35c59b;
  --accent-strong: #249f7c;
}
.admin-body { min-width: 320px; border-top: 3px solid var(--accent); background: var(--admin-bg); color: var(--admin-text); }
.admin-body *, .auth-body * { border-radius: 0 !important; }
.admin-shell { grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 3px); }
.admin-sidebar { width: auto; padding: 24px 20px; background: #151517; border-right: 1px solid var(--admin-border); backdrop-filter: none; }
.admin-logo { justify-self: start; justify-content: flex-start; color: var(--admin-text); }
.admin-logo--mark { min-width: 44px; }
.admin-logo__mark { width: 40px; height: 40px; object-fit: contain; }
.admin-user-card--enhanced,
.admin-fieldset,
.admin-hero-card,
.admin-mini-stat,
.stat-card--fancy,
.admin-quick-link,
.admin-body .section-block,
.admin-body .widget,
.admin-body .checkbox-card,
.admin-body .check-item,
.admin-body .admin-bulk-panel,
.admin-body .admin-dt-controls--top,
.admin-body .dt-container .dt-layout-row { background: var(--admin-surface); border: 1px solid var(--admin-border); box-shadow: none; }
.admin-user-card__avatar { background: var(--accent); color: #06271e; border: 0; }
.admin-nav { gap: 2px; }
.admin-nav a { min-height: 48px; padding: 0 14px; color: var(--admin-muted); border: 1px solid transparent; border-left: 3px solid transparent; background: transparent; transform: none; }
.admin-nav a:hover { transform: none; color: var(--admin-text); background: var(--admin-surface-2); border-color: var(--admin-border); border-left-color: var(--accent); }
.admin-nav a.is-active { color: #06271e; background: var(--accent); border-color: var(--accent); box-shadow: none; }
.admin-logout-btn { min-height: 46px; background: transparent; border: 1px solid var(--admin-border); color: var(--admin-text); }
.admin-logout-btn:hover { border-color: var(--accent); background: var(--admin-surface-2); }
.admin-topbar { min-height: 104px; padding: 22px 30px; background: rgba(21, 21, 23, .97); border-bottom: 1px solid var(--admin-border); backdrop-filter: none; }
.admin-topbar h1 { color: var(--admin-text); letter-spacing: -.035em; }
.admin-topbar-sub { color: var(--admin-muted); }
.admin-top-tabs { gap: 0; border-bottom: 1px solid var(--admin-border); }
.admin-top-tabs__link { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; color: var(--admin-muted); border: 0; border-bottom: 3px solid transparent; background: transparent; transform: none; }
.admin-top-tabs__link:hover, .admin-top-tabs__link.is-active { transform: none; color: var(--admin-text); background: transparent; border-color: var(--accent); }
.admin-content { padding: 30px; }
.admin-body .btn, .auth-body .btn, .admin-body button, .admin-body input, .admin-body select, .admin-body textarea { min-height: 44px; }
.admin-body .btn { font-weight: 800; box-shadow: none; }
.admin-body .btn-primary { background: var(--accent); border-color: var(--accent); color: #06271e; }
.admin-body .btn-primary:hover { background: #46d2aa; border-color: #46d2aa; color: #06271e; }
.admin-fieldset { padding: 24px; }
.admin-fieldset legend { padding: 0 10px; color: var(--admin-text); font-size: 1.05rem; font-weight: 850; }
.admin-form input, .admin-form textarea, .admin-form select, .admin-filters input, .admin-filters select,
.admin-body .dt-container .dt-search input, .admin-body .dt-container .dt-length select,
.admin-body .admin-dt-search input, .admin-body .admin-dt-length select { background-color: #111113; border: 1px solid var(--admin-border); color: var(--admin-text); box-shadow: none; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus, .admin-filters input:focus, .admin-filters select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.admin-body .section-meta span { padding: 0; background: transparent; color: var(--admin-muted); }
.admin-body .check-item { min-height: 48px; }
.admin-body .check-item:hover { border-color: var(--accent); }
.brand-settings-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 24px; margin-top: 22px; }
.admin-form-grid__wide { grid-column: 1 / -1; }
.admin-form label small { display: block; margin-top: 7px; color: var(--admin-muted); font-weight: 500; line-height: 1.45; }
.brand-preview { min-height: 176px; padding: 18px; display: grid; align-content: space-between; gap: 24px; border: 1px solid var(--admin-border); background: #111113; }
.brand-preview__caption { color: var(--admin-muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.brand-preview__logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-preview__logo img { width: 52px; height: 52px; object-fit: contain; }
.brand-preview__logo strong { min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.065em; }
.admin-form-grid--live-data { margin-top: 24px; }
.admin-body table, .admin-body table.dataTable.admin-table { border: 1px solid var(--admin-border); background: var(--admin-surface); box-shadow: none; }
.admin-body table.dataTable.admin-table > thead > tr > th, .admin-body .admin-table th { background: var(--admin-surface-2); color: var(--admin-text); border-bottom: 1px solid var(--admin-border); }
.admin-body table.dataTable.admin-table > tbody > tr > td, .admin-body .admin-table td { border-bottom-color: var(--admin-border); }
.admin-body table.dataTable.admin-table > tbody > tr:hover > *, .admin-body .admin-table tr:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--admin-surface)); }
.admin-body .dt-container .dt-paging .dt-paging-button.current, .admin-body .admin-dt-paging .dt-paging-button.current { color: #06271e !important; background: var(--accent) !important; border-color: var(--accent) !important; }
.admin-body .alert, .admin-body .status-badge, .admin-body .chip, .admin-body .tag-pill, .admin-body .pagination a, .admin-body .pagination span { box-shadow: none; }
.auth-body .auth-card { background: #18181b; border: 1px solid #343438; box-shadow: none; }
@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-content, .admin-topbar { padding-left: 16px; padding-right: 16px; }
  .admin-nav { grid-template-columns: 1fr; }
  .brand-settings-layout { grid-template-columns: 1fr; }
  .brand-preview { min-height: 140px; }
}

/* Advertising workspace */
.ad-admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 28px; border: 1px solid var(--admin-border); border-left: 5px solid var(--accent); background: var(--admin-surface); }
.ad-admin-hero h2, .ad-editor__head h2 { margin: 5px 0 9px; color: var(--admin-text); font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.ad-admin-hero p, .ad-editor__head p { max-width: 760px; margin: 0; color: var(--admin-muted); line-height: 1.6; }
.ad-admin-eyebrow { color: var(--accent); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ad-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 20px 0 32px; border: 1px solid var(--admin-border); background: var(--admin-border); }
.ad-stat-grid article { min-height: 132px; padding: 22px; display: flex; flex-direction: column; background: var(--admin-surface); }
.ad-stat-grid span, .ad-stat-grid small { color: var(--admin-muted); }
.ad-stat-grid strong { margin: auto 0 2px; color: var(--admin-text); font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.ad-stat-grid small { font-size: .76rem; }
.ad-slot-section { margin: 0 0 34px; }
.ad-slot-section__head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--admin-border); }
.ad-slot-section__head h3 { margin: 0; color: var(--admin-text); font-size: 1.15rem; }
.ad-slot-section__head span { color: var(--admin-muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ad-slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 16px; }
.ad-slot-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--admin-border); background: var(--admin-surface); transition: border-color .18s ease, transform .18s ease; }
.ad-slot-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--admin-border)); }
.ad-slot-card.is-live { border-top: 3px solid var(--accent); }
.ad-slot-card__body { padding: 18px; flex: 1; }
.ad-slot-card__state { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--admin-muted); font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.ad-slot-card__state span, .ad-preview-note__dot { width: 8px; height: 8px; background: #667085; }
.ad-slot-card.is-live .ad-slot-card__state { color: var(--accent); }
.ad-slot-card.is-live .ad-slot-card__state span, .ad-preview-note__dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.ad-slot-card h4 { margin: 0 0 8px; color: var(--admin-text); font-size: 1.05rem; }
.ad-slot-card p { min-height: 54px; margin: 0; color: var(--admin-muted); font-size: .82rem; line-height: 1.5; }
.ad-slot-card dl { margin: 16px 0 0; display: grid; gap: 7px; }
.ad-slot-card dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .76rem; }
.ad-slot-card dt { color: var(--admin-muted); }
.ad-slot-card dd { margin: 0; color: var(--admin-text); font-weight: 800; text-align: right; }
.ad-slot-card__footer { min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--admin-border); color: var(--admin-muted); font-size: .74rem; }
.ad-slot-card__footer a { color: var(--accent); font-weight: 850; }
.ad-slot-wireframe { position: relative; height: 118px; overflow: hidden; display: block; border-bottom: 1px solid var(--admin-border); background: #101012; }
.ad-slot-wireframe span { position: absolute; display: block; background: #29292e; }
.ad-slot-wireframe__header { inset: 10px 12px auto; height: 12px; }
.ad-slot-wireframe__nav { inset: 28px 12px auto; height: 7px; opacity: .75; }
.ad-slot-wireframe__content { inset: 42px 12px 10px; background: linear-gradient(90deg, #25252a 0 47%, transparent 47% 51%, #25252a 51% 100%) !important; }
.ad-slot-wireframe__ad, .ad-place-option__visual i { z-index: 2; display: grid !important; place-items: center; background: color-mix(in srgb, var(--accent) 78%, #111) !important; color: #061f18; font-size: .62rem; font-style: normal; font-weight: 950; letter-spacing: .08em; }
.ad-slot-wireframe--header .ad-slot-wireframe__ad { inset: 39px 12px auto; height: 19px; }
.ad-slot-wireframe--footer .ad-slot-wireframe__ad { inset: auto 12px 10px; height: 21px; }
.ad-slot-wireframe--home .ad-slot-wireframe__ad { inset: 66px 12px auto; height: 27px; }
.ad-slot-wireframe--listing .ad-slot-wireframe__ad, .ad-slot-wireframe--fallback .ad-slot-wireframe__ad { inset: 43px 12px auto; height: 25px; }
.ad-slot-wireframe--sidebar .ad-slot-wireframe__ad { inset: 46px 13px 12px auto; width: 31%; }
.ad-slot-wireframe--article-top .ad-slot-wireframe__ad { inset: 41px 24px auto; height: 22px; }
.ad-slot-wireframe--article-inline .ad-slot-wireframe__ad { inset: 67px 24px auto; height: 25px; }
.ad-slot-wireframe--article-side .ad-slot-wireframe__ad { inset: 42px 12px 12px auto; width: 27%; }
.ad-slot-wireframe--article-bottom .ad-slot-wireframe__ad { inset: auto 24px 12px; height: 22px; }
.ad-materials-section { margin-top: 48px; }
.ad-table-material { min-width: 240px; display: flex; align-items: center; gap: 12px; }
.ad-table-material__preview { width: 64px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--admin-border); background: #111113; color: var(--accent); font-size: .7rem; font-weight: 900; }
.ad-table-material__preview img { width: 100%; height: 100%; object-fit: cover; }
.ad-table-material small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: .7rem; }
.ad-editor__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.ad-editor__columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ad-editor__main { display: grid; gap: 20px; min-width: 0; }
.ad-editor__fieldset { margin: 0; }
.ad-place-group + .ad-place-group { margin-top: 22px; }
.ad-place-group h3 { margin: 0 0 10px; color: var(--admin-muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-place-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-place-option, .ad-choice-card { position: relative; min-width: 0; display: flex !important; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--admin-border); background: #111113; cursor: pointer; }
.ad-place-option:hover, .ad-choice-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--admin-border)); }
.ad-place-option:has(input:checked), .ad-choice-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.ad-place-option input, .ad-choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.ad-place-option__visual { width: 86px; height: 58px; flex: 0 0 auto; border: 1px solid var(--admin-border); background: #1c1c20; }
.ad-place-option__visual::before, .ad-place-option__visual::after { content: ''; position: absolute; left: 6px; right: 6px; height: 4px; background: #34343a; }
.ad-place-option__visual::before { top: 6px; }
.ad-place-option__visual::after { top: 14px; }
.ad-place-option__visual i { position: absolute; left: 7px; right: 7px; top: 23px; bottom: 7px; }
.ad-place-option__visual.ad-slot-wireframe--header i { top: 20px; bottom: 21px; }
.ad-place-option__visual.ad-slot-wireframe--footer i { top: auto; bottom: 6px; height: 14px; }
.ad-place-option__visual.ad-slot-wireframe--sidebar i,
.ad-place-option__visual.ad-slot-wireframe--article-side i { left: auto; right: 6px; top: 20px; bottom: 6px; width: 29%; }
.ad-place-option__visual.ad-slot-wireframe--article-top i { top: 20px; bottom: 21px; }
.ad-place-option__visual.ad-slot-wireframe--article-inline i { top: 34px; bottom: 6px; }
.ad-place-option__visual.ad-slot-wireframe--article-bottom i { top: auto; bottom: 6px; height: 14px; }
.ad-place-option__copy { min-width: 0; }
.ad-place-option__copy strong, .ad-choice-card strong { display: block; color: var(--admin-text); font-size: .84rem; line-height: 1.3; }
.ad-place-option__copy small, .ad-choice-card small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: .7rem; font-weight: 500; line-height: 1.35; }
.ad-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
.ad-choice-card { min-height: 74px; }
.ad-type-panel[hidden] { display: none !important; }
.ad-type-panel { margin: 0 0 18px; }
.ad-editor__wide { display: block; }
.ad-active-toggle { margin-top: 18px; }
.ad-active-toggle span { display: block; }
.ad-active-toggle strong, .ad-active-toggle small { display: block; }
.ad-active-toggle small { margin: 3px 0 0; }
.ad-editor__preview-sticky { position: sticky; top: 126px; padding: 22px; border: 1px solid var(--admin-border); background: var(--admin-surface); }
.ad-editor__preview h3 { margin: 7px 0 14px; color: var(--admin-text); font-size: 1.25rem; }
.ad-preview-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; color: var(--admin-muted); font-size: .75rem; }
.ad-preview-meta strong { color: var(--admin-text); }
.ad-live-preview { position: relative; height: 260px; overflow: hidden; border: 1px solid var(--admin-border); background: #101012; }
.ad-live-preview > span { position: absolute; left: 12px; right: 12px; display: block; background: #2a2a2f; }
.ad-live-preview__header { top: 13px; height: 18px; }
.ad-live-preview__nav { top: 39px; height: 8px; }
.ad-live-preview__content { top: 58px; bottom: 13px; background: linear-gradient(90deg, #242429 0 62%, transparent 62% 66%, #242429 66%) !important; }
.ad-live-preview__creative { position: absolute; z-index: 2; inset: 78px 24px auto; height: 58px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 16%, #18181b); color: var(--accent); text-align: center; font-size: .76rem; font-weight: 900; }
.ad-live-preview__creative img { width: 100%; height: 100%; object-fit: cover; }
.ad-live-preview--header .ad-live-preview__creative { inset: 54px 12px auto; height: 40px; }
.ad-live-preview--footer .ad-live-preview__creative { inset: auto 12px 14px; height: 45px; }
.ad-live-preview--home .ad-live-preview__creative { inset: 132px 18px auto; height: 55px; }
.ad-live-preview--sidebar .ad-live-preview__creative, .ad-live-preview--article-side .ad-live-preview__creative { inset: 70px 15px 18px auto; width: 32%; height: auto; }
.ad-live-preview--article-top .ad-live-preview__creative { inset: 63px 28px auto; height: 46px; }
.ad-live-preview--article-inline .ad-live-preview__creative { inset: 130px 28px auto; height: 54px; }
.ad-live-preview--article-bottom .ad-live-preview__creative { inset: auto 28px 20px; height: 47px; }
.ad-preview-note { display: flex; align-items: center; gap: 9px; margin: 16px 0 10px; color: var(--admin-text); font-size: .78rem; font-weight: 800; }
.ad-editor__preview p { margin: 0; color: var(--admin-muted); font-size: .78rem; line-height: 1.55; }
.ad-editor__actions { padding-top: 22px; border-top: 1px solid var(--admin-border); }
@media (max-width: 1280px) {
  .ad-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-editor__columns { grid-template-columns: minmax(0, 1fr) 300px; }
  .ad-place-picker { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .ad-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-editor__columns { grid-template-columns: 1fr; }
  .ad-editor__preview { order: -1; }
  .ad-editor__preview-sticky { position: static; }
  .ad-place-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ad-admin-hero, .ad-editor__head { align-items: stretch; flex-direction: column; }
  .ad-stat-grid, .ad-slot-grid, .ad-place-picker, .ad-choice-grid { grid-template-columns: 1fr; }
  .ad-slot-card p { min-height: 0; }
  .ad-slot-card__footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
}
