/**
 * TrollKhach - Components Styles
 * Tham chiếu: UI-DESIGN-SYSTEM.md Section 2
 */

/* ============================================================
   POST BADGES
   ============================================================ */
.post-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 var(--space-4);
    margin-bottom: 6px;
}

.badge-post {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-post--bai-hay {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.badge-post--du-an {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.badge-post--tim-viec {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    line-height: 1;
    border: 1px solid #d1d5db;
    border-color: var(--color-neutral-300, #d1d5db);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:focus-visible { outline: none; box-shadow: var(--shadow-glow); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; }

.btn-sm  { height: 32px; padding: 0 var(--space-3); font-size: var(--text-xs); gap: var(--space-1); border-radius: var(--radius-full); }
.btn-md  { height: 40px; padding: 0 var(--space-4); }
.btn-lg  { height: 48px; padding: 0 var(--space-6); font-size: var(--text-base); border-radius: var(--radius-full); }
.btn-icon { width: 40px; padding: 0; }

.btn-primary { background: #000000; color: #ffffff; border-color: #000000; }
.btn-primary:hover { background: var(--dub-carbon); border-color: var(--dub-carbon); }
.btn-primary:active { background: var(--dub-ink); transform: scale(0.98); }


.btn-outline { background: transparent; color: var(--color-neutral-800); border-color: var(--color-neutral-300, #d1d5db); }
.btn-outline:hover { background: var(--color-neutral-50); border-color: var(--color-neutral-400, #9ca3af); }

.btn-ghost { background: var(--color-neutral-0, #ffffff); color: var(--color-neutral-700); border-color: var(--color-neutral-400, #9ca3af); }
.btn-ghost:hover { background: var(--color-neutral-50); color: var(--color-neutral-900); border-color: var(--color-neutral-400, #9ca3af); }

.btn-danger { background: var(--color-error-600); color: var(--color-neutral-0); border-color: var(--color-error-600); }
.btn-danger:hover { background: var(--color-error-700); }
.btn-danger:focus-visible { box-shadow: var(--shadow-glow-error); }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    border: 1px solid #000000;
    border-radius: var(--radius-md);
    background: #000000;
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
    line-height: 1;
}
.auth-submit:hover {
    background: var(--dub-carbon);
    border-color: var(--dub-carbon);
    color: #ffffff;
}
.auth-submit:active {
    background: var(--dub-ink);
    border-color: var(--dub-ink);
}
a.auth-submit:hover {
    color: #ffffff;
}

/* ============================================================
   POST CARD - Base structure (refined styles in layout-desktop.css)
   ============================================================ */
.post-card a { text-decoration: none; }
.post-card a:hover { text-decoration: underline; }

.mag-author-avatar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-neutral-100);
    color: var(--color-neutral-600);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    text-decoration: none !important;
}

.post-card-body.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-body p:empty { display: none; }

.post-card-expand {
    color: var(--dub-accent-blue);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-top: var(--space-1);
}

.post-card-expand:hover { text-decoration: underline; }

.post-card-media.multi-image { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.post-card-media.multi-image img { max-height: 250px; }

.post-card-embed {
    margin-bottom: var(--space-3);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-card-embed iframe { width: 100%; aspect-ratio: 16/9; border: none; }

/* ============================================================
   DEMO FEED ENHANCEMENTS
   ============================================================ */
.demo-feed { display: flex; flex-direction: column; gap: var(--space-4); }

.composer-card {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.composer-login-msg {
    text-align: center;
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
}
.composer-login-msg a {
    font-weight: var(--font-semibold);
}

/* Anonymous toggle */
.composer-anon-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-neutral-500);
    cursor: pointer;
    margin-right: auto;
    user-select: none;
}
.composer-anon-label:hover {
    color: var(--color-neutral-700);
}
.composer-anon-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.composer-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.composer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-100);
    color: var(--color-neutral-600);
}

.composer-input {
    flex: 1;
    border: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-50);
    color: var(--color-neutral-500);
    border-radius: var(--radius-full);
    min-height: 44px;
    text-align: left;
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.composer-input:hover {
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-0);
    color: var(--color-neutral-700);
}

.composer-actions {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.composer-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    border: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    padding: 6px 10px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.composer-chip:hover {
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.composer-submit {
    margin-left: auto;
}

.demo-topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding-bottom: var(--space-1);
}

.demo-topic-tag {
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.demo-topic-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    filter: saturate(1.08);
}

.demo-topic-tag.is-active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.demo-inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
    margin-top: var(--space-2);
}

.demo-inline-tag {
    border: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    padding: 2px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.demo-inline-tag:hover {
    color: var(--color-neutral-800);
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-100);
}

.demo-inline-tag.is-active {
    color: var(--color-neutral-900);
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-100);
}

.demo-media-image {
    cursor: zoom-in;
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.demo-media-image:hover {
    transform: scale(1.01);
    filter: contrast(1.03);
}

.demo-video-card {
    width: 100%;
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-4);
    padding: 0;
    background: #000;
    cursor: pointer;
    position: relative;
}

.demo-video-card img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    opacity: 0.94;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.demo-video-card:hover img {
    transform: scale(1.02);
    opacity: 1;
}

.demo-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,.08));
}

.demo-video-play svg {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

.demo-feed-item.is-hidden {
    display: none;
}

.demo-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-6);
}

.demo-load-status {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    letter-spacing: .01em;
}

.demo-load-sentinel {
    width: 100%;
    height: 2px;
}

.demo-load-skeleton {
    width: min(100%, 620px);
}

/* ============================================================
   BADGES
   ============================================================ */
/* Badge mặc định cho taxonomy không có class riêng */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 9px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: 1.4;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-neutral-200);
    white-space: nowrap;
}

/* Override: badge có class màu riêng dùng border-color tương ứng */
.badge-thiet-ke,
.badge-marketing,
.badge-uiux,
.badge-editor,
.badge-timviec { border-color: transparent; }

.badge-sm { padding: 1px 8px; font-size: 0.6875rem; }
.badge-md { padding: 3px 12px; font-size: var(--text-xs); }

.badge-thiet-ke  { background: var(--color-brand-thiet-ke-bg);  color: var(--color-brand-thiet-ke); border-color: rgba(234, 88, 12, 0.18); }
.badge-marketing { background: var(--color-brand-marketing-bg); color: var(--color-brand-marketing); border-color: rgba(22, 163, 74, 0.18); }
.badge-uiux      { background: var(--color-brand-uiux-bg);      color: var(--color-brand-uiux); border-color: rgba(124, 58, 237, 0.18); }
.badge-editor    { background: var(--color-brand-editor-bg);    color: var(--color-brand-editor); border-color: rgba(59, 130, 246, 0.18); }
.badge-timviec   { background: var(--color-brand-timviec-bg);   color: var(--color-brand-timviec); border-color: rgba(202, 138, 4, 0.18); }

.badge-success { background: var(--color-success-50); color: var(--color-success-700); }
.badge-warning { background: var(--color-warning-50); color: var(--color-warning-700); }
.badge-error   { background: var(--color-error-50);   color: var(--color-error-700); }
.badge-info    { background: var(--color-info-50);    color: var(--color-info-500); }
.badge-neutral { background: var(--color-neutral-100); color: var(--color-neutral-600); }
.badge-flair { background: transparent; color: var(--color-neutral-500); border: 1px solid var(--color-neutral-100); }

.badge-count {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: var(--font-bold);
    justify-content: center;
    background: var(--dub-accent-orange-soft);
    color: var(--dub-accent-orange);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: var(--space-4); }

.form-label {
    display: block;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--color-neutral-700);
    margin-bottom: var(--space-1-5);
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 var(--space-3-5);
    font-size: var(--text-base);
    color: var(--color-neutral-800);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder { color: var(--color-neutral-500); }
.form-input:hover { border-color: var(--color-neutral-200); }
.form-input:focus { border-color: var(--dub-accent-blue); box-shadow: var(--shadow-glow); }
.form-input:disabled { background: var(--color-neutral-100); color: var(--color-neutral-400); cursor: not-allowed; }
.form-input.has-error { border-color: var(--color-error-500); }
.form-input.has-error:focus { box-shadow: var(--shadow-glow-error); }

.form-error-text { font-size: var(--text-xs); color: var(--color-error-600); margin-top: var(--space-1); }

.form-textarea { min-height: 100px; padding: var(--space-3) var(--space-3-5); resize: vertical; line-height: var(--leading-normal); height: auto; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.search-input {
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 18px;
    border-radius: var(--radius-full);
    background-color: var(--color-neutral-50);
    border-color: transparent;
}

.search-input:focus { background-color: var(--color-neutral-0); border-color: var(--dub-accent-blue); }

/* ============================================================
   COMPOSER MODAL (POST CREATION)
   ============================================================ */
.composer-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
}

.composer-modal.is-open {
    display: block;
}

.composer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.composer-dialog {
    position: relative;
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    margin: 12px auto;
    background: #fff;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.composer-header,
.composer-footer {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
    display: flex;
    align-items: center;
    gap: 8px;
}

.composer-footer {
    border-bottom: 0;
    border-top: 1px solid var(--color-neutral-100, #f3f4f6);
    justify-content: flex-end;
}

.composer-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-neutral-500);
}

.composer-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-neutral-900);
}

.composer-draft-status {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-success-600, #16a34a);
}

.composer-body {
    padding: 12px;
    overflow-y: auto;
}

.composer-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.composer-textarea {
    width: 100%;
    min-height: 112px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 9px;
    padding: 9px 11px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.composer-char-count {
    text-align: right;
    margin-top: 4px;
    font-size: 12px;
    color: var(--color-neutral-500);
}

.composer-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.composer-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.composer-meta-bar .composer-char-count {
    margin-top: 0;
    flex: 0 0 auto;
}

.composer-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin-top: 8px;
}

.composer-field {
    margin-top: 0;
}

.composer-field-full {
    grid-column: 1 / -1;
}

.composer-meta-note {
    font-size: 12px;
    color: var(--color-neutral-500);
    margin-top: -2px;
}

.composer-meta-pickers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.composer-meta-picker-btn {
    height: 38px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 10px;
    background: #fff;
    color: var(--color-neutral-700, #374151);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.composer-meta-picker-btn:hover {
    border-color: var(--color-neutral-300, #d1d5db);
    background: var(--color-neutral-50, #f9fafb);
}

.composer-meta-preview-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.composer-meta-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    background: var(--color-neutral-50, #f9fafb);
    color: var(--color-neutral-700, #374151);
    font-size: 12px;
    padding: 4px 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composer-meta-preview[hidden] {
    display: none !important;
}

.composer-meta-preview-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composer-meta-preview-btn {
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--color-neutral-600, #4b5563);
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.composer-meta-preview-btn:hover {
    color: var(--dub-accent-blue, #2563eb);
}

.composer-picker-sheet {
    position: absolute;
    inset: 0;
    z-index: 12;
    background: #fff;
    border-radius: inherit;
    display: flex;
    flex-direction: column;
}

.composer-picker-sheet[hidden] {
    display: none !important;
}

.composer-picker-sheet-header {
    height: 56px;
    border-bottom: 1px solid var(--color-neutral-200, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 16px;
}

.composer-picker-back {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--color-neutral-900, #111827);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.composer-picker-sheet-body {
    flex: 1;
    min-height: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.composer-taxonomy-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px 2px;
    border-top: 1px solid var(--color-neutral-100, #f3f4f6);
    margin-top: 4px;
}

.composer-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.composer-meta-row:hover {
    opacity: 0.65;
}

.composer-meta-row-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-neutral-700, #374151);
    line-height: 1.3;
}

.composer-meta-row-caret {
    font-size: 18px;
    color: var(--color-neutral-400, #9ca3af);
    line-height: 1;
}

.composer-tags-row {
    padding: 4px 2px 0;
}

.composer-tags-input {
    width: 100%;
    height: 36px;
    padding: 0 2px;
    font-size: 13px;
    border: 0;
    border-radius: 0;
    background: transparent;
    outline: none;
    color: var(--color-neutral-700);
}

.composer-tags-input::placeholder {
    color: var(--color-neutral-400);
    font-style: italic;
}

.composer-picker-search-wrap {
    position: relative;
}

.composer-picker-search {
    background: var(--color-neutral-100, #f3f4f6);
    border-color: transparent;
}

.composer-picker-search-wrap-place .composer-picker-search {
    padding-right: 44px;
}

.composer-place-current-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--color-neutral-700, #374151);
    cursor: pointer;
    font-size: 16px;
}

.composer-picker-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.composer-picker-empty {
    color: var(--color-neutral-500, #6b7280);
    font-size: 13px;
    padding: 10px 4px;
}

.composer-music-item,
.composer-place-item {
    width: 100%;
}

.composer-music-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
}

.composer-music-cover {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    object-fit: cover;
    display: block;
}

.composer-music-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.composer-music-main strong {
    font-size: 14px;
    color: var(--color-neutral-900, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composer-music-main span {
    font-size: 12px;
    color: var(--color-neutral-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.composer-music-actions {
    display: flex;
    align-items: center;
    min-height: 22px;
}

.composer-music-no-preview {
    font-size: 11px;
    color: var(--color-neutral-500, #6b7280);
}

.composer-music-preview-btn {
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 999px;
    background: #fff;
    color: var(--color-neutral-600, #4b5563);
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.composer-music-preview-btn:hover,
.composer-music-preview-btn.is-playing {
    border-color: var(--dub-accent-blue, #2563eb);
    color: var(--dub-accent-blue, #2563eb);
}

.composer-music-select-btn {
    min-width: 46px;
    height: 26px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 999px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-neutral-700, #374151);
    cursor: pointer;
}

.composer-music-select-btn:hover {
    border-color: var(--dub-accent-blue, #2563eb);
    color: var(--dub-accent-blue, #2563eb);
}

.composer-place-item {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 8px 4px;
    font-size: 14px;
    color: var(--color-neutral-900, #111827);
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
}

.composer-label {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-neutral-700);
}

.composer-input {
    width: 100%;
    height: 40px;
    padding: 0 11px;
    font-size: 13px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 9px;
    background: #fff;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.composer-input:focus {
    border-color: var(--dub-accent-blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.composer-taxonomy-shell {
    min-height: 40px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 9px;
    background: #fff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 8px;
}

.composer-taxonomy-toggle {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.composer-taxonomy-toggle:hover {
    border-color: var(--color-neutral-300, #d1d5db);
}

.composer-taxonomy-toggle[aria-expanded="true"] {
    border-color: var(--dub-accent-blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.composer-taxonomy-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.composer-taxonomy-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-neutral-900, #111827);
    line-height: 1.3;
}

.composer-taxonomy-summary {
    font-size: 12px;
    color: var(--color-neutral-600, #4b5563);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.composer-taxonomy-toggle.has-selection .composer-taxonomy-summary {
    color: var(--color-neutral-800, #1f2937);
}

.composer-taxonomy-caret {
    flex: 0 0 auto;
    color: var(--color-neutral-500, #6b7280);
    font-size: 22px;
    line-height: 1;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.composer-taxonomy-toggle[aria-expanded="true"] .composer-taxonomy-caret {
    transform: rotate(90deg);
    color: var(--color-neutral-700, #374151);
}

.composer-taxonomy-panel {
    position: relative;
    margin-top: 6px;
    z-index: 8;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 180ms ease;
}

.composer-taxonomy-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    max-height: 340px;
}

.composer-taxonomy-sheet {
    width: 100%;
    max-height: 340px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    padding: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(8px);
    transition: transform 220ms ease;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.composer-taxonomy-panel.is-open .composer-taxonomy-sheet {
    transform: translateY(0);
}

.composer-taxonomy-sheet-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 14px;
    color: var(--color-neutral-900, #111827);
}

.composer-taxonomy-sheet .composer-taxonomy-shell {
    margin-top: 0;
}

.composer-picker-sheet .composer-suggest-panel {
    position: static;
    margin-top: 0;
    max-height: min(44vh, 320px);
    box-shadow: none;
}

.composer-taxonomy-panel[hidden] {
    display: none !important;
}

.composer-taxonomy-shell:focus-within {
    border-color: var(--dub-accent-blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.composer-taxonomy-shell .composer-taxonomy-input {
    border: 0;
    box-shadow: none;
    height: 30px;
    min-width: 120px;
    flex: 1;
    padding: 0 2px;
}

.composer-taxonomy-shell .composer-taxonomy-input:focus {
    border: 0;
    box-shadow: none;
}

.composer-taxonomy-chip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.composer-taxonomy-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-neutral-100, #f3f4f6);
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    color: var(--color-neutral-700, #374151);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    max-width: 220px;
}

.composer-taxonomy-chip-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.composer-taxonomy-chip-item button {
    border: 0;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    color: var(--color-neutral-500, #6b7280);
    cursor: pointer;
    padding: 0;
}

.composer-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.composer-media-zone {
    margin-top: 8px;
}

.composer-media-btn {
    border: 1px solid var(--color-neutral-300, #d1d5db);
    background: #fff;
    border-radius: 9px;
    padding: 5px 9px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.composer-media-btn.composer-media-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
}

.composer-media-btn.composer-media-btn-icon span {
    display: none;
}

.composer-media-btn:hover {
    border-color: var(--color-neutral-400, #9ca3af);
    background: var(--color-neutral-50, #f9fafb);
}

.composer-media-btn.is-disabled,
.composer-media-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--color-neutral-100, #f3f4f6);
}

.composer-suggest-panel {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 9px;
    margin-top: 2px;
    max-height: 170px;
    overflow: auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.composer-suggest-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composer-suggest-item:hover {
    background: var(--color-neutral-50, #f9fafb);
}

/* Grouped grid for flair suggestions */
.composer-suggest-group {
    margin-bottom: 6px;
}

.composer-suggest-group:last-child {
    margin-bottom: 0;
}

.composer-suggest-group-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-neutral-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 10px 4px;
}

.composer-suggest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 0 6px 4px;
}

/* Trong picker sheet, panel rộng hơn */
.composer-picker-sheet .composer-suggest-panel {
    max-height: min(50vh, 420px);
}

.composer-picker-sheet .composer-suggest-grid {
    grid-template-columns: repeat(2, 1fr);
}

.composer-suggest-head {
    display: flex;
    justify-content: flex-end;
    padding: 6px 8px 0;
}

.composer-suggest-close {
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    background: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
}

.composer-suggest-empty {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--color-neutral-500, #6b7280);
}

/* ============================================================
   PROFILE PORTFOLIO
   ============================================================ */
.profile-portfolio {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-neutral-100);
}

.profile-skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.profile-skill-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-neutral-700);
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    line-height: 1.3;
}

.profile-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.profile-portfolio-grid--page {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.profile-portfolio-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-0);
    text-decoration: none;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.profile-portfolio-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.profile-portfolio-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.profile-portfolio-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-neutral-50);
    color: var(--color-neutral-400);
    font-size: 12px;
    text-align: center;
    padding: 8px;
}

.profile-portfolio-card-title {
    display: block;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-neutral-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-section-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--color-neutral-800);
}

/* ============================================================
   MAG — BÀI VIẾT
   ============================================================ */
.mag-page .site-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: block;
}

.mag-page,
.mag-single-page {
    min-height: 100vh;
}

.mag-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-5);
    min-height: 70vh;
}

/* Breadcrumb */
.mag-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    font-size: 13px;
    color: var(--color-neutral-400);
    margin-bottom: var(--space-4);
}
.mag-breadcrumb a { color: var(--color-neutral-500); text-decoration: none; }
.mag-breadcrumb a:hover { color: var(--dub-accent-blue); }
.mag-breadcrumb-sep { color: var(--color-neutral-300); }
.mag-breadcrumb-current { color: var(--color-neutral-700); font-weight: 500; }

/* Filter bar */
.mag-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-neutral-100);
}
.mag-filter-cats {
    display: flex;
    gap: var(--space-1-5);
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.mag-filter-cats::-webkit-scrollbar { display: none; }
.mag-filter-cat {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-neutral-600);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.mag-filter-cat:hover { border-color: var(--dub-accent-blue); color: var(--dub-accent-blue); }
.mag-filter-cat.active { background: var(--color-neutral-900); color: #fff; border-color: var(--color-neutral-900); }
.mag-filter-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 50%;
    color: var(--color-neutral-500);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.mag-filter-search:hover { border-color: var(--dub-accent-blue); color: var(--dub-accent-blue); }

/* Featured: 1 lớn trái + 3 nhỏ phải */
.mag-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.mag-featured--no-side {
    grid-template-columns: 1fr;
}
.mag-featured-main {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-neutral-100);
    text-decoration: none;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.mag-featured-main:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.mag-featured-main-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.mag-featured-main-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mag-featured-main-body {
    display: block;
    flex: 1;
    padding: var(--space-4);
}
.mag-featured-main-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-neutral-900);
    margin: var(--space-1-5) 0 var(--space-2);
}
.mag-featured-main:hover .mag-featured-main-title { color: var(--dub-accent-blue); }
.mag-featured-main-excerpt {
    display: block;
    font-size: 14px;
    color: var(--color-neutral-500);
    line-height: 1.5;
    margin-bottom: var(--space-2);
}
.mag-featured-main-date { font-size: 12px; color: var(--color-neutral-400); }

.mag-featured-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.mag-featured-side-item {
    display: flex;
    gap: var(--space-3);
    flex: 1;
    min-height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-neutral-100);
    text-decoration: none;
    transition: box-shadow var(--transition-fast);
}
.mag-featured-side-item:hover { box-shadow: var(--shadow-card-hover); }
.mag-featured-side-item--empty,
.mag-featured-side-item--empty:hover { box-shadow: none; opacity: 0.5; cursor: default; }
.mag-featured-side-img {
    flex-shrink: 0;
    height: 100%;
    aspect-ratio: 16 / 10;
    max-width: 45%;
    overflow: hidden;
}
.mag-featured-side-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mag-featured-side-body {
    flex: 1;
    padding: var(--space-3) var(--space-3) var(--space-3) 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mag-featured-side-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-neutral-800);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mag-featured-side-item:hover .mag-featured-side-title { color: var(--dub-accent-blue); }
.mag-featured-side-excerpt {
    display: block;
    font-size: 12px;
    color: var(--color-neutral-500);
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mag-featured-side-date { font-size: 11px; color: var(--color-neutral-400); }

/* List 3 cột */
.mag-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.mag-card {
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-neutral-0);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.mag-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.mag-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.mag-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder khi ko có ảnh */
.mag-placeholder {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.mag-placeholder-label {
    font-size: 28px;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
    letter-spacing: 4px;
    user-select: none;
}
.mag-placeholder-label-sm {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    user-select: none;
}

.mag-card-body {
    padding: var(--space-3) var(--space-4);
}

.mag-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1-5);
}

/* Search popup */
.mag-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}
.mag-search-overlay[hidden] { display: none !important; }
.mag-search-dialog {
    width: min(600px, 90vw);
    background: var(--color-neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    overflow: hidden;
}
.mag-search-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-neutral-100);
}
.mag-search-input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: var(--color-neutral-800);
}
.mag-search-input::placeholder { color: var(--color-neutral-400); }
.mag-search-close {
    border: 0;
    background: transparent;
    font-size: 24px;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mag-search-close:hover { color: var(--color-neutral-700); }
.mag-search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: var(--space-2) 0;
}
.mag-search-hint,
.mag-search-status {
    padding: var(--space-6);
    text-align: center;
    font-size: 13px;
    color: var(--color-neutral-400);
    margin: 0;
}
.mag-search-item {
    display: block;
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    border-bottom: 1px solid var(--color-neutral-50);
    transition: background var(--transition-fast);
}
.mag-search-item:hover { background: var(--color-neutral-50); }
.mag-search-item:last-child { border-bottom: none; }
.mag-search-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-neutral-800);
    margin-bottom: 2px;
}
.mag-search-item:hover .mag-search-item-title { color: var(--dub-accent-blue); }
.mag-search-item-date {
    font-size: 12px;
    color: var(--color-neutral-400);
}

/* Search heading */
.mag-search-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
}
.mag-search-heading h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--color-neutral-800);
}
.mag-search-clear {
    font-size: 13px;
    color: var(--color-neutral-500);
    text-decoration: none;
}
.mag-search-clear:hover { color: var(--dub-accent-blue); }

.mag-card-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--dub-accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mag-card-date {
    font-size: 11px;
    color: var(--color-neutral-400);
}

.mag-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
}

.mag-card-title a {
    color: var(--color-neutral-900);
    text-decoration: none;
}

.mag-card-title a:hover {
    color: var(--dub-accent-blue);
}

.mag-card-excerpt {
    font-size: 13px;
    color: var(--color-neutral-500);
    line-height: 1.5;
    margin: 0;
}

/* Hide cmd-bar on mag pages */
.is-mag .cmd-bar,
.is-mag .cmd-bar:not([hidden]),
.is-mag #cmd-bar,
.is-mag #cmd-bar:not([hidden]) { display: none !important; }

/* Single article */
.mag-single {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-4) 0;
}

.mag-single-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-neutral-500);
    text-decoration: none;
    margin-bottom: var(--space-4);
}

.mag-single-back:hover {
    color: var(--dub-accent-blue);
}

.mag-single-header {
    margin-bottom: var(--space-5);
}

.mag-single-cats {
    display: flex;
    gap: var(--space-1-5);
    margin-bottom: var(--space-2);
}

.mag-single-cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--dub-accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mag-single-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 var(--space-3);
    color: var(--color-neutral-900);
}

.mag-single-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 13px;
    color: var(--color-neutral-500);
}

.mag-single-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--color-neutral-700);
}

.mag-single-author img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

.mag-single-cover {
    margin-bottom: var(--space-5);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.mag-single-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.mag-single-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-neutral-800);
}

.mag-single-content p {
    margin-bottom: var(--space-4);
}

.mag-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-4) 0;
}

.mag-single-content h2,
.mag-single-content h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-neutral-900);
}

/* Skill tags trong profile edit */
.profile-skill-tag {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-skill-tag:hover {
    border-color: var(--dub-accent-blue);
    color: var(--dub-accent-blue);
}

.profile-skill-tag.is-selected {
    background: var(--dub-accent-blue);
    color: #fff;
    border-color: var(--dub-accent-blue);
}

/* Pin button in post card */

#composer-image-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
    overflow: visible;
}

.composer-image-item {
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
    position: relative;
    height: clamp(96px, 18vw, 132px);
    min-height: 96px;
}

.composer-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f8fafc;
}

.composer-image-top-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.composer-image-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(15, 23, 42, 0.6);
    border-radius: 999px;
    color: #fff;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.composer-image-action-btn.drag {
    cursor: grab;
}

.composer-image-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.composer-image-item.is-dragging {
    opacity: 0.45;
}

.composer-image-item.is-drop-target {
    outline: 2px dashed var(--dub-accent-blue, #2563eb);
    outline-offset: -4px;
}

.composer-image-upload-progress {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: rgba(15, 23, 42, 0.68);
    border-radius: 10px;
    padding: 6px 8px;
}

.composer-image-upload-progress[hidden] {
    display: none;
}

.composer-image-upload-text {
    display: block;
    font-size: 11px;
    color: #fff;
    margin-bottom: 4px;
}

.composer-image-upload-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.composer-image-upload-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #fff;
    transition: width 120ms linear;
}

.composer-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10120;
    background: rgba(2, 6, 23, 0.76);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.composer-image-lightbox[hidden] {
    display: none;
}

.composer-image-lightbox-inner {
    position: relative;
    width: min(92vw, 900px);
    max-height: 88vh;
}

.composer-image-lightbox img {
    width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
}

.composer-image-lightbox-close,
.composer-image-lightbox-nav {
    border: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.composer-image-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
}

.composer-image-lightbox-nav.prev {
    position: absolute;
    left: -44px;
    top: 50%;
    transform: translateY(-50%);
}

.composer-image-lightbox-nav.next {
    position: absolute;
    right: -44px;
    top: 50%;
    transform: translateY(-50%);
}

.composer-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.composer-link-chip {
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 999px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    background: #fff;
}

.composer-link-chip em {
    font-style: normal;
    font-size: 11px;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--color-neutral-100, #f3f4f6);
    color: var(--color-neutral-600, #4b5563);
    flex: 0 0 auto;
}

.composer-link-chip.is-link em {
    background: var(--color-neutral-100, #f3f4f6);
    color: var(--color-neutral-600, #4b5563);
}

.composer-link-chip span {
    font-size: 12px;
    color: var(--color-neutral-700);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.composer-link-chip button {
    border: 0;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-neutral-500);
}

/* OGP Link Preview */
.composer-ogp-preview {
    display: flex;
    gap: 10px;
    margin: 6px 0;
    padding: 10px;
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: 8px;
    align-items: flex-start;
}
.composer-ogp-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--color-neutral-100);
}
.composer-ogp-body {
    flex: 1;
    min-width: 0;
}
.composer-ogp-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-neutral-900);
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.composer-ogp-desc {
    font-size: 12px;
    color: var(--color-neutral-600);
    margin: 2px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.composer-ogp-url {
    font-size: 11px;
    color: var(--color-neutral-400);
    display: block;
    margin-top: 2px;
    word-break: break-all;
}
.composer-ogp-loading {
    font-size: 12px;
    color: var(--color-neutral-400);
    padding: 8px 12px;
    text-align: center;
}
.composer-ogp-error {
    font-size: 12px;
    color: var(--color-error-500);
    padding: 8px 12px;
}

/* Content OGP Cards */
.content-ogp-list {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.content-ogp-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: 10px;
    align-items: flex-start;
    overflow: hidden;
}
.content-ogp-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--color-neutral-100);
}
.content-ogp-body {
    flex: 1;
    min-width: 0;
}
.content-ogp-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-neutral-900);
    line-height: 1.35;
    margin-bottom: 4px;
}
.content-ogp-desc {
    font-size: 13px;
    color: var(--color-neutral-600);
    margin: 0 0 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.content-ogp-link {
    font-size: 12px;
    color: var(--dub-accent-blue);
    text-decoration: none;
    word-break: break-all;
}
.content-ogp-link:hover {
    text-decoration: underline;
}
.content-ogp-card-plain {
    padding: 10px 12px;
}

.composer-error {
    margin-top: 8px;
    color: var(--color-error-600, #dc2626);
    font-size: 13px;
}

.composer-url-popup {
    margin-top: 8px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 12px;
    padding: 10px;
    background: var(--color-neutral-50, #f9fafb);
    box-shadow: none;
}

.composer-url-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--color-neutral-800);
}

.composer-url-close {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: var(--color-neutral-500);
    cursor: pointer;
}

.composer-url-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--color-neutral-500);
}

.composer-url-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-40);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--duration-150) var(--ease-out);
}

.modal {
    position: relative;
    z-index: var(--z-50);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-height: 85vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp var(--duration-200) var(--ease-out);
}

.modal-sm { max-width: 400px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 680px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-100);
    flex-shrink: 0;
}

.modal-title { font-size: var(--text-lg); font-weight: var(--font-bold); color: var(--color-neutral-800); }

.modal-close {
    background: none;
    border: none;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--color-neutral-50); color: var(--color-neutral-700); }

.modal-body { padding: var(--space-5); overflow-y: auto; flex: 1; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-neutral-100);
    flex-shrink: 0;
}

/* ============================================================
   TABLES (Admin)
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.data-table th,
.data-table td { padding: var(--space-3) var(--space-3-5); text-align: left; border-bottom: 1px solid var(--color-neutral-100); }

.data-table th {
    background: var(--color-neutral-50);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-500);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tr:hover td { background: var(--color-neutral-25); }

.data-table .actions { display: flex; gap: var(--space-1); }

.data-table .action-btn {
    padding: var(--space-1) var(--space-2);
    border: none;
    background: none;
    color: var(--color-neutral-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    transition: all var(--transition-fast);
}

.data-table .action-btn:hover { background: var(--color-neutral-50); color: var(--color-neutral-700); }
.data-table .action-btn.danger:hover { background: var(--color-error-50); color: var(--color-error-600); }

/* ============================================================
   PAGINATION
   ============================================================ */
.navigation.pagination { margin-top: var(--space-6); }

.nav-links { display: flex; justify-content: center; gap: var(--space-1); }

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-500);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.nav-links .page-numbers:hover { background: var(--color-neutral-50); color: var(--color-neutral-700); }
.nav-links .page-numbers.current { background: #000000; color: #ffffff; border-color: #000000; font-weight: var(--font-semibold); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area { margin-top: var(--space-6); }

.comments-area .comment-body {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3-5) 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.comment-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}


.comment-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.comment-author { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: 0; }

.comments-area .comment-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}

.comments-area .comment-author-line {
    min-width: 0;
    flex-wrap: wrap;
}

.comment-author .fn { font-weight: var(--font-semibold); font-size: var(--text-sm); color: var(--color-neutral-800); font-style: normal; }

.comment-time { font-size: var(--text-xs); color: var(--color-neutral-500); }
.comment-text { font-size: var(--text-sm); color: var(--color-neutral-700); line-height: 1.5; }
.comments-area .comment-actions { margin-top: var(--space-1-5); font-size: var(--text-xs); }
.comments-area .comment-actions a { color: var(--color-neutral-500); margin-right: var(--space-3); }
.comments-area .comment-actions a:hover { color: var(--dub-accent-blue); }

.comment-form { margin-top: var(--space-5); }

.comment-form textarea {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 80px;
    font-size: var(--text-base);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form textarea:focus { border-color: var(--dub-accent-blue); box-shadow: var(--shadow-glow); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    right: var(--space-4);
    z-index: var(--z-max);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
    animation: toastSlideIn var(--duration-300) var(--ease-out);
    max-width: 380px;
}

.toast-success { background: var(--color-success-50); color: var(--color-success-700); border: 1px solid var(--color-success-100); }
.toast-error   { background: var(--color-error-50);   color: var(--color-error-700);   border: 1px solid var(--color-error-100); }
.toast-warning { background: var(--color-warning-50); color: var(--color-warning-700); border: 1px solid var(--color-warning-100); }
.toast-info    { background: var(--color-info-50);    color: var(--color-info-700);    border: 1px solid var(--color-info-100); }

.toast-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.6; color: inherit; padding: 2px; }
.toast-close:hover { opacity: 1; }

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--color-neutral-100) 25%, var(--color-neutral-200) 37%, var(--color-neutral-100) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

.skeleton-circle { border-radius: var(--radius-full); }
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 6px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-image { height: 200px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 44px; height: 44px; border-radius: var(--radius-full); flex-shrink: 0; }
.skeleton-card { padding: var(--space-4); background: var(--color-neutral-0); border-radius: var(--radius-lg); border: 1px solid var(--color-neutral-100); }
.skeleton-row { display: flex; gap: var(--space-3); align-items: center; }
.skeleton-cell { height: 20px; border-radius: 4px; }
.skeleton-btn { width: 52px; height: 24px; border-radius: 4px; display: inline-block; }
.skeleton-tab { height: 28px; border-radius: 4px; display: inline-block; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
    text-align: center;
    color: var(--color-neutral-500);
}

.empty-state-icon { margin-bottom: var(--space-3); opacity: 0.5; color: var(--color-neutral-300); }
.empty-state-title { font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--color-neutral-600); margin-bottom: var(--space-1); }
.empty-state-text { font-size: var(--text-xs); color: var(--color-neutral-400); margin-bottom: var(--space-4); max-width: 280px; }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar { border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0; background: var(--color-neutral-200); }
.avatar-xs { width: var(--avatar-xs); height: var(--avatar-xs); }
.avatar-sm { width: var(--avatar-sm); height: var(--avatar-sm); }
.avatar-md { width: var(--avatar-md); height: var(--avatar-md); }
.avatar-lg { width: var(--avatar-lg); height: var(--avatar-lg); }

.avatar-wrapper { position: relative; display: inline-flex; }

.avatar-online {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: var(--color-success-500);
    border: 2px solid var(--color-neutral-0);
    border-radius: var(--radius-full);
}

.avatar-group { display: flex; align-items: center; }
.avatar-group .avatar { border: 2px solid var(--color-neutral-0); margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

.avatar-more {
    width: var(--avatar-sm);
    height: var(--avatar-sm);
    background: var(--color-neutral-200);
    color: var(--color-neutral-500);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-neutral-0);
    margin-left: -8px;
}
/* Social Actions Bar */
.social-actions-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-neutral-600);
    transition: all 0.2s;
}

.btn-social:hover {
    background: var(--color-neutral-50);
    color: var(--dub-accent-blue);
}

.btn-social.is-active {
    color: var(--dub-accent-orange);
    font-weight: 600;
}

.btn-social .icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.btn-social .count {
    font-size: 12px;
    color: var(--color-neutral-500);
}

.btn-social.is-active .count {
    color: var(--dub-accent-orange);
}

.post-card-more {
    position: relative;
}

.more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--color-neutral-200);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 100;
}

.more-menu .menu-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-neutral-700);
    transition: background 0.2s;
}

.more-menu .menu-item:hover {
    background: var(--color-neutral-50);
}

.report-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: reportFadeIn 0.12s ease-out;
}
.report-modal.active { display: flex; }
@keyframes reportFadeIn { from { opacity: 0; } to { opacity: 1; } }

.report-modal .modal-backdrop {
    position: absolute; inset: 0; cursor: pointer;
}

.report-modal .modal-content {
    position: relative; z-index: 1;
    background: var(--color-neutral-0); border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl); box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    width: min(440px, calc(100vw - 32px)); max-height: 80vh;
    display: flex; flex-direction: column; overflow: hidden;
    animation: reportSlideIn 0.12s ease-out;
}
@keyframes reportSlideIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.report-modal .modal-content h3 {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 20px; margin: 0;
    font-size: 16px; font-weight: 600; color: var(--color-neutral-800);
    border-bottom: 1px solid var(--color-neutral-100);
}

.report-modal .modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; border: none; border-radius: var(--radius-full);
    background: transparent; color: var(--color-neutral-400); cursor: pointer;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    line-height: 1; transition: all 0.1s;
}
.report-modal .modal-close:hover { background: var(--color-neutral-100); color: var(--color-neutral-600); }

.report-modal .report-form { padding: 16px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.report-modal .form-group { display: flex; flex-direction: column; gap: 5px; }
.report-modal .form-group label { font-size: 13px; font-weight: 500; color: var(--color-neutral-600); }
.report-modal .form-group select,
.report-modal .form-group textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md); font-size: 14px; font-family: inherit;
    background: var(--color-neutral-0); color: var(--color-neutral-800);
    transition: border-color 0.1s; box-sizing: border-box;
}
.report-modal .form-group select:focus,
.report-modal .form-group textarea:focus {
    outline: none; border-color: var(--dub-accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.report-modal .form-group textarea { resize: vertical; min-height: 80px; }
.report-modal .form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }


/* COMPOSER TRIGGER & MODAL */
.composer-trigger { padding: 0; margin: 0; }
/* Ẩn composer trigger trên trang xem chi tiết bài viết (single thread / single post) */
body.single-thread .composer-trigger,
body.single-post .composer-trigger {
    display: none;
}
.composer-trigger-inner { display: flex; align-items: center; gap: var(--space-3); background: var(--color-neutral-0); border: 1px solid var(--color-neutral-100); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); }
.composer-trigger-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.composer-trigger-input { flex: 1; border: 1px solid var(--color-neutral-100); background: var(--color-neutral-50); color: var(--color-neutral-500); border-radius: var(--radius-full); padding: 10px 16px; font-size: var(--text-sm); text-align: left; cursor: pointer; transition: all var(--transition-fast); }
.composer-trigger-input:hover { border-color: var(--color-neutral-200); background: var(--color-neutral-0); color: var(--color-neutral-700); }
.composer-trigger-media { background: none; border: none; color: var(--color-neutral-400); cursor: pointer; padding: 6px; border-radius: var(--radius-full); }
.composer-modal { position: fixed; inset: 0; z-index: var(--z-50); display: none; align-items: flex-end; justify-content: center; }
.composer-modal.is-open { display: flex; }
.composer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.25s ease; }
.composer-modal.is-open .composer-backdrop { opacity: 1; }
.composer-dialog { position: relative; z-index: 1; background: var(--color-neutral-0); border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-width: 640px; max-height: 95vh; display: flex; flex-direction: column; box-shadow: 0 -4px 24px rgba(0,0,0,0.12); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.composer-modal.is-open .composer-dialog { transform: translateY(0); }
.composer-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-neutral-100); }
.composer-close { background: none; border: none; font-size: 24px; color: var(--color-neutral-400); cursor: pointer; line-height: 1; }
.composer-body { padding: var(--space-4) var(--space-5); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--space-4); position: relative; }
.composer-textarea { width: 100%; border: none; resize: none; font-size: var(--text-base); line-height: 1.6; font-family: inherit; outline: none; min-height: 100px; }
.composer-link-toolbar { position: absolute; right: 16px; z-index: 10; }
.composer-link-toolbar-btn { width: 28px; height: 28px; border: 1px solid var(--color-neutral-200); border-radius: var(--radius-full); background: var(--color-neutral-0); color: var(--color-neutral-500); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.composer-link-toolbar-btn:hover { border-color: var(--dub-accent-blue); color: var(--dub-accent-blue); background: var(--color-neutral-50); }
.composer-char-count { text-align: right; font-size: var(--text-xs); color: var(--color-neutral-400); }
.composer-error { background: var(--color-error-50); color: var(--color-error-600); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); }
.composer-select, .composer-input { width: 100%; padding: 8px 12px; border: 1px solid var(--color-neutral-200); border-radius: var(--radius-md); font-size: var(--text-sm); background: var(--color-neutral-0); }
.composer-select:focus, .composer-input:focus { outline: none; border-color: var(--dub-accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.composer-media-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--color-neutral-200); border-radius: var(--radius-full); background: var(--color-neutral-0); cursor: pointer; font-size: var(--text-xs); color: var(--color-neutral-600); }
.composer-media-btn:hover { border-color: var(--dub-accent-blue); color: var(--dub-accent-blue); }
.composer-footer { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-neutral-100); }
/* COMMENT */
.comment-error { background: var(--color-error-50); color: var(--color-error-600); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); margin-bottom: var(--space-3); display: none; }
@keyframes commentSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ONBOARDING */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(2, 6, 23, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-dialog {
    width: min(920px, 92vw);
    max-width: 100%;
    max-height: 88vh;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 22px 70px rgba(2, 6, 23, 0.28);
}

.onboarding-head,
.onboarding-foot {
    padding: 16px clamp(14px, 3vw, 28px);
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.onboarding-foot {
    border-bottom: 0;
    border-top: 1px solid var(--color-neutral-100, #f3f4f6);
    justify-content: flex-end;
}

.onboarding-step-hint {
    font-size: 12px;
    color: var(--color-neutral-500, #6b7280);
}

.onboarding-body {
    padding: clamp(14px, 3vw, 26px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.onboarding-note {
    margin: 0;
    font-size: 13px;
    color: var(--color-neutral-600, #4b5563);
}

.onboarding-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.onboarding-pill {
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 999px;
    background: #fff;
    color: var(--color-neutral-700, #374151);
    font-size: 13px;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
}

.onboarding-pill.is-active {
    border-color: var(--dub-accent-blue, #2563eb);
    color: var(--dub-accent-blue, #2563eb);
    background: rgba(37, 99, 235, 0.08);
}

.onboarding-counter {
    margin: 0;
    font-size: 12px;
    color: var(--color-neutral-500, #6b7280);
}

.onboarding-counter.is-warning {
    color: #b45309;
}

.onboarding-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-neutral-700, #374151);
}

.onboarding-input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
}

.onboarding-location-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
}

.onboarding-location-item,
.onboarding-job-item {
    border: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
    text-align: left;
    padding: 8px 2px;
    font-size: 13px;
    color: var(--color-neutral-800, #1f2937);
    cursor: pointer;
}

.onboarding-location-item:hover,
.onboarding-job-item:hover {
    color: var(--dub-accent-blue, #2563eb);
}

.onboarding-empty {
    font-size: 13px;
    color: var(--color-neutral-500, #6b7280);
    padding: 8px 2px;
}

.onboarding-error {
    margin: 0 16px 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
}
/* NOTIFICATION BADGE */
.notif-badge { min-width: 20px; height: 20px; padding: 0 6px; background: var(--dub-accent-orange); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; margin-left: auto; flex-shrink: 0; }
.nav-item a.has-notif .nav-label { font-weight: 600; color: var(--dub-accent-orange); }
.btn-social .icon svg { pointer-events: none; }

/* ============================================================
   COMMENT MODAL — Threads / Facebook style
   ============================================================ */
.comment-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

.comment-modal-overlay.is-open {
    display: flex;
}

.comment-modal {
    background: var(--color-neutral-0);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.2s ease-out;
    overflow: hidden;
}

.comment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-neutral-100);
    flex-shrink: 0;
}

.comment-modal-title {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--color-neutral-800);
}

.comment-modal-close {
    background: none;
    border: none;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.comment-modal-close:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-700);
}

.comment-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    background: var(--color-neutral-0);
}

.comment-modal-body::-webkit-scrollbar { width: 4px; }
.comment-modal-body::-webkit-scrollbar-track { background: transparent; }
.comment-modal-body::-webkit-scrollbar-thumb { background: var(--color-neutral-200); border-radius: 4px; }

.comment-modal-item {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    transition: background 0.15s;
}

.comment-modal-item:hover {
    background: var(--color-neutral-25);
}

.comment-modal-item .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-neutral-100);
    object-fit: cover;
}

.comment-modal-item .comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.comment-author-line {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
}

.comment-modal-item .comment-body strong {
    font-size: 13px;
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
    display: inline;
}

.comment-modal-item .comment-body p {
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-neutral-700);
    display: inline;
}

.comment-modal-item .comment-body p:after { content: ''; display: block; }

.comment-modal-item .comment-date {
    font-size: 12px;
    color: var(--color-neutral-400);
    display: block;
    flex-shrink: 0;
    white-space: nowrap;
}

.comment-loading,
.comment-empty,
.comment-error {
    font-size: 13px;
    color: var(--color-neutral-400);
    text-align: center;
    padding: 32px 20px;
}

.comment-modal-footer {
    border-top: 1px solid var(--color-neutral-100);
    padding: 12px 20px 16px;
    background: var(--color-neutral-0);
    flex-shrink: 0;
}

.comment-input-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-input-row .comment-current-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    background: var(--color-neutral-100);
    object-fit: cover;
}

.comment-input-row textarea {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
    min-height: 36px;
    transition: background 0.15s;
}

.comment-input-row textarea::placeholder { color: var(--color-neutral-400); }

.comment-input-row textarea:focus {
    outline: none;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    padding: 7px 13px;
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-left: 38px;
}

.comment-input-actions .btn-primary {
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    background: #000000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

.comment-input-actions .btn-primary:hover { opacity: 0.85; }
.comment-input-actions .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
/* Comment panel in feed */
.comment-panel {
    border-top: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-0);
    animation: commentSlideIn 0.2s ease-out;
}

.comment-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--color-neutral-50);
}

.comment-panel-title {
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
}

.comment-panel-close {
    background: none;
    border: none;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.comment-panel-close:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-700);
}

.comment-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 0;
}

.comment-list::-webkit-scrollbar { width: 4px; }
.comment-list::-webkit-scrollbar-track { background: transparent; }
.comment-list::-webkit-scrollbar-thumb { background: var(--color-neutral-200); border-radius: 4px; }

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    transition: background 0.15s;
}

.comment-item:hover { background: var(--color-neutral-25); }

.comment-item .comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--color-neutral-100);
    object-fit: cover;
}

.comment-item .comment-body { flex: 1; min-width: 0; }

.comment-item .comment-body strong {
    font-size: 13px;
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
    display: inline;
}

.comment-item .comment-body p {
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-neutral-700);
    display: inline;
}

.comment-item .comment-body p:after { content: ''; display: block; }

.comment-item .comment-date {
    font-size: 12px;
    color: var(--color-neutral-400);
    display: block;
    margin-top: 2px;
}

.comment-loading,
.comment-empty,
.comment-error {
    font-size: 13px;
    color: var(--color-neutral-400);
    text-align: center;
    padding: 24px 16px;
}

.comment-panel-input {
    border-top: 1px solid var(--color-neutral-100);
    padding: 10px 16px 12px;
    background: var(--color-neutral-0);
}

.comment-input-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-current-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    background: var(--color-neutral-100);
    object-fit: cover;
}

.comment-input-row textarea {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
    min-height: 36px;
    transition: background 0.15s, border-color 0.15s;
}

.comment-input-row textarea::placeholder { color: var(--color-neutral-400); }

.comment-input-row textarea:focus {
    outline: none;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    padding: 7px 13px;
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-left: 38px;
}

.comment-input-actions .btn-primary {
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    background: #000000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.comment-input-actions .btn-primary:hover { opacity: 0.85; }
.comment-input-actions .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   COMMENT NESTED & ACTIONS — edit/delete/reply, 2 cấp
   ============================================================ */
.comment-modal-item.depth-1 {
    padding-left: 48px;
    position: relative;
}

.comment-modal-item.depth-1::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-neutral-100);
    border-radius: 2px;
}

.comment-modal-item.depth-1:first-child::before { top: 12px; }
.comment-modal-item.depth-1:last-child::before { bottom: auto; height: calc(100% - 12px); }

.comment-modal-item.depth-2 {
    padding-left: 64px;
    position: relative;
}

.comment-modal-item.depth-2::before {
    content: '';
    position: absolute;
    left: 44px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-neutral-100);
    border-radius: 2px;
}

.comment-modal-item.depth-2:first-child::before { top: 12px; }

.comment-text-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-neutral-700);
    margin: 2px 0;
}

.comment-text-content p { margin: 2px 0; }

.comment-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    justify-content: flex-start;
}

.comment-meta-row .comment-actions {
    display: inline-flex;
    gap: 6px;
    margin-left: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.comment-modal-item:hover .comment-meta-row .comment-actions { opacity: 1; }

.comment-action-btn {
    background: none;
    border: none;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--color-neutral-400);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    font-family: inherit;
}

.comment-action-btn:hover { background: var(--color-neutral-50); color: var(--color-neutral-700); }
.comment-action-btn.reply:hover { color: var(--dub-accent-blue); }
.comment-action-btn.edit:hover { color: var(--color-warning-600); }
.comment-action-btn.delete:hover { color: var(--color-error-600); background: var(--color-error-50); }

.comment-action-btn.save {
    font-size: 12px;
    padding: 4px 12px;
    background: #000000;
    color: #ffffff;
    border-radius: var(--radius-full);
    font-weight: var(--font-semibold);
}

.comment-action-btn.save:hover { opacity: 0.85; }

/* ── Comment reaction button (Facebook-style) ─────────────────────────── */
.cmt-reaction-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.cmt-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 2px 5px;
    font-size: 11px;
    color: var(--color-neutral-400);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
    line-height: 1;
}

.cmt-react-btn:hover { color: var(--dub-accent-blue); background: var(--color-neutral-50); }
.cmt-react-btn.is-active { color: var(--dub-accent-blue); }
.cmt-react-btn.is-active .cmt-react-label { font-weight: var(--font-semibold); }

.cmt-react-emoji { font-size: 13px; line-height: 1; }

.cmt-react-count {
    font-size: 11px;
    color: var(--color-neutral-500);
    font-weight: var(--font-medium);
    min-width: 0;
}

/* Reaction picker popup */
.cmt-reaction-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    display: flex;
    gap: 2px;
    padding: 6px 10px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.82) translateY(8px);
    transform-origin: bottom left;
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 200;
    white-space: nowrap;
}

.cmt-reaction-picker.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.cmt-reaction-picker button {
    background: none;
    border: none;
    padding: 4px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: transform 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmt-reaction-picker button:hover { transform: scale(1.45) translateY(-4px); }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.tk-notification-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-max);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 40px));
}

.tk-notification-card {
    position: relative;
    padding: 14px 44px 14px 16px;
    border-radius: var(--radius-xl);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    box-shadow: var(--shadow-2xl);
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    transition: transform var(--transition-base), opacity var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.tk-notification-card.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.tk-notification-card.is-success {
    border-color: rgba(22, 163, 74, 0.18);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.12);
}

.tk-notification-card.is-error {
    border-color: rgba(220, 38, 38, 0.18);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.12);
}

.tk-notification-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    background: var(--color-neutral-200);
}

.tk-notification-card.is-success::before { background: var(--color-success-500); }
.tk-notification-card.is-error::before { background: var(--color-error-600); }

.tk-notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.tk-notification-title {
    font-size: 13px;
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}

.tk-notification-message {
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-neutral-700);
}

.tk-notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-neutral-400);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.tk-notification-close:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.tk-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-max);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tk-confirm-overlay.is-visible { opacity: 1; }

.tk-confirm-card {
    width: min(92vw, 420px);
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,1));
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
    transform: translateY(8px) scale(0.98);
    transition: transform var(--transition-base);
}

.tk-confirm-overlay.is-visible .tk-confirm-card {
    transform: translateY(0) scale(1);
}

.tk-confirm-title {
    font-size: 16px;
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    margin-bottom: 8px;
}

.tk-confirm-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-neutral-700);
}

.tk-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.tk-confirm-btn {
    min-width: 80px;
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.tk-confirm-btn:active { opacity: .7; }

.tk-confirm-ok {
    background: var(--color-neutral-900);
    color: #fff;
}

.tk-confirm-ok:hover {
    opacity: .85;
}

.tk-confirm-cancel {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.tk-confirm-cancel:hover {
    background: var(--color-neutral-200);
}

.comment-action-btn.cancel-edit {
    font-size: 12px;
    padding: 4px 12px;
    color: var(--color-neutral-500);
}

.comment-reply-to {
    font-size: 12px;
    color: var(--color-neutral-400);
    font-weight: normal;
}

.comment-reply-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 6px;
    background: var(--color-neutral-50);
    border-radius: 8px;
    font-size: 12px;
    color: var(--color-neutral-600);
}

.comment-reply-badge strong { font-weight: var(--font-semibold); color: var(--color-neutral-800); }

.reply-cancel {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-error-500);
    cursor: pointer;
    font-size: 11px;
    font-weight: var(--font-semibold);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: inherit;
}

.reply-cancel:hover { background: var(--color-error-50); }

.comment-edit-area { margin: 4px 0; }

.comment-edit-textarea {
    width: 100%;
    border: 1px solid var(--color-neutral-200);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    color: var(--color-neutral-800);
    background: var(--color-neutral-0);
    min-height: 60px;
}

.comment-edit-textarea:focus { outline: none; border-color: var(--dub-accent-blue); }

.comment-edit-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.post-card .comment-panel {
    border-bottom: 1px solid var(--color-neutral-100);
}
/* Fix SVG clicks on social buttons — SVG có class=icon trực tiếp */
.btn-social svg { pointer-events: none; }

/* ============================================================
   SINGLE POST - Post header, actions, tags, footer
   ============================================================ */
.single-post-full .post-header {
    margin-bottom: var(--space-4);
}

.single-post-full .post-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.single-post-full .author-meta {
    display: flex;
    flex-direction: column;
}

.single-post-full .author-meta .author-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    color: var(--color-neutral-900);
}

.single-post-full .author-meta .author-name a {
    color: inherit;
    text-decoration: none;
}

.single-post-full .author-meta .author-name a:hover {
    color: var(--dub-accent-blue);
}

.single-post-full .author-bio-small {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    margin-top: 2px;
}

.single-post-full .post-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
    margin-bottom: var(--space-4);
}

.single-post-full .badge-linh-vuc {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 9px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: 1.4;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    white-space: nowrap;
    background: var(--color-neutral-100);
    color: var(--color-neutral-600);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.single-post-full .badge-linh-vuc:hover {
    background: var(--color-neutral-200);
    color: var(--color-neutral-800);
}

.single-post-full .badge-flair {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 9px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: 1.4;
    border-radius: var(--radius-full);
    white-space: nowrap;
    background: transparent;
    color: var(--color-neutral-500);
    border: 1px solid var(--color-neutral-100);
}

/* Post tags */
.single-post-full .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
    margin: var(--space-4) 0;
}

.single-post-full .tag-link {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--color-neutral-100);
}

.single-post-full .tag-link:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-800);
    border-color: var(--color-neutral-200);
}

/* Post actions bar */
.single-post-full .post-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-neutral-100);
    border-bottom: 1px solid var(--color-neutral-100);
    margin: var(--space-4) 0;
}

.single-post-full .btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-neutral-600);
    transition: all 0.2s;
    font-family: inherit;
}

.single-post-full .btn-action:hover {
    background: var(--color-neutral-50);
    color: var(--dub-accent-blue);
}

.single-post-full .btn-action .count {
    font-size: 12px;
    color: var(--color-neutral-500);
}

.single-post-full .btn-action.is-active {
    color: var(--dub-accent-orange);
    font-weight: var(--font-semibold);
}

.single-post-full .btn-action.is-active .count {
    color: var(--dub-accent-orange);
}

/* Post footer meta */
.single-post-full .post-footer-meta {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
    margin-bottom: var(--space-6);
}

.single-post-full .edited-label {
    color: var(--color-neutral-500);
    font-style: italic;
}

/* Related posts */
.related-posts {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-neutral-100);
}

.related-posts h3 {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-neutral-800);
    margin-bottom: var(--space-3);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

/* ============================================================
   COMPACT POST CARD (related posts, sidebar)
   ============================================================ */
.post-card-compact {
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-neutral-0);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.post-card-compact:hover {
    border-color: var(--color-neutral-200);
    box-shadow: var(--shadow-sm);
}

.compact-link {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2);
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.compact-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-neutral-100);
}

.compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-text {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-800);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-meta {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-header {
    margin-bottom: var(--space-5);
}

.search-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-1);
}

.search-title span {
    color: var(--dub-accent-blue);
}

.search-count {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    margin-bottom: var(--space-4);
}

.search-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.search-form .search-field {
    flex: 1;
    height: 44px;
    padding: 0 var(--space-4);
    font-size: var(--text-base);
    color: var(--color-neutral-800);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-form .search-field::placeholder {
    color: var(--color-neutral-400);
}

.search-form .search-field:focus {
    border-color: var(--dub-accent-blue);
    box-shadow: var(--shadow-glow);
}

.search-submit {
    height: 44px;
    padding: 0 var(--space-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    background: #000000;
    color: #ffffff;
    transition: background var(--transition-fast);
    font-family: inherit;
}

.search-submit:hover {
    background: var(--dub-carbon);
}

.search-result-item {
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    background: var(--color-neutral-0);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.search-result-item:hover {
    border-color: var(--color-neutral-200);
    box-shadow: var(--shadow-sm);
}

.search-result-content {
    min-width: 0;
}

.search-result-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    margin: 0 0 var(--space-1) 0;
    line-height: 1.4;
}

.search-result-title a {
    color: inherit;
    text-decoration: none;
}

.search-result-title a:hover {
    color: var(--dub-accent-blue);
}

.search-result-excerpt {
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
    line-height: 1.5;
    margin: 0 0 var(--space-2) 0;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.search-result-meta .author {
    color: var(--color-neutral-500);
    font-weight: var(--font-medium);
}

.no-results {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--color-neutral-500);
    font-size: var(--text-base);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    text-align: center;
    max-width: 480px;
    padding: var(--space-8) var(--space-4);
}

.error-code {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: var(--font-black);
    color: var(--color-neutral-100);
    line-height: 1;
    margin-bottom: var(--space-2);
    letter-spacing: -0.04em;
}

.error-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-neutral-800);
    margin-bottom: var(--space-2);
}

.error-description {
    font-size: var(--text-base);
    color: var(--color-neutral-500);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

.error-actions .btn {
    width: 100%;
    max-width: 280px;
}

.search-form-inline {
    display: flex;
    gap: var(--space-2);
    width: 100%;
    max-width: 400px;
}

.search-form-inline .search-field {
    flex: 1;
    height: 44px;
    padding: 0 var(--space-4);
    font-size: var(--text-base);
    color: var(--color-neutral-800);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-form-inline .search-field::placeholder {
    color: var(--color-neutral-400);
}

.search-form-inline .search-field:focus {
    border-color: var(--dub-accent-blue);
    box-shadow: var(--shadow-glow);
}

/* ============================================================
/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
/* Breadcrumb for taxonomy pages */
.archive-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.archive-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-neutral-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.archive-breadcrumb a:hover {
    color: var(--color-neutral-900);
}

.archive-breadcrumb .breadcrumb-sep {
    color: var(--color-neutral-300);
    font-size: 14px;
}

.archive-breadcrumb .breadcrumb-current {
    color: var(--color-neutral-700);
    font-weight: var(--font-medium);
}

.archive-header {
    margin-bottom: var(--space-5);
}

.archive-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-1);
}

.archive-description {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    line-height: 1.5;
    margin-bottom: var(--space-2);
}

.archive-stats {
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    margin-top: var(--space-1);
}

/* ============================================================
   ADS SYSTEM MESSAGES
   ============================================================ */
.tk-msg {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.tk-msg-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.tk-msg-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.tk-msg-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ============================================================
   ADS DASHBOARD
   ============================================================ */
.tk-ads-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tk-ads-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tk-ads-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.tk-ads-card-body {
    padding: 16px 20px;
}

.tk-ads-wallet-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.tk-ads-section-title {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px;
}

.tk-ads-pkg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tk-ads-pkg-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 13px;
    transition: border-color .15s;
    cursor: pointer;
}

.tk-ads-pkg-card:hover {
    border-color: #3b82f6;
}

.tk-ads-pkg-impressions {
    font-size: 18px;
    font-weight: 700;
}

.tk-ads-pkg-price {
    color: #3b82f6;
    font-weight: 600;
}

.tk-ads-banner-preview {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.tk-ads-banner-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.tk-ads-banner-title {
    font-size: 14px;
    font-weight: 600;
}

.tk-ads-banner-desc {
    font-size: 12px;
    color: #555;
    margin: 4px 0;
    line-height: 1.4;
}

.tk-ads-banner-link {
    font-size: 11px;
    color: #3b82f6;
    word-break: break-all;
}

.tk-ads-banner-status {
    margin-top: 6px;
}

.tk-ads-btn-edit {
    padding: 7px 16px;
    height: 32px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
    box-sizing: border-box;
}

.tk-ads-btn-edit:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.tk-ads-btn-primary {
    padding: 7px 16px;
    height: 32px;
    background: var(--dub-accent-orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity .15s;
    box-sizing: border-box;
}

.tk-ads-btn-primary:hover {
    opacity: .8;
}

.tk-ads-form-input {
    width: 100%;
    padding: 7px 10px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
    margin-bottom: 8px;
    box-sizing: border-box;
    font-family: inherit;
}

.tk-ads-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.1);
}

.tk-ads-form-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 8px;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.tk-ads-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.1);
}

.tk-ads-form-file {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
}

.tk-ads-form-file input {
    font-size: 12px;
}

.tk-ads-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tk-ads-stats-table th {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    text-align: left;
}

.tk-ads-stats-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.tk-ads-del-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Ads expandable content */
.tk-ad-content-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tk-ad-expand-btn {
    background: none;
    border: none;
    color: var(--dub-accent-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tk-ad-expand-btn:hover {
    opacity: .8;
}

/* Empty state */
.feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-4);
    text-align: center;
    min-height: 240px;
}

.feed-empty-icon {
    margin-bottom: var(--space-4);
    opacity: .5;
}

.feed-empty-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-500);
    margin: 0 0 var(--space-2);
}

.feed-empty-desc {
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* Bookmarks page (/luu/) */
.bookmarks-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-neutral-100);
}

.bookmarks-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-neutral-800);
    margin: 0;
}

.bookmarks-count {
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    margin: 0;
}

/* Sub-terms (taxonomy-linh_vuc.php) */
.archive-sub-terms {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.sub-term-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-neutral-600);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sub-term-chip:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-900);
    border-color: var(--color-neutral-300);
}

.sub-term-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: var(--font-bold);
    color: var(--color-neutral-500);
    background: var(--color-neutral-100);
    border-radius: var(--radius-full);
}

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.site-content-admin {
    padding: var(--space-4);
}

.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.admin-nav .tab-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-neutral-200);
    background: transparent;
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    font-family: inherit;
    text-decoration: none;
}

.admin-nav .tab-btn:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-300);
    color: var(--color-neutral-800);
}

.admin-nav .tab-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Stats grid for admin */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.stat-card {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.stat-card .stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-neutral-900);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* System status */
.system-status {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-neutral-100);
    font-size: var(--text-sm);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    color: var(--color-neutral-700);
    font-weight: var(--font-medium);
}

.status-value {
    color: var(--color-neutral-500);
}

.status-value.ok {
    color: var(--color-success-600);
}

.status-value.warn {
    color: var(--color-warning-600);
}

.status-value.fail {
    color: var(--color-error-600);
    font-weight: var(--font-semibold);
}

/* Seed banner */
.seed-banner {
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-100);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.seed-banner p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-warning-700);
}

.admin-stats-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   NOTIFICATION CENTER — /thong-bao/
   ============================================================ */
.notif-center {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-100);
}

.notif-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    margin: 0;
}

.notif-mark-all {
    background: none;
    border: none;
    font-size: var(--text-xs);
    color: var(--dub-accent-blue);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: background var(--transition-fast);
}
.notif-mark-all:hover { background: var(--color-neutral-50); }

.notif-filters {
    display: flex;
    gap: var(--space-1-5);
    padding: var(--space-3) var(--space-5);
    padding-left: 24px;
    border-bottom: 1px solid var(--color-neutral-100);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: grab;
}
.notif-filters:active { cursor: grabbing; }
.notif-filters::-webkit-scrollbar { display: none; }

.notif-filter-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    background: var(--color-neutral-0);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-neutral-600);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.notif-filter-btn:hover { border-color: var(--dub-accent-blue); color: var(--dub-accent-blue); }
.notif-filter-btn.active {
    background: var(--color-neutral-900);
    color: #fff;
    border-color: var(--color-neutral-900);
}

.notif-btn-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.notif-btn-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.notif-list { display: flex; flex-direction: column; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3-5) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-50);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-neutral-25, #fafafa); }
.notif-item.is-unread { background: color-mix(in srgb, var(--dub-accent-blue) 5%, transparent); }
.notif-item.is-unread:hover { background: color-mix(in srgb, var(--dub-accent-blue) 9%, transparent); }

.notif-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-neutral-100);
    display: block;
}
.notif-type-icon {
    position: absolute;
    bottom: -3px;
    right: -4px;
    line-height: 0;
    color: var(--color-neutral-700);
    background: var(--color-neutral-0);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--color-neutral-0);
}

.notif-type-icon svg {
    width: 13px;
    height: 13px;
    display: block;
}

.notif-body { flex: 1; min-width: 0; }

.notif-text {
    margin: 0 0 2px;
    font-size: var(--text-sm);
    line-height: 1.45;
    color: var(--color-neutral-800);
}
.notif-actor {
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
    text-decoration: none;
}
.notif-actor:hover { text-decoration: underline; }

.notif-snippet {
    display: block;
    margin: 3px 0 4px;
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.notif-snippet:hover { color: var(--color-neutral-700); }

.notif-time {
    font-size: 11px;
    color: var(--color-neutral-400);
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--dub-accent-blue);
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
}

.notif-loading,
.notif-empty {
    padding: var(--space-8) var(--space-5);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
}

.notif-login-prompt {
    padding: var(--space-8);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
}
.notif-login-prompt a { color: var(--dub-accent-blue); }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-modal-overlay.is-open {
    display: flex;
}

.auth-modal {
    background: #fff;
    border-radius: 16px;
    width: min(420px, 100vw - 32px);
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 24px;
    color: var(--color-neutral-500);
    cursor: pointer;
    line-height: 1;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-neutral-100);
}

.auth-tab {
    flex: 1;
    padding: 10px 8px;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-neutral-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition-fast);
}

.auth-tab:hover { color: var(--color-neutral-800); }
.auth-tab.active { color: var(--color-neutral-900); border-bottom-color: var(--dub-ink); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-form { display: flex; flex-direction: column; gap: 8px; }

.auth-label { font-size: 13px; font-weight: 500; color: var(--color-neutral-700); margin-top: 4px; }

.auth-input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.auth-input:focus { border-color: var(--color-neutral-500); }

.auth-pw-wrap {
    position: relative;
}

.auth-pw-wrap .auth-input {
    padding-right: 40px;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.auth-pw-toggle:hover {
    color: var(--color-neutral-600);
}

.auth-submit {
    margin-top: 12px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    font-family: inherit;
}

.auth-submit:hover { opacity: 0.85; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--color-neutral-400);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-neutral-200);
}
.auth-google-wrap {
  display: flex;
  justify-content: center;
}
.auth-google-wrap .kira-google-login-fallback { display: none; }

.auth-msg {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    display: none;
}

.auth-msg.is-error { display: block; background: var(--color-error-50); color: var(--color-error-700); }
.auth-msg.is-success { display: block; background: var(--color-success-50); color: var(--color-success-700); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page {
    max-width: var(--feed-max-width);
    margin: 0 auto;
    width: 100%;
}

/* ── Search header / input ── */
.search-header {
    padding: 0 0 var(--space-3);
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-400);
    pointer-events: none;
}

.search-input-field {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 44px;
    border: 1.5px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    background: var(--color-neutral-0);
    font-size: var(--text-base);
    color: var(--color-neutral-800);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-field:focus {
    border-color: var(--color-neutral-400);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}

.search-input-field::placeholder {
    color: var(--color-neutral-400);
}

.search-input-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-full);
    background: var(--color-neutral-200);
    color: var(--color-neutral-500);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast);
}

.search-input-clear:hover {
    background: var(--color-neutral-300);
    color: var(--color-neutral-600);
}

/* ── Search tabs ── */
.search-tabs {
    display: flex;
    gap: var(--space-1);
    padding: 0;
    margin-bottom: var(--space-4);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    padding: 4px;
}

.search-tab {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.search-tab:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-700);
}

.search-tab.active {
    background: var(--color-neutral-900);
    color: #fff;
    font-weight: var(--font-semibold);
}

/* ── Browse cards ── */
.browse-card {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    margin-bottom: var(--feed-card-gap);
    transition: box-shadow var(--transition-fast);
    overflow: hidden;
}

.browse-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.browse-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    padding: var(--space-3-5) var(--space-4) 0;
}

.browse-card-icon {
    color: var(--color-neutral-500);
    flex-shrink: 0;
}

.browse-card-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-700);
    margin: 0;
    line-height: 1.3;
}

.browse-card-body {
    padding: var(--space-3) var(--space-4);
}

/* ── Tags list ── */
.browse-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
}

.browse-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: 5px 12px;
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-full);
    background: var(--color-neutral-50);
    font-size: var(--text-xs);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.browse-tag:hover {
    border-color: var(--color-neutral-300);
    background: var(--color-neutral-0);
    box-shadow: var(--shadow-xs);
}

.browse-tag-name {
    color: var(--color-neutral-700);
    font-weight: var(--font-medium);
}

.browse-tag-count {
    color: var(--color-neutral-400);
    font-size: 10px;
    font-weight: var(--font-semibold);
    background: var(--color-neutral-100);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    line-height: 1.4;
}

/* ── Posts list (browse mode) ── */
.browse-posts-list {
    display: flex;
    flex-direction: column;
}

.browse-post-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) 0;
    text-decoration: none;
    border-bottom: 1px solid var(--color-neutral-100);
    transition: background var(--transition-fast);
}

.browse-post-item:first-child {
    padding-top: 0;
}

.browse-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.browse-post-item:hover {
    opacity: 0.85;
}

.browse-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-neutral-100);
    background: var(--color-neutral-100);
    transition: border-color var(--transition-fast);
}

.browse-post-item:hover .browse-post-avatar {
    border-color: var(--color-neutral-200);
}

.browse-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.browse-post-author {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-neutral-400);
}

.browse-post-excerpt {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browse-post-stats {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.browse-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-neutral-400);
    white-space: nowrap;
}

/* ── Users list (browse mode) ── */
.browse-users-list {
    display: flex;
    flex-direction: column;
}

.browse-user-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) 0;
    text-decoration: none;
    border-bottom: 1px solid var(--color-neutral-100);
    transition: opacity var(--transition-fast);
}

.browse-user-item:first-child {
    padding-top: 0;
}

.browse-user-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.browse-user-item:hover {
    opacity: 0.85;
}

.browse-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-neutral-100);
    background: var(--color-neutral-100);
    transition: border-color var(--transition-fast);
}

.browse-user-item:hover .browse-user-avatar {
    border-color: var(--color-neutral-200);
}

.browse-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.browse-user-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
}

.browse-user-username {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.browse-user-bio {
    font-size: 11px;
    color: var(--color-neutral-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

.browse-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.browse-user-stat {
    font-size: 11px;
    color: var(--color-neutral-400);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ── Browse infinite scroll ── */
.browse-infinite {
    display: flex;
    flex-direction: column;
}

/* ── Browse loader / spinner ── */
.browse-loader {
    display: flex;
    justify-content: center;
    padding: var(--space-5) 0;
}

.browse-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--color-neutral-100);
    border-top-color: var(--color-neutral-500);
    border-radius: 50%;
    animation: browse-spin 0.65s linear infinite;
}

@keyframes browse-spin {
    to { transform: rotate(360deg); }
}

/* ── Browse sentinel ── */
.browse-sentinel {
    height: 1px;
    pointer-events: none;
}

/* ── Browse status & error ── */
.browse-status {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    margin-top: var(--feed-card-gap);
}

.browse-error {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    margin-top: var(--feed-card-gap);
}

.browse-error p {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    margin: 0 0 var(--space-3);
}

/* ============================================================
   SEARCH MODE RESULTS
   ============================================================ */
.search-results {
    display: flex;
    flex-direction: column;
    gap: var(--feed-card-gap);
}

.search-section {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    padding: var(--space-3-5) var(--space-4);
    margin-bottom: 0;
    transition: box-shadow var(--transition-fast);
}

.search-section:hover {
    box-shadow: var(--shadow-card-hover);
}

.search-section-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 var(--space-2-5);
}

.search-user-list,
.search-post-list {
    display: flex;
    flex-direction: column;
}

.search-user-item,
.search-post-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-2-5) 0;
    text-decoration: none;
    border-bottom: 1px solid var(--color-neutral-100);
    transition: opacity var(--transition-fast);
}

.search-user-item {
    align-items: center;
}

.search-post-item {
    flex-direction: column;
}

.search-user-item:first-child,
.search-post-item:first-child {
    padding-top: 0;
}

.search-user-item:last-child,
.search-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.search-user-item:hover,
.search-post-item:hover {
    opacity: 0.85;
}

.search-user-avatar,
.search-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-neutral-100);
    background: var(--color-neutral-100);
    transition: border-color var(--transition-fast);
}

.search-user-item:hover .search-user-avatar,
.search-post-item:hover .search-post-avatar {
    border-color: var(--color-neutral-200);
}

.search-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.search-user-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
}

.search-user-username {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.search-user-count {
    font-size: 11px;
    color: var(--color-neutral-400);
    flex-shrink: 0;
    white-space: nowrap;
}

.search-post-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.search-post-author {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.search-post-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
}

.search-post-username {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
}

.search-post-time {
    font-size: 11px;
    color: var(--color-neutral-400);
    flex-shrink: 0;
    white-space: nowrap;
}

.search-post-body {
    font-size: var(--text-sm);
    color: var(--color-neutral-700);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-post-meta {
    display: flex;
    gap: var(--space-3);
    font-size: 11px;
    color: var(--color-neutral-400);
}

/* ── Search empty state ── */
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-10) var(--space-4);
    text-align: center;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
}

.search-empty svg {
    color: var(--color-neutral-200);
}

.search-empty p {
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    margin: 0;
}

/* Feed loader & status */
.feed-loader {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 24px 0;
    font-size: var(--text-sm); color: var(--color-neutral-400);
}
.feed-loader-spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--color-neutral-200);
    border-top-color: var(--color-neutral-500);
    border-radius: 50%; animation: feedSpin 0.6s linear infinite;
}
@keyframes feedSpin { to { transform: rotate(360deg); } }
.feed-status { text-align: center; font-size: var(--text-sm); color: var(--color-neutral-400); padding: 24px 0; }

/* ── Load more button ── */
.search-more-wrap {
    padding: var(--space-3) 0 var(--space-1);
    text-align: center;
}

.search-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 var(--space-6);
    border: 1.5px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-more-btn:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-300);
    color: var(--color-neutral-800);
}

.search-more-btn:active {
    transform: scale(0.98);
}

/* ============================================================
   COMMAND BAR (Ctrl+K)
   ============================================================ */
/* Thanh nhỏ dưới cùng — trigger */
.cmd-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 99999; width: min(480px, calc(100vw - 32px));
    background: rgba(255,255,255,0.85); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    cursor: pointer; transition: all 0.15s;
}
.cmd-bar:not([hidden]) { display: block; }
.cmd-bar:hover { border-color: var(--color-neutral-300); box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.cmd-bar-inner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.cmd-bar-icon { flex-shrink: 0; color: var(--color-neutral-400); }
.cmd-bar-placeholder { flex: 1; font-size: 14px; color: var(--color-neutral-400); user-select: none; }
.cmd-bar-badge { flex-shrink: 0; display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--color-neutral-200); border-radius: 5px; background: var(--color-neutral-50); color: var(--color-neutral-400); font-size: 10px; font-weight: 600; }
.cmd-bar-close { flex-shrink: 0; width: 24px; height: 24px; border: none; border-radius: var(--radius-full); background: transparent; color: var(--color-neutral-400); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.cmd-bar-close:hover { background: var(--color-neutral-100); color: var(--color-neutral-600); }

/* Overlay tối nền */
.cmd-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.5);
    animation: cmdOverlayIn 0.15s ease-out;
}
.cmd-overlay:not([hidden]) { display: block; }
@keyframes cmdOverlayIn { from { opacity: 0; } to { opacity: 1; } }

/* Popup search ở giữa (khi click vào bar hoặc Ctrl+K) */
.cmd-popup {
    display: none;
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 100000; width: min(680px, calc(100vw - 40px)); max-height: 75vh;
    background: var(--color-neutral-0); border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl); box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    flex-direction: column; overflow: hidden;
    animation: cmdPopIn 0.12s ease-out;
}
.cmd-popup:not([hidden]) { display: flex; }
@keyframes cmdPopIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.cmd-popup-input-wrap { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--color-neutral-100); }
.cmd-popup-input { flex: 1; border: none; outline: none; font-size: 18px; color: var(--color-neutral-800); background: transparent; font-family: inherit; }
.cmd-popup-input::placeholder { color: var(--color-neutral-400); }
.cmd-popup-close { flex-shrink: 0; width: 32px; height: 32px; border: none; border-radius: var(--radius-full); background: transparent; color: var(--color-neutral-400); cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.cmd-popup-close:hover { background: var(--color-neutral-50); color: var(--color-neutral-600); }
.cmd-popup-results { overflow-y: auto; padding: 4px 0 8px; display: block; }
.cmd-popup-results.has-results { display: block; }

/* Hint mặc định khi chưa gõ */
.cmd-popup-hint {
    display: flex; flex-direction: column; align-items: center;
    padding: 40px 20px; text-align: center; gap: 12px;
}
.cmd-popup-hint-text { font-size: 15px; color: var(--color-neutral-400); line-height: 1.5; }
.cmd-popup-hint-shortcuts { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.cmd-popup-hint-shortcuts span { font-size: 12px; color: var(--color-neutral-400); display: flex; align-items: center; gap: 4px; }
.cmd-popup-hint-shortcuts kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 5px;
    background: var(--color-neutral-100); border: 1px solid var(--color-neutral-200);
    border-radius: 4px; font-size: 10px; font-weight: 600; color: var(--color-neutral-500);
    font-family: inherit; line-height: 1;
}
.cmd-bar-group { padding: 10px 20px 6px; font-size: 11px; font-weight: 600; color: var(--color-neutral-400); text-transform: uppercase; letter-spacing: 0.5px; }
.cmd-bar-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; text-decoration: none; cursor: pointer; transition: background 0.08s; }
.cmd-bar-item:hover, .cmd-bar-item.is-selected { background: var(--color-neutral-50); }
.cmd-bar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--color-neutral-100); }
.cmd-bar-item-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cmd-bar-item-label { font-size: 15px; font-weight: 500; color: var(--color-neutral-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-bar-item-label strong { color: var(--dub-accent-blue); font-weight: 600; }
.cmd-bar-item-sub { font-size: 13px; color: var(--color-neutral-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-bar-item-sub strong { color: var(--dub-accent-blue); font-weight: 600; }
.cmd-bar-see-all { justify-content: center; font-size: 14px; color: var(--dub-accent-blue); gap: 4px; border-top: 1px solid var(--color-neutral-100); margin-top: 4px; padding: 12px 20px; }
.cmd-bar-see-all:hover { background: var(--color-neutral-50); }
.cmd-bar-empty { padding: 24px 20px; text-align: center; font-size: 15px; color: var(--color-neutral-400); }
.cmd-bar-empty a { color: var(--dub-accent-blue); text-decoration: none; }
.cmd-bar-empty a:hover { text-decoration: underline; }

/* ============================================================
   REPOST SOURCE NOTE
   ============================================================ */
.repost-source {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 12px; margin: 0 0 8px;
    font-size: 12px; color: var(--color-neutral-400);
    background: var(--color-neutral-50); border-radius: 8px;
}
.repost-source a { color: var(--dub-accent-blue); text-decoration: none; font-weight: 500; }
.repost-source a:hover { text-decoration: underline; }
.repost-source-missing { font-style: italic; }

/* ============================================================
   COMMENT USER SWITCHER (admin)
   ============================================================ */
.comment-user-switcher { padding: 0; min-width: 180px; }
.comment-user-switch-select {
    width: 100%; padding: 5px 8px; font-size: 12px;
    border: 1px solid var(--color-neutral-200); border-radius: var(--radius-md);
    background: var(--color-neutral-0); color: var(--color-neutral-600);
    font-family: inherit; cursor: pointer;
}
.comment-user-switch-select:focus {
    outline: none; border-color: var(--dub-accent-blue);
}
.comment-user-search-wrap { position: relative; margin-top: 6px; }
.comment-user-search-input {
    width: 100%; padding: 5px 8px; font-size: 12px;
    border: 1px solid var(--color-neutral-200); border-radius: var(--radius-md);
    background: var(--color-neutral-0); color: var(--color-neutral-600);
    font-family: inherit; box-sizing: border-box;
}
.comment-user-search-input:focus {
    outline: none; border-color: var(--dub-accent-blue);
}
.comment-user-search-results {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: var(--color-neutral-0); border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md); box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-height: 200px; overflow-y: auto; margin-top: 2px;
}
.comment-user-search-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; cursor: pointer; font-size: 13px;
    transition: background 0.08s;
}
.comment-user-search-item:hover { background: var(--color-neutral-50); }
.comment-user-search-item.is-empty { justify-content: center; color: var(--color-neutral-400); cursor: default; }
.comment-user-search-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-user-search-name { font-weight: 500; color: var(--color-neutral-700); }
.comment-user-search-user { font-size: 11px; color: var(--color-neutral-400); }

/* ============================================================
   USER BADGES (Huy hiệu)
   ============================================================ */
.user-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
    margin-left: 4px;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius-full);
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-100);
    cursor: help;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.user-badge:hover {
    transform: scale(1.15);
    background: var(--color-neutral-0);
    border-color: var(--color-neutral-200);
}

/* Badge page */
.badge-page {
    max-width: var(--feed-max-width);
    margin: 0 auto;
    width: 100%;
}

.badge-page-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.badge-page-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-neutral-900);
    margin: 0;
    line-height: 1.3;
}

.badge-page-subtitle {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
    margin: 2px 0 0;
}

.badge-users-list {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    margin-top: var(--feed-card-gap);
    overflow: hidden;
}

.badge-users-list .browse-user-item:last-child {
    border-bottom: none;
}

.badge-more-wrap {
    padding: var(--space-4);
    text-align: center;
}

.badge-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 var(--space-6);
    border: 1.5px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.badge-more-btn:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-300);
    color: var(--color-neutral-800);
}

.badge-more-btn:active {
    transform: scale(0.98);
}

/* URL links trong nội dung bài viết */
a.content-link {
    color: var(--dub-accent-blue, #2563eb);
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}
a.content-link:hover {
    color: #004182;
}

/* Hashtag links trong nội dung bài viết — ưu tiên cao để đè .post-card-body a */
.post-card-body a.hashtag-link,
a.hashtag-link {
    color: var(--color-neutral-700);
    font-weight: 400;
    text-decoration: none;
}
.post-card-body a.hashtag-link:hover,
a.hashtag-link:hover {
    color: var(--color-neutral-900);
    text-decoration: underline;
}
.post-card-body a.hashtag-link-unknown,
a.hashtag-link-unknown {
    color: var(--color-neutral-400);
    font-weight: 400;
    text-decoration: none;
}
.post-card-body a.hashtag-link-unknown:hover,
a.hashtag-link-unknown:hover {
    color: var(--color-neutral-600);
    text-decoration: underline;
}

.browse-tag-badge {
    background: linear-gradient(135deg, var(--color-neutral-0), var(--color-neutral-50));
    border-color: var(--color-neutral-200);
}

.browse-tag-badge:hover {
    background: linear-gradient(135deg, var(--color-neutral-50), var(--color-neutral-100));
    border-color: var(--color-neutral-300);
}
