/* ===== 9Spa AutoContent — giao diện trên nền Bootstrap 5 ===== */
:root {
    --ns-accent: #1f9d85;
    --ns-accent-hover: #178270;
    --ns-accent-soft: #e3f4f0;
    --ns-sidebar: #10231f;
    --ns-sidebar-text: #b9ccc7;
    --ns-sidebar-muted: #6f8c85;
    --ns-bg: #f5f7f6;
    --ns-surface: #ffffff;
    --ns-border: #e3e8e6;
    --ns-text: #1c2b28;
    --ns-muted: #6b7b77;
    --ns-radius: 12px;
    --bs-primary: var(--ns-accent);
    --bs-primary-rgb: 31, 157, 133;
    --bs-link-color: var(--ns-accent);
    --bs-link-hover-color: var(--ns-accent-hover);
    --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--ns-text);
    --bs-body-bg: var(--ns-bg);
    --bs-border-color: var(--ns-border);
}

html, body { height: 100%; }
body { font-size: 0.94rem; -webkit-font-smoothing: antialiased; }
h1:focus { outline: none; }
.icon { flex-shrink: 0; vertical-align: -0.2em; }

.btn-primary { --bs-btn-bg: var(--ns-accent); --bs-btn-border-color: var(--ns-accent); --bs-btn-hover-bg: var(--ns-accent-hover); --bs-btn-hover-border-color: var(--ns-accent-hover); --bs-btn-active-bg: #136b5c; --bs-btn-active-border-color: #136b5c; --bs-btn-disabled-bg: var(--ns-accent); --bs-btn-disabled-border-color: var(--ns-accent); }
.btn-outline-primary { --bs-btn-color: var(--ns-accent); --bs-btn-border-color: var(--ns-accent); --bs-btn-hover-bg: var(--ns-accent); --bs-btn-hover-border-color: var(--ns-accent); --bs-btn-active-bg: var(--ns-accent-hover); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #7cc9b9; box-shadow: 0 0 0 .2rem rgba(31, 157, 133, .18); }
.form-check-input:checked { background-color: var(--ns-accent); border-color: var(--ns-accent); }
.text-accent { color: var(--ns-accent) !important; }
.bg-accent-soft { background: var(--ns-accent-soft) !important; }
.nav-pills .nav-link.active { background: var(--ns-accent); }
.nav-tabs .nav-link { color: var(--ns-muted); }
.nav-tabs .nav-link.active { color: var(--ns-text); font-weight: 600; }
.page-link { color: var(--ns-accent); }
.page-item.active .page-link { background: var(--ns-accent); border-color: var(--ns-accent); }

/* ===== Khung ứng dụng ===== */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 256px; flex-shrink: 0; background: var(--ns-sidebar); color: var(--ns-sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { height: 60px; background: var(--ns-surface); border-bottom: 1px solid var(--ns-border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 1020; }
.app-content { padding: 1.75rem; max-width: 1440px; width: 100%; }
.app-backdrop { display: none; }

.app-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.app-brand:hover { color: #fff; }
.app-brand strong { display: block; font-size: 1.15rem; line-height: 1.1; }
.app-brand small { display: block; color: var(--ns-sidebar-muted); font-size: .75rem; }
.app-brand__logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2fb59c, #147a67); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(31, 157, 133, .35); }
.app-brand--auth { padding: 0; color: var(--ns-text); }
.app-brand--auth small { color: var(--ns-muted); }

.app-nav { padding: .25rem .75rem 1rem; flex: 1; }
.app-nav__section { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ns-sidebar-muted); padding: 1rem .75rem .35rem; }
.app-nav__link { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; margin: 1px 0; border-radius: 8px; color: var(--ns-sidebar-text); text-decoration: none; font-weight: 500; }
.app-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.app-nav__link.active { background: rgba(47, 181, 156, .18); color: #fff; box-shadow: inset 3px 0 0 #2fb59c; }
.app-sidebar__footer { padding: 1rem 1.5rem; color: var(--ns-sidebar-muted); border-top: 1px solid rgba(255, 255, 255, .06); }

.credit-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; background: var(--ns-accent-soft); color: #136b5c; font-weight: 600; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.credit-chip:hover { color: #0f5448; background: #d2ede7; }
.credit-chip__sep { width: 1px; height: 14px; background: rgba(19, 107, 92, .25); margin: 0 .25rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ns-accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

@media (max-width: 991.98px) {
    .app-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-open .app-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1025; }
    .app-content { padding: 1rem; }
}

/* ===== Thành phần chung ===== */
.card { border-color: var(--ns-border); border-radius: var(--ns-radius); box-shadow: 0 1px 2px rgba(16, 35, 31, .04); }
.card-header { background: transparent; border-bottom-color: var(--ns-border); font-weight: 600; }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ns-muted); font-weight: 600; border-bottom-width: 1px; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(31, 157, 133, .04); }
.badge { font-weight: 600; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: var(--ns-muted); font-size: .85rem; }
.empty-state__icon { color: #9fb3ae; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ns-muted); font-weight: 700; margin-bottom: .75rem; }
.text-prewrap { white-space: pre-wrap; }
/* Phần tử con của flex mặc định không co nhỏ hơn nội dung; cần lớp này để text-truncate cắt được chữ dài. */
.min-w-0 { min-width: 0; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #eef2f1; border: 1px solid var(--ns-border); }
.thumb-lg { width: 160px; height: 120px; border-radius: 10px; object-fit: contain; background: #f1f4f3; border: 1px solid var(--ns-border); }
/* Kho ảnh đã tạo */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.image-tile { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; border: 1px solid var(--ns-border); border-radius: 10px; background: var(--ns-surface); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.image-tile:hover, .image-tile:focus-visible { border-color: var(--bs-primary); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.image-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.image-tile__caption { display: block; min-width: 0; padding: .5rem .65rem; font-size: .8rem; }
@media (max-width: 575.98px) { .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } }
/* Chọn bố cục ảnh bài đăng Facebook */
.fb-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.fb-layout { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; padding: .5rem; border: 1px solid var(--ns-border); border-radius: 10px; background: var(--ns-surface); text-align: left; }
.fb-layout:hover { border-color: var(--ns-accent); }
.fb-layout.active { border-color: var(--ns-accent); box-shadow: 0 0 0 2px var(--ns-accent-soft, rgba(31,158,135,.2)); }
.fb-layout__frame { position: relative; display: block; height: 88px; width: auto; margin: 0 auto; background: #fff; border-radius: 6px; overflow: hidden; }
.fb-layout__slot { position: absolute; display: grid; place-items: center; border: 2px solid #fff; background: #d5e9e4; color: #167564; font-size: .7rem; font-weight: 700; }
.fb-layout__slot--split { background: #e8e3f4; color: #534ab7; border-style: dashed; border-color: #fff; }
.fb-layout.active .fb-layout__slot { background: #9fd9cb; }
.fb-layout.active .fb-layout__slot--split { background: #cbc4ee; }
.fb-layout__label { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.fb-layout__meta { font-size: .72rem; color: var(--ns-muted); }
.checker { background-color: #f3f5f4; background-image: linear-gradient(45deg, #e6ebe9 25%, transparent 25%), linear-gradient(-45deg, #e6ebe9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6ebe9 75%), linear-gradient(-45deg, transparent 75%, #e6ebe9 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }

/* Các bước quy trình */
.pipeline-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.pipeline-step { border: 1px solid var(--ns-border); border-radius: 10px; padding: .85rem; background: var(--ns-surface); }
.pipeline-step__num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: #eef2f1; color: var(--ns-muted); }
.pipeline-step.is-running { border-color: #6fc0d6; box-shadow: 0 0 0 3px rgba(13, 202, 240, .12); }
.pipeline-step.is-running .pipeline-step__num { background: #0dcaf0; color: #fff; }
.pipeline-step.is-done .pipeline-step__num { background: var(--ns-accent); color: #fff; }
.pipeline-step.is-failed .pipeline-step__num { background: #dc3545; color: #fff; }
.pipeline-step.is-waiting .pipeline-step__num { background: #ffc107; color: #3b2f00; }
@media (max-width: 767.98px) { .pipeline-steps { grid-template-columns: 1fr; } }

.log-list { max-height: 360px; overflow-y: auto; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .8rem; background: #0f1d1a; color: #c9dad6; border-radius: 10px; padding: .75rem 1rem; }
.log-list .log-error { color: #ff8f8f; }
.log-list .log-time { color: #6f8c85; margin-right: .5rem; }

.article-frame { width: 100%; min-height: 70vh; border: 1px solid var(--ns-border); border-radius: 10px; background: #fff; }
.code-box { max-height: 60vh; overflow: auto; background: #0f1d1a; color: #dfeae7; border-radius: 10px; padding: 1rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-word; }

/* Thông báo */
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { box-shadow: 0 8px 24px rgba(16, 35, 31, .16); border-radius: 10px; }
.toast-success { background: #e3f4f0; color: #0f5448; }
.toast-info { background: #e7f3fb; color: #0b4a6f; }
.toast-warning { background: #fff6dd; color: #6b4e00; }
.toast-error { background: #fde8e8; color: #8a1c1c; }

/* Trang đăng nhập */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #e3f4f0 0, transparent 40%), radial-gradient(circle at 90% 90%, #e8efe9 0, transparent 40%), var(--ns-bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 16px; padding: 2rem; box-shadow: 0 12px 40px rgba(16, 35, 31, .08); }
.auth-footer { color: var(--ns-muted); margin-top: 1.25rem; text-align: center; }
.auth-footer a { color: inherit; }

/* Ô ngày dd/mm/yyyy: ô type="date" ẩn chỉ để mở lịch của trình duyệt, nằm sát nút lịch để lịch hiện đúng chỗ. */
.date-input__native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.date-input .form-control { min-width: 7.5rem; }
.time-input .form-select { min-width: 4.25rem; }

/* 9Spa AI Center đang xử lý */
.ai-thinking { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border: 1px solid var(--ns-border); border-radius: 14px;
    background: linear-gradient(120deg, var(--ns-accent-soft), var(--ns-surface) 60%, #f1edff); }
.ai-thinking__orb { position: relative; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, #2fb59c, #7c5cff, #19a1d6, #f5b14c, #2fb59c); animation: ai-spin 2.2s linear infinite;
    box-shadow: 0 0 18px rgba(47, 181, 156, .45); }
.ai-thinking__orb span { position: absolute; inset: 4px; border-radius: 50%; background: var(--ns-surface); }
.ai-thinking__orb span::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7ce0c8, #147a67);
    animation: ai-pulse 1.4s ease-in-out infinite; }
.ai-thinking__body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ai-thinking__brand { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    background: linear-gradient(90deg, #147a67, #7c5cff, #19a1d6, #147a67); background-size: 300% auto; -webkit-background-clip: text; background-clip: text;
    color: transparent; animation: ai-shimmer 3s linear infinite; }
.ai-thinking__text { font-size: .92rem; color: var(--ns-text); }
.ai-thinking__dots i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: currentColor; vertical-align: middle;
    animation: ai-dot 1.2s infinite ease-in-out; }
.ai-thinking__dots i:nth-child(2) { animation-delay: .2s; }
.ai-thinking__dots i:nth-child(3) { animation-delay: .4s; }
.ai-thinking__time { color: var(--ns-muted); font-size: .75rem; }
.ai-thinking--compact { padding: .35rem .7rem; gap: .55rem; border-radius: 10px; }
.ai-thinking--compact .ai-thinking__orb { width: 22px; height: 22px; }
.ai-thinking--compact .ai-thinking__orb span { inset: 3px; }
.ai-thinking--compact .ai-thinking__orb span::after { inset: 4px; }
.ai-thinking--compact .ai-thinking__text { font-size: .82rem; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 50% { transform: scale(.7); opacity: .75; } }
@keyframes ai-shimmer { to { background-position: 300% center; } }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
/* Bản nhỏ trong nút và ô bảng: vòng màu xoay thay cho spinner khi đang chờ 9Spa AI Center */
.ai-inline { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--ns-muted); }
.ai-inline__orb { display: inline-block; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; vertical-align: -2px;
    background: conic-gradient(from 0deg, #2fb59c, #7c5cff, #19a1d6, #f5b14c, #2fb59c); animation: ai-spin 1.1s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 3.5px, #000 4px); mask: radial-gradient(circle, transparent 3.5px, #000 4px); }
/* Dấu "Vận hành bởi 9Spa AI Center" cuối thanh bên */
.ai-badge { display: flex; align-items: center; gap: .5rem; }
.ai-badge strong { color: #d9fff5; font-weight: 700; }
.ai-badge__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #2fb59c; box-shadow: 0 0 0 0 rgba(47, 181, 156, .6); animation: ai-beacon 2.4s ease-out infinite; }
@keyframes ai-beacon { 0% { box-shadow: 0 0 0 0 rgba(47, 181, 156, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 181, 156, 0); } }
@media (prefers-reduced-motion: reduce) { .ai-thinking *, .ai-thinking *::after, .ai-inline__orb, .ai-badge__dot { animation: none !important; } }

/* Gợi ý của 9Spa AI Center cho một ô */
.ai-suggestion { margin-top: .5rem; padding: .6rem .8rem; border: 1px dashed #7c5cff; border-radius: 10px; background: #f7f5ff; font-size: .88rem; white-space: pre-line; }
.ai-suggestion__label { font-size: .72rem; font-weight: 700; color: #5b43d6; text-transform: uppercase; letter-spacing: .05em; }

/* Danh sách thả xuống chọn nhiều (mỗi dòng một ô tick) */
.multi-check { position: relative; display: inline-block; }
.multi-check__backdrop { position: fixed; inset: 0; z-index: 1040; }
.multi-check__panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 1041; width: min(420px, calc(100vw - 2rem)); background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 12px; overflow: hidden; }
.multi-check__list { max-height: 320px; overflow-y: auto; }
.multi-check__row { display: flex; align-items: center; gap: .65rem; padding: .45rem .75rem; margin: 0; cursor: pointer; border-bottom: 1px solid var(--ns-border); }
.multi-check__row:last-child { border-bottom: 0; }
.multi-check__row:hover { background: var(--ns-accent-soft); }
.multi-check__row.is-on { background: var(--ns-accent-soft); }
.multi-check__row.is-off { opacity: .5; cursor: not-allowed; }

/* Ngày đăng ưu tiên: ô tick dạng nút */
/* Loại bài trong kế hoạch: Facebook (xanh dương) và website (xanh lá) */
.format-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; vertical-align: .05rem; }
.format-dot--facebook { background: #1877f2; }
.format-dot--web { background: #16a34a; }

/* Kế hoạch tháng: khối mục tiêu, thẻ thống kê, định hướng dạng thẻ, danh sách bài (theo tuần/lịch/kênh) */
.plan-hero { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.1rem 1.25rem;
    margin-bottom: 1rem; overflow: hidden; border: 1px solid #f3dccb; border-radius: 16px;
    background: linear-gradient(105deg, #fff3ea 0%, #fffaf6 52%, #fdede4 100%); }
.plan-hero::before, .plan-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.plan-hero::before { right: 12%; top: -70px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%); }
.plan-hero::after { right: -40px; bottom: -90px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(250, 205, 180, .45), rgba(250, 205, 180, 0) 70%); }
.plan-hero > * { position: relative; z-index: 1; }
.plan-hero__media { width: 150px; height: 124px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; color: #e0874f;
    background: linear-gradient(135deg, #fde3d2, #fff); box-shadow: 0 8px 22px rgba(186, 120, 80, .16); }
.plan-hero__media img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.plan-hero__eyebrow { display: inline-block; padding: .15rem .7rem; border-radius: 999px; background: #fde3d2; color: #b45309; font-size: .75rem; font-weight: 700; }
.plan-hero__title { margin: .35rem 0 .2rem; font-size: 1.45rem; font-weight: 800; color: #134e4a; overflow-wrap: anywhere; }
.plan-hero__message { margin: 0 0 .8rem; max-width: 70ch; font-size: .9rem; color: #5b6b66;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-hero__facts { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.plan-fact { display: flex; align-items: center; gap: .55rem; }
.plan-fact > .icon { color: #8a6f5f; flex-shrink: 0; }
.plan-fact > div > span { display: block; font-size: .72rem; color: var(--ns-muted); }
.plan-fact > div > b { display: block; font-size: .86rem; font-weight: 600; color: var(--ns-text); white-space: nowrap; }
.plan-hero__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: .75rem; align-self: stretch; }
.plan-period { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .5rem; border: 1px solid var(--ns-border); border-radius: 10px;
    background: var(--ns-surface); font-weight: 600; font-size: .9rem; }
.plan-period__nav { display: inline-grid; place-items: center; padding: .15rem; border: 0; border-radius: 6px; background: transparent; color: var(--ns-muted); }
.plan-period__nav:hover { background: var(--ns-bg); color: var(--ns-text); }
.plan-hero__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; }
.plan-unsaved { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: #b45309; }
.plan-hero__edit { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border: 1px solid var(--ns-border); border-radius: 10px;
    background: rgba(255, 255, 255, .92); font-size: .85rem; color: var(--ns-text); }
.plan-hero__edit:hover { background: var(--ns-surface); border-color: #cfd8d5; }
@media (max-width: 991.98px) {
    .plan-hero { grid-template-columns: 1fr; }
    .plan-hero__media { display: none; }
    .plan-hero__side { align-items: flex-start; }
    .plan-hero__buttons { justify-content: flex-start; }
}

.plan-channel { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: .3rem; border-radius: 50%; color: #fff; vertical-align: -4px; }
.plan-channel--facebook { background: #1877f2; }
.plan-channel--web { background: #16a34a; }
.plan-channel--lg { width: 34px; height: 34px; margin-right: 0; flex-shrink: 0; }

.plan-stats { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1199.98px) { .plan-stats { grid-template-columns: 1fr 1fr; } .plan-stats > :first-child { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .plan-stats { grid-template-columns: 1fr; } }
.plan-stat { padding: 1rem 1.1rem; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 14px; }
.plan-stat__title { margin-bottom: .8rem; font-weight: 700; font-size: .92rem; color: var(--ns-text); }
.plan-stat__overview { display: flex; align-items: center; gap: 1.2rem; }
.plan-stat__big { flex-shrink: 0; }
.plan-stat__big b { display: block; font-size: 2.4rem; line-height: 1; font-weight: 800; color: #134e4a; }
.plan-stat__big span { font-size: .78rem; color: var(--ns-muted); }
.plan-cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.plan-cat-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 8px; font-size: .78rem; color: var(--cat);
    background: color-mix(in srgb, var(--cat) 9%, #fff); border: 1px solid color-mix(in srgb, var(--cat) 24%, #fff); }
.plan-cat-chip b { font-size: .95rem; }
/* Chọn chuyên mục WordPress theo loại bài: cột chảy từ trên xuống để chuyên mục con nằm ngay dưới chuyên mục cha. */
.wp-cat-grid { columns: 3 12rem; column-gap: 1.25rem; max-height: 18rem; overflow-y: auto; padding: .5rem .75rem; border-radius: 8px; background: var(--bs-tertiary-bg, #f8fafc); }
.wp-cat-grid .form-check { break-inside: avoid; }
.plan-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .8rem; color: var(--ns-muted); }
.plan-progress b { color: var(--ns-text); }
.plan-progress__bar { flex: 1 1 110px; max-width: 220px; height: 6px; border-radius: 999px; background: #dfe5e3; overflow: hidden; }
.plan-progress__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fb59c, #16a34a); }
.plan-channel-stat { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.plan-channel-stat b { font-size: .9rem; }
.plan-bar { height: 6px; margin-top: .35rem; border-radius: 999px; background: #e7ecea; overflow: hidden; }
.plan-bar span { display: block; height: 100%; border-radius: 999px; }
.plan-bar--facebook span { background: #1877f2; }
.plan-bar--web span { background: #16a34a; }
.plan-donut { flex: 0 0 108px; width: 108px; height: 108px; display: grid; place-items: center; border-radius: 50%; }
.plan-donut > span { width: 66px; height: 66px; display: grid; place-content: center; border-radius: 50%; background: var(--ns-surface); text-align: center;
    font-size: .68rem; line-height: 1.1; color: var(--ns-muted); }
.plan-donut > span b { display: block; font-size: 1.15rem; color: var(--ns-text); }
.plan-donut-legend { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: .78rem; }
.plan-donut-legend li { display: flex; align-items: center; gap: .1rem; padding: .12rem 0; color: #46564f; }
.plan-donut-legend b { margin-left: auto; padding-left: .5rem; color: var(--ns-text); }

.plan-section { margin-bottom: 1rem; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 14px; }
.plan-section__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--ns-border); }
.plan-section__icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff1e7; color: #ea6c1f; }
.plan-section__title { margin: 0; font-size: 1.02rem; font-weight: 700; }
.plan-section__tools { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.plan-section__body { padding: 1rem 1.1rem; }
.plan-section__foot { padding: .55rem 1.1rem; border-top: 1px solid var(--ns-border); font-size: .78rem; color: var(--ns-muted); }

.plan-setup { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem 2rem; min-width: 0; margin: 0 0 1rem; padding: 0 0 1rem; border: 0;
    border-bottom: 1px dashed var(--ns-border); }
.plan-setup__col { min-width: 0; }
.plan-setup__col + .plan-setup__col { padding-left: 2rem; border-left: 1px solid var(--ns-border); }
@media (max-width: 991.98px) {
    .plan-setup { grid-template-columns: 1fr; }
    .plan-setup__col + .plan-setup__col { padding-left: 0; border-left: 0; }
}
.plan-field { margin-bottom: .9rem; }
.plan-field > label:first-child, .plan-field__label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .85rem; }
.plan-channel-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.plan-channel-check { display: inline-flex; align-items: center; gap: .45rem; min-width: 120px; margin: 0; font-size: .9rem; cursor: pointer; }
.plan-channel-check .plan-channel { margin-right: 0; }
.plan-channel-count { width: 80px; }

.plan-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.plan-tabs__btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border: 1px solid var(--ns-border); border-radius: 10px;
    background: var(--ns-surface); color: var(--ns-muted); font-size: .86rem; font-weight: 600; }
.plan-tabs__btn:hover { color: var(--ns-text); }
.plan-tabs__btn.is-active { color: #c2410c; border-color: #fbc8a4; background: #fff7f1; box-shadow: inset 0 -2px 0 #f97316; }

.plan-dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
@media (max-width: 1199.98px) { .plan-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .plan-dir-grid { grid-template-columns: 1fr; } }
.plan-dir-card { min-width: 0; padding: .85rem .95rem; border: 1px solid #f6e3d5; border-radius: 12px; background: #fffaf6; }
.plan-dir-card--wide { grid-column: 1 / -1; }
.plan-dir-card.is-editing { grid-column: span 2; background: var(--ns-surface); border-color: #2fb59c; box-shadow: 0 0 0 3px rgba(47, 181, 156, .14); }
@media (max-width: 767.98px) { .plan-dir-card.is-editing { grid-column: auto; } }
.plan-dir-card__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.plan-dir-card__icon { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid #f6e3d5; border-radius: 9px;
    background: var(--ns-surface); color: #ea6c1f; }
.plan-dir-card__title { flex: 1; min-width: 0; margin: 0; font-weight: 700; font-size: .88rem; color: var(--ns-text); }
.plan-dir-card__link { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .35rem; border: 0; border-radius: 6px; background: transparent;
    font-size: .76rem; color: var(--ns-accent); white-space: nowrap; }
.plan-dir-card__link:hover:not(:disabled) { background: var(--ns-accent-soft); }
.plan-dir-card__list { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: #46564f; }
.plan-dir-card__list li { margin-bottom: .15rem; overflow-wrap: anywhere; }
.plan-dir-card__text { margin: 0; font-size: .84rem; color: #46564f; overflow-wrap: anywhere; }
.plan-dir-card__empty { width: 100%; padding: .55rem .6rem; border: 1px dashed #efcbb2; border-radius: 8px; background: transparent; font-size: .8rem; color: #b07a55; text-align: left; }
.plan-dir-card__empty:hover:not(:disabled) { background: #fff; }

.plan-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--ns-border); border-radius: 10px; background: var(--ns-bg); }
.plan-view-switch button { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .7rem; border: 0; border-radius: 8px; background: transparent;
    font-size: .82rem; color: var(--ns-muted); }
.plan-view-switch button.is-active { background: var(--ns-surface); color: var(--ns-accent); font-weight: 600; box-shadow: 0 0 0 1px #9fdcc9, 0 1px 3px rgba(16, 35, 31, .1); }
.plan-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .9rem; padding: .5rem .75rem; border-radius: 10px; background: var(--ns-bg); }
.plan-queue { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; border: 1px solid #c7eadf; border-radius: var(--ns-radius);
    background: linear-gradient(120deg, #ecfaf6, #f4f2ff); }
.plan-menu-anchor { position: relative; display: inline-block; }
.plan-menu-backdrop { position: fixed; inset: 0; z-index: 40; }
.plan-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 41; min-width: 200px; padding: .3rem; border: 1px solid var(--ns-border); border-radius: 10px;
    background: var(--ns-surface); box-shadow: 0 12px 30px rgba(16, 35, 31, .16); }
.plan-menu button, .plan-menu a { display: flex; width: 100%; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 0; border-radius: 7px; background: transparent;
    font-size: .86rem; color: var(--ns-text); text-align: left; text-decoration: none; }
.plan-menu button:hover, .plan-menu a:hover { background: var(--ns-bg); }
.plan-menu .text-danger { color: #dc3545; }

.plan-week { margin-bottom: 1rem; }
.plan-week__head { display: flex; width: 100%; align-items: center; gap: .75rem; margin-bottom: .55rem; padding: .5rem .85rem; border: 0; border-radius: 10px;
    background: #edf7f3; text-align: left; }
button.plan-week__head:hover { background: #e3f3ec; }
.plan-week__no { font-weight: 800; font-size: 1rem; color: #0f5f50; }
.plan-week__range { font-weight: 600; font-size: .9rem; color: var(--ns-text); }
.plan-week__meta { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: #0f766e; }
.plan-week__list { display: flex; flex-direction: column; gap: .55rem; }

.plan-card { --cat: #94a3b8; display: flex; align-items: stretch; gap: 1rem; padding: .75rem .9rem .75rem .8rem; background: var(--ns-surface);
    border: 1px solid var(--ns-border); border-left: 4px solid var(--cat); border-radius: 12px; transition: box-shadow .15s ease; }
.plan-card:hover { box-shadow: 0 4px 16px rgba(16, 35, 31, .07); }
.plan-card.is-locked { background: #fbfcfc; }
.plan-card.is-editing { flex-wrap: wrap; box-shadow: 0 0 0 3px rgba(47, 181, 156, .16); }
.plan-card.is-highlight { animation: plan-highlight 1.8s ease; }
@keyframes plan-highlight { 0%, 45% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 40%, transparent); } 100% { box-shadow: none; } }
.plan-card__date { flex: 0 0 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-right: .8rem;
    border-right: 1px solid var(--ns-border); line-height: 1.05; }
.plan-card__day { font-size: 1.55rem; font-weight: 800; color: var(--cat); }
.plan-card__dow { margin-top: .25rem; font-size: .74rem; color: var(--ns-muted); white-space: nowrap; }
.plan-card__body { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; border: 0; }
.plan-card__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .3rem; }
.plan-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
    background: #eef2f1; color: #46564f; }
.plan-chip--facebook { background: #e8f1fe; color: #1458b8; }
.plan-chip--web { background: #e6f6ec; color: #13723a; }
.plan-chip--outline { background: transparent; border: 1px solid var(--ns-border); font-weight: 500; color: #5b6b66; }
.plan-chip--cat { color: var(--cat); background: color-mix(in srgb, var(--cat) 11%, #fff); }
.plan-card__title { font-weight: 700; font-size: .95rem; line-height: 1.35; color: var(--ns-text); overflow-wrap: anywhere; }
.plan-card__detail { margin-top: .2rem; font-size: .84rem; color: var(--ns-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-card__products { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .45rem; }
.plan-product { padding: .1rem .5rem; border-radius: 5px; background: #f1f4f3; font-size: .68rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #5b6b66; }
.plan-product--note { border: 1px dashed var(--ns-border); background: transparent; font-weight: 500; text-transform: none; }
.plan-card__hint { font-size: .74rem; color: #a16207; }
.plan-card__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.plan-card.is-editing .plan-card__side { width: 100%; flex-direction: row; justify-content: flex-end; align-items: center; }
.plan-card__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .35rem; }
.plan-card__more { padding: .22rem .45rem; border: 1px solid var(--ns-border); background: var(--ns-surface); }
.plan-status { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
    background: #fff0e6; color: #c2410c; white-space: nowrap; }
.plan-status--queued { background: #fef6d8; color: #a16207; }
.plan-status--running { background: #e8f8f2; color: #0f766e; }
.plan-status--draft { background: #eef2f1; color: var(--ns-muted); }
@media (max-width: 575.98px) {
    .plan-card { flex-wrap: wrap; }
    .plan-card__side { width: 100%; flex-direction: row; align-items: center; }
}

.plan-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--ns-border); border-radius: 12px; }
.plan-calendar__dow { padding: .4rem; border-bottom: 1px solid var(--ns-border); background: var(--ns-bg); text-align: center; font-size: .75rem; font-weight: 700; color: var(--ns-muted); }
.plan-calendar__cell { min-width: 0; min-height: 108px; display: flex; flex-direction: column; gap: .25rem; padding: .35rem;
    border-right: 1px solid var(--ns-border); border-bottom: 1px solid var(--ns-border); }
.plan-calendar__cell:nth-child(7n) { border-right: 0; }
.plan-calendar__cell.is-out { background: #fafbfb; }
.plan-calendar__cell.is-out .plan-calendar__date { color: #b8c2bf; }
.plan-calendar__date { align-self: flex-start; padding: 0 .35rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--ns-text); }
.plan-calendar__cell.is-today .plan-calendar__date { background: var(--ns-accent); color: #fff; }
.plan-calendar__post { --cat: #94a3b8; display: block; width: 100%; padding: .22rem .4rem; border: 0; border-left: 3px solid var(--cat); border-radius: 5px;
    background: color-mix(in srgb, var(--cat) 10%, #fff); font-size: .72rem; color: var(--ns-text); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-calendar__post:hover { background: color-mix(in srgb, var(--cat) 18%, #fff); }
.plan-calendar__post .format-dot { margin-right: .3rem; }
@media (max-width: 767.98px) {
    .plan-calendar__cell { min-height: 64px; }
    .plan-calendar__post { height: 8px; padding: 0; font-size: 0; }
    .plan-calendar__post .format-dot { display: none; }
}

.plan-cat-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .35rem; border-radius: 2px; background: var(--cat, #94a3b8); flex-shrink: 0; }
.plan-cat-0 { --cat: #0ea5a4; }
.plan-cat-1 { --cat: #3b82f6; }
.plan-cat-2 { --cat: #f59e0b; }
.plan-cat-3 { --cat: #8b5cf6; }
.plan-cat-4 { --cat: #ec4899; }
.plan-cat-5 { --cat: #ef4444; }
.plan-cat-6 { --cat: #f97316; }
.plan-cat-7 { --cat: #64748b; }
.plan-cat-8 { --cat: #06b6d4; }
.plan-cat-other { --cat: #94a3b8; }
.weekday-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.weekday-picker .btn { min-width: 3.4rem; }

/* Trang công khai: chính sách quyền riêng tư, hướng dẫn xóa dữ liệu */
.legal-shell { min-height: 100vh; padding: 1.5rem 1rem 2.5rem; background: radial-gradient(circle at 20% 0, #e3f4f0 0, transparent 35%), var(--ns-bg); }
.legal-header { max-width: 860px; margin: 0 auto 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.legal-nav { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.legal-nav a { color: var(--ns-text); text-decoration: none; font-weight: 500; }
.legal-nav a:hover { color: var(--ns-accent); }
.legal-card { max-width: 860px; margin: 0 auto; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 16px; padding: 2rem 2.25rem; box-shadow: 0 12px 40px rgba(16, 35, 31, .06); line-height: 1.65; }
.legal-card h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.legal-card h2 { font-size: 1.1rem; margin: 1.75rem 0 .6rem; }
.legal-card li { margin-bottom: .35rem; }
.legal-card li > ul { margin-top: .35rem; }
.legal-meta { color: var(--ns-muted); font-size: .9rem; margin-bottom: 1.25rem; }
.legal-footer { max-width: 860px; margin: 1.25rem auto 0; color: var(--ns-muted); text-align: center; line-height: 1.6; }
.legal-footer a { color: inherit; }
@media (max-width: 575.98px) { .legal-card { padding: 1.25rem 1.1rem; } }

#blazor-error-ui { background: #fff6dd; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #fde8e8; padding: 1rem; color: #8a1c1c; border-radius: 10px; }
.blazor-error-boundary::after { content: "Đã xảy ra lỗi khi hiển thị phần này."; }
.validation-message { color: #dc3545; font-size: .85rem; }
.invalid { outline: 1px solid #dc3545; }
.nav-scroll { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }

/* Bảng màu phong cách */
.palette-strip { display: flex; height: 10px; }
.palette-strip span { flex: 1 1 0; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { display: flex; align-items: center; gap: .4rem; font-size: .8rem; }
.swatch__chip { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); flex: 0 0 auto; }
.swatch__hex { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ns-muted); }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.sample-tile { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--ns-border); background: #f1f4f3; aspect-ratio: 1 / 1; }
.sample-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sample-tile__num { position: absolute; left: .3rem; top: .3rem; background: rgba(15, 29, 26, .75); color: #fff; font-size: .7rem; border-radius: 4px; padding: 0 .35rem; }
.sample-tile__remove { position: absolute; right: .25rem; top: .25rem; }
.sample-tile.is-selected { outline: 3px solid var(--bs-primary); outline-offset: -3px; }
/* Lưới chọn ảnh: ảnh chưa chọn mờ đi và có ô tròn trống, để không tưởng nhầm là đã được dùng. */
.sample-grid--pick .sample-tile { cursor: pointer; }
.sample-grid--pick .sample-tile:not(.is-selected) img { opacity: .55; filter: grayscale(.4); transition: opacity .15s, filter .15s; }
.sample-grid--pick .sample-tile:not(.is-selected):hover img { opacity: .9; filter: none; }
.sample-tile__check { position: absolute; right: .3rem; bottom: .3rem; width: 22px; height: 22px; border-radius: 50%; display: grid; border: 2px solid #fff; background: rgba(15, 29, 26, .35); box-shadow: 0 0 0 1px rgba(15, 29, 26, .35); color: #fff; }
.sample-tile.is-selected .sample-tile__check { background: var(--bs-primary); border-color: var(--bs-primary); box-shadow: none; }

/* Tùy chọn ảnh chân dung */
.choice-group { display: flex; flex-wrap: wrap; gap: .35rem; }
.option-section { border: 1px solid var(--ns-border); border-radius: 10px; margin-bottom: .6rem; background: var(--ns-surface, #fff); }
.option-section > summary { cursor: pointer; padding: .6rem .9rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; }
.option-section > summary::-webkit-details-marker { display: none; }
.option-section > summary::before { content: "▸"; color: var(--ns-muted); transition: transform .15s; }
.option-section[open] > summary::before { transform: rotate(90deg); }
.option-section__body { padding: .2rem .9rem .9rem; }
.option-row { margin-bottom: .8rem; }
.option-row:last-child { margin-bottom: 0; }
.option-row__label { font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.aspect-card { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid var(--ns-border); border-radius: 10px; background: transparent; text-align: left; }
.aspect-card:hover { border-color: var(--bs-primary); }
.aspect-card.is-active { border: 2px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), .06); }
.aspect-card__shape { display: block; flex: 0 0 auto; width: 30px; max-height: 44px; border: 2px solid currentColor; border-radius: 3px; opacity: .55; }
button.swatch__chip { cursor: pointer; }

/* ===== Tổng quan ===== */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.dash-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.dash-col > .dash-card:last-child { flex: 1; }
@media (max-width: 1199.98px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }
.dash-card { min-width: 0; padding: 1rem 1.15rem 1.1rem; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 14px; }
.dash-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.dash-card__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ns-text); }
.dash-card__more { margin-left: auto; display: inline-flex; align-items: center; gap: .15rem; font-size: .84rem; white-space: nowrap; text-decoration: none; }
.dash-card__more:hover { text-decoration: underline; }
.dash-card__tools { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.dash-card__tools .form-select { width: auto; }
.dash-card__sub { margin: .35rem 0 .85rem; font-size: .82rem; color: var(--ns-muted); }
.dash-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border: 1px dashed #cfdad6;
    border-radius: 12px; background: #fafcfb; font-size: .86rem; color: #46564f; }

.dash-tile { display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; background: var(--ns-accent-soft); color: var(--ns-accent); }
.dash-tile--sm { width: 28px; height: 28px; border-radius: 8px; }
.dash-tile--md { width: 46px; height: 46px; border-radius: 13px; }
.dash-tile--lg { width: 58px; height: 58px; border-radius: 16px; }
.dash-tile--xl { width: 66px; height: 66px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(16, 35, 31, .06); }
.dash-tile--info { background: #e8f0fe; color: #2563eb; }
.dash-tile--warning { background: #fff3dc; color: #d97706; }
.dash-tile--danger { background: #fdeaea; color: #dc2626; }
.dash-tile--muted { background: #eef1f0; color: #5d6d69; }
.dash-tile--facebook { background: #e7f0fe; color: #1877f2; }

/* Hạn sử dụng */
.dash-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .7rem 1rem; background: var(--ns-surface);
    border: 1px solid var(--ns-border); border-radius: 12px; font-size: .9rem; }
.dash-banner > .icon { color: var(--ns-accent); }
.dash-banner.is-warning { background: #fffbeb; border-color: #fcd34d; }
.dash-banner.is-warning > .icon { color: #d97706; }
.dash-banner__link { margin-left: auto; display: inline-flex; align-items: center; gap: .15rem; font-weight: 600; font-size: .86rem; white-space: nowrap; text-decoration: none; }

/* Lối tắt (người dùng) */
.dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 767.98px) { .dash-actions { grid-template-columns: 1fr; } }
.dash-action { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.25rem; border: 1px solid #cfe9e1; border-radius: 16px;
    background: linear-gradient(115deg, #eaf7f3, #fff 72%); color: var(--ns-text); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.dash-action:hover { color: var(--ns-text); box-shadow: 0 8px 24px rgba(16, 35, 31, .08); transform: translateY(-1px); }
.dash-action--plan { border-color: #d7e3f8; background: linear-gradient(115deg, #edf3ff, #fff 72%); }
.dash-action--plan .dash-tile { color: #2563eb; }
.dash-action__text { min-width: 0; }
.dash-action__text b { display: block; font-size: 1.12rem; }
.dash-action__text span { display: block; margin-top: .15rem; font-size: .86rem; color: var(--ns-muted); }
.dash-action__go { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; margin-left: auto; border-radius: 50%; background: #fff;
    color: var(--ns-accent); box-shadow: 0 2px 8px rgba(16, 35, 31, .1); }
@media (max-width: 575.98px) { .dash-action .dash-tile--xl { width: 52px; height: 52px; } }

/* Thẻ số liệu */
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1199.98px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .dash-stats { grid-template-columns: minmax(0, 1fr); } }
.dash-stat { display: flex; align-items: flex-start; gap: .85rem; min-width: 0; padding: 1rem 1.05rem; background: var(--ns-surface); border: 1px solid var(--ns-border);
    border-radius: 14px; color: var(--ns-text); text-decoration: none; }
a.dash-stat:hover { color: var(--ns-text); border-color: #bcd8d0; box-shadow: 0 4px 16px rgba(16, 35, 31, .05); }
.dash-stat__body { display: block; flex: 1; min-width: 0; }
.dash-stat__label { display: block; font-size: .8rem; color: var(--ns-muted); }
.dash-stat__value { display: block; margin: .1rem 0; font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.dash-stat__value small { margin-left: .25rem; font-size: .9rem; font-weight: 600; color: #46564f; }
.dash-stat__sub { display: block; font-size: .78rem; color: var(--ns-muted); }
.dash-stat__sub.is-up { color: #15803d; }
.dash-stat__sub.is-down { color: #b91c1c; }
.dash-stat__sub.is-warn { color: #b45309; }
.dash-stat__chev { align-self: center; color: #a3b1ad; }
.dash-meter { display: block; height: 6px; margin-top: .55rem; border-radius: 999px; background: #dcefe9; overflow: hidden; }
.dash-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--ns-accent); }
.dash-meter.is-warning { background: #fdefd3; }
.dash-meter.is-warning > span { background: #f59e0b; }
.dash-meter.is-danger { background: #fbe0e0; }
.dash-meter.is-danger > span { background: #dc2626; }

/* Dải tổng quan hôm nay (quản trị viên) */
.dash-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 0; margin-bottom: 1rem; padding: .85rem 1rem; background: linear-gradient(115deg, #eef8f5, #fff 60%);
    border: 1px solid #d3ebe4; border-radius: 14px; }
.dash-summary__lead { display: flex; align-items: center; gap: .8rem; padding-right: 1.4rem; margin-right: .4rem; border-right: 1px solid var(--ns-border); }
.dash-summary__lead b { display: block; font-size: 1rem; }
.dash-summary__lead span { display: block; font-size: .8rem; color: var(--ns-muted); }
.dash-summary__item { display: flex; align-items: center; gap: .6rem; padding: 0 1.4rem; border-right: 1px solid var(--ns-border); color: var(--ns-accent); }
.dash-summary__item:nth-last-child(2) { border-right: 0; }
.dash-summary__item b { display: block; font-size: 1.2rem; line-height: 1.1; color: var(--ns-text); }
.dash-summary__item span { display: block; font-size: .78rem; color: var(--ns-muted); }
.dash-health { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 600; }
.dash-health i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.dash-health.is-ok { background: #e3f6ea; color: #15803d; }
.dash-health.is-warn { background: #fff3dc; color: #b45309; }
.dash-health.is-bad { background: #fdeaea; color: #b91c1c; }
@media (max-width: 991.98px) {
    .dash-summary__lead { flex-basis: 100%; border-right: 0; padding-right: 0; margin-right: 0; }
    .dash-summary__item { padding: 0 1rem 0 0; margin-right: 1rem; }
    .dash-health { margin-left: 0; }
}

/* Kế hoạch tháng */
.dash-plan__count { display: flex; align-items: baseline; gap: .4rem; margin: .2rem 0 .7rem; }
.dash-plan__count b { font-size: 2.3rem; font-weight: 800; line-height: 1; color: #134e4a; }
.dash-plan__count span { font-size: 1.15rem; font-weight: 700; }
.dash-progress { display: flex; align-items: center; gap: .9rem; }
.dash-progress__bar { flex: 1; height: 10px; border-radius: 999px; background: #e3ebe8; overflow: hidden; }
.dash-progress__bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fb59c, #16a34a); }
.dash-progress b { font-size: .9rem; }
.dash-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .9rem; font-size: .82rem; color: #46564f; }
.dash-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dash-dot { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; }
.dash-dot--done { background: #16a34a; }
.dash-dot--todo { background: #cfd9d6; }
.dash-dot--late { background: #ef4444; }
.dash-dot--warn { background: #f59e0b; }
.dash-days { display: flex; flex-wrap: wrap; gap: .45rem .25rem; margin-top: 1rem; padding: .6rem .5rem .45rem; border: 1px solid var(--ns-border); border-radius: 12px; }
.dash-day { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 32px; font-size: .7rem; color: var(--ns-muted); }
.dash-day i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e1e8e5; color: #fff; }
.dash-day.is-done i { background: #22a35a; }
.dash-day.is-late i { background: #ef4444; }
.dash-day.is-today span { font-weight: 700; color: var(--ns-text); }
.dash-day.is-today i { box-shadow: 0 0 0 2px var(--ns-surface), 0 0 0 4px #9fdcc9; }

/* Gợi ý */
.dash-suggest { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 575.98px) { .dash-suggest { grid-template-columns: minmax(0, 1fr); } }
.dash-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 156px; padding: .75rem; overflow: hidden;
    border-radius: 12px; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--cat, #1f9d85) 78%, #fff), color-mix(in srgb, var(--cat, #1f9d85) 88%, #000)); }
.dash-art::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.dash-art__date { position: relative; z-index: 1; font-size: .8rem; font-weight: 700; }
.dash-art__icon { position: relative; z-index: 1; opacity: .95; }
.dash-art__channel { position: relative; z-index: 1; font-size: .72rem; font-weight: 600; opacity: .9; }
.dash-art--sm { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; min-height: 0; padding: 0; }
.dash-art--sm::after { display: none; }
.dash-suggest__title { margin: .5rem 0 .3rem; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.dash-suggest__text { margin: 0 0 .8rem; font-size: .86rem; color: var(--ns-muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dash-suggest-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--ns-border); }
.dash-suggest-row:first-child { border-top: 0; padding-top: .2rem; }

/* Danh sách (hoạt động, cảnh báo) */
.dash-list { margin: 0; padding: 0; list-style: none; }
.dash-list > li + li { border-top: 1px solid var(--ns-border); }
.dash-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .35rem; margin: 0 -.35rem; border-radius: 10px; color: var(--ns-text); text-decoration: none; }
a.dash-item:hover { background: #f5f9f8; color: var(--ns-text); }
.dash-item__main { display: block; flex: 1; min-width: 0; }
.dash-item__title { display: block; overflow: hidden; font-weight: 600; font-size: .88rem; white-space: nowrap; text-overflow: ellipsis; }
.dash-item__detail { display: block; overflow: hidden; font-size: .78rem; color: var(--ns-muted); white-space: nowrap; text-overflow: ellipsis; }
.dash-item__side { display: inline-flex; flex-shrink: 0; align-items: center; gap: .6rem; font-size: .76rem; color: var(--ns-muted); white-space: nowrap; }
.dash-alert__text { display: block; font-size: .86rem; }
.dash-chip { display: inline-block; padding: .2rem .55rem; border-radius: 7px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.dash-chip--success { background: #e3f6ea; color: #15803d; }
.dash-chip--info { background: #e6effe; color: #1d4ed8; }
.dash-chip--warning { background: #fff2d6; color: #b45309; }
.dash-chip--danger { background: #fde8e8; color: #b91c1c; }
.dash-chip--muted { background: #eef1f0; color: #5d6d69; }
.dash-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--ns-border); }
.dash-filter { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border: 1px solid var(--ns-border); border-radius: 999px;
    background: var(--ns-surface); font-size: .8rem; color: #46564f; }
.dash-filter:hover { border-color: #9fdcc9; }
.dash-filter.is-active { border-color: var(--ns-accent); background: var(--ns-accent); color: #fff; }

/* Hôm nay */
.dash-post { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; }
.dash-list > .dash-post:first-child { padding-top: .2rem; }
.dash-time { flex-shrink: 0; padding: .3rem .55rem; border-radius: 8px; background: var(--ns-accent-soft); color: #136b5c; font-weight: 700; font-size: .86rem;
    font-variant-numeric: tabular-nums; }
.dash-thumb { display: grid; place-items: center; flex-shrink: 0; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #eef2f1; color: #9aa9a5; }
.dash-post__main { flex: 1; min-width: 0; }
.dash-post__title { overflow: hidden; font-weight: 700; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; }
.dash-post__meta { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin: .1rem 0; font-size: .76rem; color: var(--ns-muted); }
.dash-post__text { font-size: .8rem; color: #5b6b66; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-post__side { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: .4rem; }
@media (max-width: 575.98px) {
    .dash-thumb { width: 52px; height: 52px; }
    .dash-post__text { display: none; }
    .dash-post { flex-wrap: wrap; }
    .dash-post__side { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
}

/* Biểu đồ 30 ngày */
.dash-chart { padding: .4rem 0 0 2.1rem; }
.dash-chart__plot { position: relative; height: 150px; }
.dash-chart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #edf2f0; }
.dash-chart__grid.is-base { border-top-color: #cdd8d4; }
.dash-chart__grid span { position: absolute; right: calc(100% + .45rem); top: 0; transform: translateY(-50%); font-size: .7rem; color: var(--ns-muted);
    font-variant-numeric: tabular-nums; }
.dash-chart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.dash-chart__slot { position: relative; display: flex; flex: 1 1 0; align-items: flex-end; justify-content: center; height: 100%; }
.dash-chart__slot > span { position: relative; display: block; width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; background: var(--ns-accent); }
.dash-chart__slot.is-zero > span { background: #dfe7e4; }
.dash-chart__slot:hover > span { background: #136b5c; }
.dash-chart__slot > span::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 2; padding: .2rem .5rem; border-radius: 6px;
    background: #10231f; color: #fff; font-size: .72rem; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(-50%);
    transition: opacity .12s; }
.dash-chart__slot.is-start > span::after { left: 0; transform: none; }
.dash-chart__slot.is-end > span::after { left: auto; right: 0; transform: none; }
.dash-chart__slot:hover > span::after { opacity: 1; }
.dash-chart__x { display: flex; justify-content: space-between; margin-top: .45rem; font-size: .7rem; color: var(--ns-muted); font-variant-numeric: tabular-nums; }
.dash-table { max-height: 190px; overflow-y: auto; font-size: .82rem; }

/* Tuyến dưới */
.dash-downline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.25rem; margin-top: .9rem; }
@media (max-width: 575.98px) { .dash-downline { grid-template-columns: minmax(0, 1fr); } }
.dash-downline__total { display: flex; align-items: center; gap: .8rem; padding-right: 1.25rem; border-right: 1px solid var(--ns-border); }
.dash-downline__total b { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.dash-downline__total span { display: block; max-width: 9rem; font-size: .8rem; color: var(--ns-muted); }
.dash-downline__legend { margin: 0; padding: 0; list-style: none; font-size: .84rem; }
.dash-downline__legend li { display: flex; align-items: center; gap: .5rem; padding: .22rem 0; color: #46564f; }
.dash-downline__legend b { margin-left: auto; color: var(--ns-text); font-variant-numeric: tabular-nums; }

/* Top đại lý */
.dash-rank { margin: .7rem 0 0; padding: 0; list-style: none; }
.dash-rank li { display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) minmax(60px, 1.1fr) 40px; align-items: center; gap: .6rem; padding: .5rem 0; }
.dash-rank li + li { border-top: 1px solid var(--ns-border); }
.dash-rank__medal { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #eef1f0; color: #5d6d69; font-size: .72rem; font-weight: 700; }
.dash-rank__medal.is-top1 { background: #fde68a; color: #92400e; }
.dash-rank__medal.is-top2 { background: #e5e7eb; color: #374151; }
.dash-rank__medal.is-top3 { background: #fed7aa; color: #9a3412; }
.dash-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ns-accent); color: #fff; font-weight: 700; font-size: .85rem; }
.dash-rank__name { min-width: 0; }
.dash-rank__name b { display: block; overflow: hidden; font-size: .86rem; white-space: nowrap; text-overflow: ellipsis; }
.dash-rank__name span { display: block; font-size: .74rem; color: var(--ns-muted); }
.dash-rank__bar { height: 8px; border-radius: 999px; background: #e3ebe8; overflow: hidden; }
.dash-rank__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--ns-accent); }
.dash-rank__pct { font-size: .78rem; color: var(--ns-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Nhãn hàng tài trợ vận hành (chân menu "For [logo]") */
.sponsor-line { display: flex; align-items: center; gap: .45rem; margin-top: .55rem; }
.sponsor-line__for { font-size: .78rem; font-style: italic; color: var(--ns-sidebar-text); }
.sponsor-line strong { color: #fff; }
.sponsor-line__logo { display: inline-flex; align-items: center; height: 30px; max-width: 160px; padding: 3px 8px; border-radius: 7px; background: #fff; }
.sponsor-line__logo img { display: block; max-width: 144px; max-height: 24px; object-fit: contain; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.sponsor-card { min-width: 0; padding: .75rem; border: 1px solid var(--ns-border); border-radius: 12px; background: var(--ns-surface); }
.sponsor-preview { padding: .7rem .85rem; border-radius: 10px; background: var(--ns-sidebar); color: var(--ns-sidebar-text); font-size: .82rem; }
/* Ảnh bìa & đại diện: xem trước đúng tỉ lệ, lớp phủ vùng mạng xã hội hiển thị */
.cover-preview { position: relative; width: 100%; overflow: hidden; border-radius: 8px; background: #f1f4f3; }
.cover-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-zone { position: absolute; pointer-events: none; }
.cover-zone.is-round { border-radius: 50%; }
.cover-zone.is-visible { outline: 2px dashed rgba(255, 255, 255, .95); outline-offset: -2px; box-shadow: 0 0 0 9999px rgba(15, 23, 21, .5); }
.cover-zone.is-covered { background: rgba(255, 255, 255, .55); border: 2px solid #fff; }
.cover-zone.is-safe { border: 2px dashed #22c55e; }
.cover-legend { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .35rem; font-size: .72rem; color: var(--ns-muted); }
.cover-legend__mark { display: inline-block; width: 14px; height: 10px; margin-right: .3rem; vertical-align: -1px; border-radius: 2px; }
.cover-legend__mark.is-visible { border: 2px dashed var(--ns-muted); }
.cover-legend__mark.is-covered { border-radius: 50%; width: 10px; background: #cbd5d1; border: 1px solid var(--ns-muted); }
.cover-legend__mark.is-safe { border: 2px dashed #22c55e; }

/* Trang Ảnh bìa & đại diện (bố cục theo mockup) */
.cv-page { --cv-green: #1d6b52; --cv-green-dark: #134e3c; --cv-soft: #e9f5f0; --cv-soft-text: #245446; --cv-line: #e3e9e6; }
.cv-card { background: var(--ns-surface); border: 1px solid var(--cv-line); border-radius: 14px; padding: 1.25rem 1.35rem; box-shadow: 0 1px 2px rgba(16, 35, 31, .04); }
.cv-card + .cv-card { margin-top: 1.25rem; }
.cv-head { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.1rem; }
.cv-step { flex: 0 0 auto; width: 28px; height: 28px; margin-top: .05rem; border-radius: 50%; background: var(--cv-green-dark); color: #fff; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; }
.cv-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ns-text); }
.cv-sub { margin: .15rem 0 0; font-size: .8rem; color: var(--ns-muted); }
.cv-label { display: block; margin: 0 0 .45rem; font-size: .85rem; font-weight: 600; color: var(--ns-text); }
.cv-help { margin-top: .35rem; font-size: .75rem; color: var(--ns-muted); }
.cv-page .form-control { border-color: var(--cv-line); border-radius: 10px; min-height: 44px; }
.cv-page .form-control:focus { border-color: var(--cv-green); box-shadow: 0 0 0 .2rem rgba(29, 107, 82, .12); }
.cv-page .form-control:disabled { background: #f5f7f6; }
.cv-input-wrap { position: relative; }
.cv-input-wrap > .form-control { padding-right: 4.4rem; }
.cv-count { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font-size: .72rem; color: var(--ns-muted); pointer-events: none; }
.cv-input-wrap > textarea + .cv-count { top: auto; bottom: .45rem; transform: none; }
.cv-option { position: relative; display: flex; gap: .8rem; width: 100%; height: 100%; padding: .9rem 2.4rem .9rem 1rem; border: 1.5px solid var(--cv-line); border-radius: 12px; background: #fff; text-align: left; color: var(--ns-text); }
.cv-option:hover { border-color: var(--cv-green); }
.cv-option.is-active { border-color: var(--cv-green); background: var(--cv-soft); }
.cv-option__icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; background: var(--cv-soft); color: var(--cv-green); display: inline-flex; align-items: center; justify-content: center; }
.cv-option.is-active .cv-option__icon { background: #fff; }
.cv-option__title { font-weight: 700; font-size: .95rem; }
.cv-option__desc { margin-top: .15rem; font-size: .76rem; color: var(--ns-muted); }
.cv-radio { position: absolute; top: .75rem; right: .75rem; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #c3cec9; background: #fff; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.cv-option.is-active .cv-radio { background: var(--cv-green); border-color: var(--cv-green); }
.cv-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.cv-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .38rem .95rem; border: 1px solid #cfd8d4; border-radius: 999px; background: #fff; color: var(--ns-text); font-size: .8rem; line-height: 1.3; }
.cv-chip:hover { border-color: var(--cv-green); color: var(--cv-green); }
.cv-chip.is-active { background: var(--cv-green); border-color: var(--cv-green); color: #fff; }
.cv-hint { display: flex; gap: .5rem; margin-top: .8rem; padding: .6rem .85rem; border-radius: 10px; background: var(--cv-soft); color: var(--cv-soft-text); font-size: .78rem; }
.cv-note { display: flex; gap: .5rem; height: 100%; align-items: flex-start; padding: .65rem .85rem; border-radius: 10px; background: #f5f7f6; color: var(--ns-muted); font-size: .76rem; }
.cv-format { display: flex; flex-direction: column; width: 100%; height: 100%; padding: .85rem; border: 1.5px solid var(--cv-line); border-radius: 12px; background: #fff; text-align: left; color: var(--ns-text); }
.cv-format:hover { border-color: var(--cv-green); }
.cv-format.is-active { border-color: var(--cv-green); box-shadow: 0 0 0 3px rgba(29, 107, 82, .08); }
.cv-format__top { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; }
.cv-format__note { margin-top: .6rem; font-size: .72rem; color: var(--ns-muted); }
.cv-check { flex: 0 0 auto; margin-left: auto; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #c3cec9; background: #fff; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.cv-check.is-on { background: var(--cv-green); border-color: var(--cv-green); }
.cv-demo { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; background: #f3f5f4; }
.cv-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .85rem; font-size: .72rem; color: var(--ns-muted); }
.cv-legend__mark { display: inline-block; width: 14px; height: 10px; margin-right: .35rem; vertical-align: -1px; border-radius: 2px; }
.cv-legend__mark.is-visible { background: rgba(15, 23, 21, .5); }
.cv-legend__mark.is-covered { width: 10px; border-radius: 50%; background: #cbd5d1; border: 1px solid var(--ns-muted); }
.cv-legend__mark.is-safe { border: 2px dashed #22c55e; }
.cv-select { position: relative; }
.cv-select__btn { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .35rem .8rem; border: 1px solid var(--cv-line); border-radius: 10px; background: #fff; text-align: left; color: var(--ns-text); }
.cv-select__btn:hover { border-color: var(--cv-green); }
.cv-logo { flex: 0 0 auto; width: 36px; height: 28px; object-fit: contain; }
.cv-logo-none { flex: 0 0 auto; width: 36px; height: 28px; border-radius: 6px; background: #f1f4f3; color: var(--ns-muted); display: inline-flex; align-items: center; justify-content: center; }
.cv-backdrop { position: fixed; inset: 0; z-index: 1050; }
.cv-menu { position: absolute; z-index: 1051; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 320px; overflow-y: auto; padding: .3rem; border: 1px solid var(--cv-line); border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(16, 35, 31, .14); }
.cv-chips .cv-menu { min-width: 300px; }
.cv-menu--right { left: auto; right: 0; min-width: 200px; }
.cv-menu__group { padding: .4rem .6rem .2rem; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ns-muted); }
.cv-menu__item { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--ns-text); font-size: .84rem; text-align: left; text-decoration: none; }
.cv-menu__item:hover, .cv-menu__item.is-active { background: var(--cv-soft); color: var(--ns-text); }
.cv-menu__item.text-danger:hover { background: #fdecec; }
.cv-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.cv-tag { padding: .22rem .75rem; border: 1px solid transparent; border-radius: 999px; background: var(--cv-soft); color: var(--cv-soft-text); font-size: .74rem; }
.cv-tag:hover { border-color: var(--cv-green); }
.cv-tag.is-active { background: var(--cv-green); color: #fff; }
.cv-spaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; max-height: 240px; overflow-y: auto; }
.cv-space { position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f1f4f3; }
.cv-space img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cv-space.is-selected { border-color: var(--cv-green); box-shadow: 0 0 0 3px rgba(29, 107, 82, .12); }
.cv-space__x { position: absolute; top: .3rem; right: .3rem; width: 22px; height: 22px; border-radius: 50%; background: rgba(16, 35, 31, .78); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.cv-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; margin: 0; padding: .4rem; aspect-ratio: 4 / 3; border: 1.5px dashed #b6c4bf; border-radius: 10px; color: var(--ns-muted); font-size: .7rem; text-align: center; cursor: pointer; }
.cv-upload:hover { border-color: var(--cv-green); color: var(--cv-green); }
.cv-upload.is-disabled { opacity: .55; cursor: not-allowed; }
.cv-toggle { display: flex; gap: .75rem; align-items: flex-start; padding-left: 0; }
.cv-toggle .form-check-input { flex: 0 0 auto; width: 2.6em; height: 1.4em; margin: .1rem 0 0; border-radius: 2em; cursor: pointer; }
.cv-toggle .form-check-input:checked { background-color: var(--cv-green); border-color: var(--cv-green); }
.cv-toggle label { cursor: pointer; }
.cv-summary { position: sticky; top: 1rem; }
.cv-summary__head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--cv-line); font-weight: 700; }
.cv-icon-soft { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--cv-soft); color: var(--cv-green); display: inline-flex; align-items: center; justify-content: center; }
.cv-icon-soft--lg { width: 40px; height: 40px; border-radius: 10px; }
.cv-kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: .6rem .5rem; margin: 0 0 1rem; font-size: .8rem; }
.cv-kv dt { font-weight: 400; color: var(--ns-muted); }
.cv-kv dd { margin: 0; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.cv-kv__format { display: flex; gap: .55rem; align-items: flex-start; width: 100%; margin-bottom: .5rem; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; }
.cv-kv__format .cv-check { margin-left: 0; margin-top: .1rem; }
.cv-credit { display: flex; gap: .65rem; margin-bottom: 1rem; padding: .8rem .9rem; border-radius: 12px; background: var(--cv-soft); color: var(--cv-soft-text); font-size: .78rem; }
.cv-cta { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: .8rem 1rem; border: 0; border-radius: 10px; background: linear-gradient(180deg, #1f7259, #134e3c); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(19, 78, 60, .25); }
.cv-cta:hover { filter: brightness(1.07); }
.cv-cta:disabled { opacity: .5; box-shadow: none; filter: none; }
.cv-foot { display: flex; gap: .5rem; margin-top: 1rem; font-size: .74rem; color: var(--ns-muted); }
.cv-help-btn, .cv-ghost-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .95rem; border: 1px solid var(--cv-line); border-radius: 999px; background: #fff; color: var(--ns-text); font-size: .82rem; white-space: nowrap; }
.cv-help-btn:hover, .cv-ghost-btn:hover { border-color: var(--cv-green); color: var(--cv-green); }
.cv-result { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--cv-line); border-radius: 12px; overflow: hidden; background: #fff; }
.cv-result__media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: #f3f5f4; }
.cv-result__media--pending .cover-preview { opacity: .55; }
.cv-pending { position: absolute; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--cv-green); font-size: .78rem; font-weight: 600; box-shadow: 0 2px 8px rgba(16, 35, 31, .12); }
.cv-result__body { display: flex; flex: 1; flex-direction: column; padding: .7rem .8rem .8rem; }
.cv-result__title { min-width: 0; font-size: .82rem; font-weight: 600; }
.cv-result__meta { margin: .25rem 0 .75rem; font-size: .72rem; color: var(--ns-muted); }
.cv-result__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: auto; }
.cv-btn-light { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .42rem .5rem; border: 1px solid var(--cv-line); border-radius: 9px; background: #fff; color: var(--ns-text); font-size: .78rem; text-decoration: none; }
.cv-btn-light:hover { border-color: var(--cv-green); color: var(--cv-green); }
.cv-icon-btn { margin-left: auto; padding: 0 .2rem; border: 0; background: transparent; color: var(--ns-muted); line-height: 1; }
.cv-icon-btn:hover { color: var(--ns-text); }
.cv-retention { display: flex; gap: .55rem; margin-bottom: 1.1rem; padding: .7rem 1rem; border: 1px solid #f3d9a4; border-radius: 12px; background: #fff8e8; color: #7a5410; font-size: .84rem; }
