@charset "UTF-8";

/* ==========================================================================
   Instagram Pure Dark Mode Design System (Matching Official Web Screenshot)
   ========================================================================== */
:root {
    --bg-black: #fafafa;
    --surface-dark: #ffffff;
    --card-dark: #ffffff;
    --border-dark: #dbdbdb;
    --border-hover: #e0e0e0;
    
    --text-white: #262626;
    --text-secondary: #737373;
    --text-muted: #8e8e8e;
    
    --ig-blue: #0095f6;
    --ig-blue-hover: #1877f2;
    --ig-red: #ff3040;
    
    --story-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 84px;
    --feed-width: 530px;
    --right-sidebar-width: 440px;
    
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-logo: 'Grand Hotel', cursive;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.ig-dark-body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-stack);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
}

input, textarea {
    font-family: inherit;
    outline: none;
    color: var(--text-white);
}

/* ==========================================================================
   Instagram App Layout (Sidebar Left + Main Container)
   ========================================================================== */
.ig-app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-black);
}

/* ==========================================================================
   Left Navigation Sidebar (Fixed Full Width - Always Expanded)
   - Đứng im cố định, không thụt vào, luôn hiển thị logo và tên chức năng
   ========================================================================== */
.ig-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width, 270px);
    background-color: var(--bg-black);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

.ig-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-logo {
    height: 58px;
    padding: 6px 14px 20px;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.logo-full {
    display: flex;
    align-items: center;
    opacity: 1;
    text-decoration: none;
}

.logo-full .logo-text {
    font-family: var(--font-logo);
    font-size: 28px;
    color: var(--text-white);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo-compact {
    display: none !important;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 15.5px;
    font-weight: 400;
    transition: background-color 0.2s, transform 0.15s;
    position: relative;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.nav-item:hover {
    background-color: #f2f2f2;
}

.nav-item:hover .nav-icon {
    transform: scale(1.06);
}

.nav-item.active {
    font-weight: 700;
}

.nav-icon {
    font-size: 24px;
    width: 28px;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-dark);
    flex-shrink: 0;
}

/* Chữ hiển thị đầy đủ, không ẩn, không thục vào */
.nav-label {
    opacity: 1;
    max-width: 190px;
    margin-left: 16px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-white);
    font-size: 15.5px;
}

/* Huy hiệu tin nhắn (Badge) */
.nav-badge {
    margin-left: auto;
    background-color: var(--ig-red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid #efefef;
}

.meta-item {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-logout {
    color: #f87171;
}

.nav-logout:hover {
    background-color: #fee2e2;
}

/* ==========================================================================
   Main Content Layout (Feed + Right Sidebar)
   ========================================================================== */
.ig-main-container {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 24px 20px 48px 20px;
    min-height: 100vh;
    background-color: #fafafa;
}

.ig-content-layout {
    display: flex;
    gap: 44px;
    width: 100%;
    max-width: 1020px;
    padding: 0;
    justify-content: center;
    align-items: flex-start;
}

/* ==========================================================================
   Feed Column (Center)
   ========================================================================== */
.ig-feed-column {
    width: 100%;
    max-width: 490px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   Stories Carousel (Harmonious Modern Instagram Card)
   ========================================================================== */
.ig-stories-carousel {
    position: relative;
    padding: 14px 16px;
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.stories-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 2px 2px;
    width: 100%;
}

.stories-track::-webkit-scrollbar {
    display: none;
}

.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-bubble:hover {
    transform: translateY(-2px);
}

.story-avatar-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5px;
    box-sizing: border-box;
}

.story-avatar-wrap.story-gradient {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #ffffff;
    display: block;
    background-color: #fafafa;
}

.story-name {
    font-size: 11.5px;
    font-weight: 500;
    color: #737373;
    max-width: 66px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    transition: color 0.15s ease;
}

.story-bubble:hover .story-name {
    color: #262626;
}

/* Story Arrow Buttons (Frosted Dark Glass) */
.story-arrow-prev,
.story-arrow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #262626;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.story-arrow-prev:hover,
.story-arrow-next:hover {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.22);
    color: #000000;
    transform: translateY(-50%) scale(1.1);
}

.story-arrow-prev {
    left: 8px;
}

.story-arrow-next {
    right: 8px;
}

/* ==========================================================================
   Instagram Feed Cards (Elevated Modern Social Media Card)
   ========================================================================== */
.ig-feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ig-post-card {
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ig-post-card:hover {
    border-color: #cccccc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.post-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.post-author-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-story-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.post-author-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    display: block;
    background-color: #fafafa;
}

.post-author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.name-line {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-handle {
    font-size: 14px;
    font-weight: 700;
    color: #262626;
    text-decoration: none;
    letter-spacing: -0.1px;
    transition: color 0.15s ease;
}

.author-handle:hover {
    color: #0095f6;
}

.verified-badge {
    color: #0095f6;
    font-size: 12px;
}

.bullet-dot, .post-age {
    font-size: 12.5px;
    color: #71717a;
}

.post-location {
    font-size: 11.5px;
    color: #8e8e93;
}

.btn-more-dots {
    color: #737373;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-more-dots:hover {
    color: #262626;
    background: rgba(0, 0, 0, 0.05);
}

.btn-post-del {
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
}

/* Post Image Container */
.post-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #09090b;
}

.post-media-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #09090b;
}

.post-main-image {
    width: 100%;
    max-height: 580px;
    object-fit: cover;
    display: block;
}

.post-main-video {
    width: 100%;
    max-height: 580px;
    display: block;
    background: #000000;
}

.image-overlay-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(20, 20, 24, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.image-overlay-badge:hover {
    background: rgba(35, 35, 42, 0.95);
    transform: scale(1.08);
}

/* Post Toolbar */
.post-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 6px 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-right {
    display: flex;
    align-items: center;
}

.toolbar-btn {
    font-size: 22px;
    color: #262626;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toolbar-btn:hover {
    color: #737373;
    transform: scale(1.12);
}

.btn-like .heart-filled {
    display: none;
    color: #ff3040;
}

.btn-like.liked .heart-outline {
    display: none;
}

.btn-like.liked .heart-filled {
    display: block;
    animation: likeBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-bookmark .bookmark-filled {
    display: none;
    color: #262626;
}

.btn-bookmark.bookmarked .bookmark-outline {
    display: none;
}

.btn-bookmark.bookmarked .bookmark-filled {
    display: block;
    animation: likeBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes likeBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

/* Captions & Likes */
.post-captions-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px 10px 16px;
}

.likes-text {
    font-size: 14px;
    font-weight: 700;
    color: #262626;
}

.caption-row {
    font-size: 14px;
    color: #262626;
    line-height: 1.45;
}

.caption-user {
    font-weight: 700;
    color: #262626;
    text-decoration: none;
    margin-right: 6px;
}

.caption-user:hover {
    text-decoration: underline;
}

.view-comments-btn {
    font-size: 13.5px;
    color: #8e8e93;
    cursor: pointer;
    transition: color 0.15s ease;
}

.view-comments-btn:hover {
    color: #0095f6;
}

.post-comments-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-preview-row {
    font-size: 13.5px;
    color: #262626;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-delete-comment-sm {
    background: transparent;
    border: none;
    color: #71717a;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    transition: color 0.15s;
}

.btn-delete-comment-sm:hover {
    color: #ef4444;
}

.post-timestamp {
    font-size: 11px;
    color: #71717a;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Modern Integrated Comment Input Pill */
.post-comment-input-row {
    margin: 4px 16px 14px 16px;
    padding: 6px 10px 6px 14px;
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.post-comment-input-row:focus-within {
    background: #ffffff;
    border-color: #0095f6;
    box-shadow: 0 0 0 1.5px rgba(0, 149, 246, 0.2);
}

.smile-btn {
    font-size: 17px;
    color: #71717a;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.smile-btn:hover {
    color: #262626;
    transform: scale(1.1);
}

.ig-comment-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13.5px;
    color: #262626;
    outline: none;
    padding: 0;
    margin: 0;
}

.ig-comment-field::placeholder {
    color: #71717a;
    font-size: 13.5px;
}

.btn-post-send {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.btn-post-send:hover:not(:disabled) {
    background-color: #1877f2;
    transform: scale(1.08);
}

.btn-post-send:disabled {
    background-color: #efefef;
    color: #8e8e8e;
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* ==========================================================================
   Right Sidebar (Suggested For You - Exact Match from Screenshot)
   ========================================================================== */
.ig-sidebar-right {
    width: var(--right-sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 10px;
}

/* Current User Switch Card */
.ig-current-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-dark);
}

.user-text-meta {
    display: flex;
    flex-direction: column;
}

.username-strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

.fullname-sub {
    font-size: 14px;
    color: var(--text-secondary);
}

.link-switch-action {
    color: var(--ig-blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.link-switch-action:hover {
    color: var(--text-white);
}

/* Suggested For You Block */
.ig-suggestions-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.suggestions-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.link-see-all {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
}

.suggestions-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sugg-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sugg-avatar-wrap {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.sugg-avatar-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sugg-names {
    flex: 1;
    margin: 0 12px;
    display: flex;
    flex-direction: column;
}

.sugg-handle {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

.sugg-sub {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.btn-blue-follow {
    color: var(--ig-blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.15s;
}

.btn-blue-follow:hover {
    color: #00376b;
}

.btn-blue-follow.is-following {
    color: var(--text-secondary);
}

.btn-blue-follow.is-following:hover {
    color: #f87171;
}

.btn-dark-primary-pill.btn-following {
    background-color: #efefef;
    color: #262626;
    border: 1px solid #dbdbdb;
}

.btn-dark-primary-pill.btn-following:hover {
    background-color: #dbdbdb;
    color: #ef4444;
}

.story-bubble.story-static {
    cursor: default;
}

.story-bubble.story-static .story-avatar-wrap {
    cursor: default;
}

/* Meta Footer */
.ig-meta-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meta-links {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.meta-links a {
    color: var(--text-muted);
}

.meta-links a:hover {
    text-decoration: underline;
}

.meta-copyright {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==========================================================================
   Floating "Messages" Pill Button (Exact Match from Bottom-Right Screenshot)
   ========================================================================== */
.floating-messages-pill {
    position: fixed;
    bottom: 22px;
    right: 28px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #dbdbdb;
    padding: 9px 16px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-messages-pill:hover {
    background: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-color: #cccccc;
}

.floating-messages-pill i {
    font-size: 15px;
    color: #0095f6;
}

.floating-messages-pill span {
    font-size: 13.5px;
    font-weight: 700;
    color: #262626;
    letter-spacing: -0.1px;
}

.floating-avatars {
    display: flex;
    align-items: center;
}

.floating-avatars .f-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #16161a;
    margin-left: -7px;
}

.floating-avatars .f-av:first-child {
    margin-left: 0;
}

/* ==========================================================================
   Dark Mode Modal (Create Post Dialog)
   ========================================================================== */
.ig-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.ig-modal-overlay.show {
    display: flex;
}

.ig-modal-dialog {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #dbdbdb;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #efefef;
}

.modal-top h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    font-size: 18px;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-field-group label {
    font-size: 13px;
    color: var(--text-secondary);
}

.ig-dark-input, .ig-dark-textarea {
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--text-white);
    font-size: 14px;
}

.ig-dark-input:focus, .ig-dark-textarea:focus {
    border-color: var(--ig-blue);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
}

.btn-dark-primary {
    background-color: var(--ig-blue);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 8px;
}

.btn-dark-secondary {
    background-color: #363636;
    color: var(--text-white);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
}

/* ==========================================================================
   Profile Page Dark Mode
   ========================================================================== */
.ig-profile-page {
    width: 100%;
    max-width: 935px;
    padding: 20px 20px 40px;
}

.ig-profile-header {
    display: flex;
    gap: 70px;
    align-items: center;
    margin-bottom: 40px;
}

.profile-avatar-block {
    flex-shrink: 0;
}

.story-gradient-avatar-lg {
    width: 154px;
    height: 154px;
    border-radius: 50%;
    padding: 4px;
    background: var(--story-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-black);
}

.profile-info-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-headline-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-handle-title {
    font-size: 20px;
    font-weight: 400;
}

.verified-badge-lg {
    color: var(--ig-blue);
    font-size: 16px;
}

.btn-dark-pill {
    background-color: #efefef;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 8px;
}

.btn-dark-pill:hover {
    background-color: #dbdbdb;
}

.btn-logout-text {
    color: #f87171;
}

.btn-dark-primary-pill {
    background-color: var(--ig-blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 8px;
}

.btn-gear-icon {
    font-size: 18px;
    color: var(--text-white);
}

.profile-numbers-row {
    display: flex;
    gap: 40px;
    font-size: 16px;
}

.profile-bio-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-realname {
    font-size: 14px;
    font-weight: 700;
}

.profile-bio-text {
    font-size: 14px;
    white-space: pre-line;
    color: var(--text-white);
}

/* Profile Tabs */
.ig-profile-tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-top: 1px solid var(--border-dark);
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 16px 0;
    cursor: pointer;
}

.profile-tab.active {
    color: var(--text-white);
    border-top: 1px solid var(--text-white);
    margin-top: -1px;
}

/* 3-Column Photo Grid */
.ig-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.grid-card-box {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #efefef;
    overflow: hidden;
    cursor: pointer;
}

.grid-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
}

.grid-card-box:hover .grid-card-overlay {
    opacity: 1;
}

.grid-hover-stats {
    display: flex;
    gap: 20px;
    font-weight: 700;
    font-size: 16px;
}

.grid-delete-action {
    background-color: rgba(237, 73, 86, 0.9);
    color: #ffffff;
    font-size: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s;
}

.grid-delete-action:hover {
    background-color: #e02434;
    transform: scale(1.15);
}

.grid-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-camera-circle {
    width: 60px;
    height: 60px;
    border: 2px solid var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.empty-share-link {
    color: var(--ig-blue);
    font-weight: 700;
    font-size: 14px;
}

/* ==========================================================================
   Settings / Edit Profile Dark Mode
   ========================================================================== */
.ig-settings-layout {
    width: 100%;
    max-width: 680px;
    padding: 20px;
}

.ig-settings-card {
    background-color: var(--bg-black);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 30px 40px;
}

.settings-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
}

.dark-settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.settings-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.settings-avatar-text {
    display: flex;
    flex-direction: column;
}

.avatar-handle {
    font-size: 16px;
    font-weight: 700;
}

.avatar-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.dark-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dark-form-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

.input-disabled-dark {
    background-color: #efefef !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
}

.field-hint-dark {
    font-size: 12px;
    color: var(--text-secondary);
}

.dark-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.btn-cancel-dark {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Auth Dark Mode (Login & Register)
   ========================================================================== */
.ig-dark-auth-body {
    background-color: var(--bg-black);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-stack);
    color: var(--text-white);
}

.dark-auth-container {
    max-width: 350px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dark-auth-card {
    background-color: var(--bg-black);
    border: 1px solid var(--border-dark);
    padding: 36px 36px 24px;
    text-align: center;
    border-radius: 2px;
}

.dark-insta-logo {
    font-family: var(--font-logo);
    font-size: 42px;
    color: var(--text-white);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.dark-auth-sub {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.auth-error-msg-dark {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dark-field {
    width: 100%;
    background-color: #fafafa;
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    padding: 10px 10px;
    font-size: 12px;
    color: var(--text-white);
}

.dark-field:focus {
    border-color: #a8a8a8;
    background-color: #ffffff;
}

.btn-dark-blue {
    background-color: var(--ig-blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.btn-dark-blue:hover {
    background-color: var(--ig-blue-hover);
}

.dark-separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 16px;
}

.dark-sep-line {
    flex: 1;
    height: 1px;
    background-color: var(--border-dark);
}

.dark-sep-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.dark-demo-accounts {
    background-color: #f8f9fa;
    border: 1px dashed var(--border-dark);
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.dark-demo-accounts strong {
    color: var(--ig-blue);
}

.dark-switch-card {
    padding: 20px;
    font-size: 14px;
}

.dark-link-blue {
    color: var(--ig-blue);
    font-weight: 700;
}

.dark-terms-notice {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1260px) {
    .ig-content-layout {
        gap: 32px;
    }
    .ig-sidebar-right {
        width: 360px;
        max-width: 360px;
        margin-left: 0;
    }
}

@media (max-width: 1140px) {
    .ig-sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .ig-sidebar {
        width: 72px;
        padding: 20px 8px;
        align-items: center;
    }
    .logo-full {
        display: none;
    }
    .logo-compact {
        display: block;
    }
    .nav-label {
        display: none;
    }
    .ig-main-container {
        margin-left: 72px;
    }
}

/* ==========================================================================
   Modern Instagram Create Post Modal (Drag-Drop, Computer File & Preview)
   ========================================================================== */
.ig-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.ig-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ig-create-dialog {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #dbdbdb;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ig-modal-overlay.show .ig-create-dialog {
    transform: scale(1);
}

.ig-create-dialog.expanded {
    max-width: 860px;
}

.create-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #efefef;
    background-color: #ffffff;
    min-height: 48px;
}

.create-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    flex: 1;
    text-align: center;
}

.btn-create-back, .btn-create-close {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.15s;
}

.btn-create-back:hover, .btn-create-close:hover {
    opacity: 0.7;
}

.btn-create-share {
    background: transparent;
    border: none;
    color: #0095f6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
}

.btn-create-share:hover {
    color: #00376b;
}

/* Dropzone Stage */
.create-dropzone-section {
    background-color: #ffffff;
    padding: 40px 24px 30px;
}

.dropzone-box {
    border: 2px dashed #dbdbdb;
    border-radius: 14px;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background-color 0.25s, transform 0.2s;
}

.dropzone-box:hover, .dropzone-box.drag-active {
    border-color: #0095f6;
    background-color: rgba(0, 149, 246, 0.05);
    transform: translateY(-2px);
}

.dropzone-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #262626;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.dropzone-box:hover .dropzone-icon-circle {
    transform: scale(1.08);
    color: #0095f6;
}

.dropzone-text {
    font-size: 18px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 6px;
}

.dropzone-subtext {
    font-size: 13px;
    color: #737373;
    margin-bottom: 22px;
}

.btn-select-computer {
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.15s;
}

.btn-select-computer:hover {
    background-color: #1877f2;
    transform: scale(1.02);
}

.dropzone-url-fallback {
    margin-top: 18px;
    text-align: center;
}

.btn-toggle-url {
    background: transparent;
    border: none;
    color: #a8a8a8;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-toggle-url:hover {
    color: #262626;
}

.url-input-wrap {
    margin-top: 12px;
}

.url-input-inner {
    display: flex;
    gap: 8px;
}

.btn-apply-url {
    background-color: #efefef;
    border: 1px solid #dbdbdb;
    color: #262626;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-apply-url:hover {
    background-color: #e5e5e5;
}

/* 2-Column Preview Stage */
.create-preview-section {
    display: flex;
    background-color: #ffffff;
    min-height: 480px;
    max-height: 70vh;
}

.create-media-col {
    flex: 1.25;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #efefef;
    position: relative;
}

.media-display-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #050505;
    overflow: hidden;
    max-height: 480px;
}

.preview-media-item {
    max-width: 100%;
    max-height: 480px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.preview-media-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background-color: #fafafa;
    border-top: 1px solid #efefef;
    font-size: 12px;
}

.media-file-badge {
    color: #a8a8a8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.btn-change-media {
    background: transparent;
    border: none;
    color: #0095f6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-change-media:hover {
    text-decoration: underline;
}

.create-caption-col {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 12px;
}

.create-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a1a;
}

.create-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dbdbdb;
}

.create-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.create-textarea-wrap {
    flex: 1;
}

.create-caption-textarea {
    width: 100%;
    height: 140px;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: #262626;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.create-caption-textarea::placeholder {
    color: #737373;
}

.quick-emoji-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid #efefef;
}

.emoji-chip {
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.emoji-chip:hover {
    background-color: #efefef;
}

.caption-counter-row {
    text-align: right;
    font-size: 11px;
    color: #737373;
}

.create-extra-field {
    border-top: 1px solid #efefef;
    padding-top: 8px;
}

.extra-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a8a8a8;
    font-size: 13px;
}

.extra-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #262626;
    font-size: 13px;
    outline: none;
}

.create-mobile-footer {
    display: none;
    gap: 10px;
    margin-top: 12px;
}

.btn-mobile-cancel {
    flex: 1;
    background-color: #efefef;
    color: #262626;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-mobile-share {
    flex: 1;
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Video Support in Feed & Profile */
.post-main-video {
    width: 100%;
    max-height: 585px;
    background-color: #000000;
    object-fit: contain;
    display: block;
}

.grid-video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffffff;
    font-size: 14px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

@media (max-width: 768px) {
    .create-preview-section {
        flex-direction: column;
        max-height: 80vh;
        overflow-y: auto;
    }
    .create-media-col {
        border-right: none;
        border-bottom: 1px solid #262626;
    }
    .create-mobile-footer {
        display: flex;
    }
}

/* ==========================================================================
   Edit Profile Settings Page (Instagram Dark Mode)
   ========================================================================== */
.ig-settings-layout {
    width: 100%;
    max-width: 680px;
    padding: 30px 20px 60px;
    margin: 0 auto;
}

.ig-settings-card {
    background-color: #ffffff;
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 36px 40px;
}

.settings-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
}

.dark-settings-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background-color: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
}

.settings-avatar-wrapper {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #dbdbdb;
}

.settings-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: filter 0.2s;
}

.avatar-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 50%;
}

.settings-avatar-wrapper:hover .avatar-hover-overlay {
    opacity: 1;
}

.settings-avatar-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.avatar-handle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.btn-change-avatar-blue {
    background: transparent;
    border: none;
    color: var(--ig-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 0;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-change-avatar-blue:hover {
    color: #00376b;
    text-decoration: underline;
}

.avatar-selected-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.avatar-url-toggle-wrap {
    margin-top: -8px;
}

.btn-toggle-avatar-url {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s;
}

.btn-toggle-avatar-url:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.dark-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-with-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.bio-counter {
    font-size: 12px;
    color: var(--text-secondary);
}

.ig-dark-input, .ig-dark-textarea {
    background-color: #fafafa;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-white);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.ig-dark-input:focus, .ig-dark-textarea:focus {
    border-color: var(--ig-blue);
    box-shadow: 0 0 0 1px var(--ig-blue);
}

.input-disabled-dark {
    background-color: #efefef;
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: #dbdbdb;
}

.field-hint-dark {
    font-size: 12px;
    color: var(--text-muted);
}

.dark-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
}

.btn-dark-primary {
    background-color: var(--ig-blue);
    color: #ffffff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-dark-primary:hover {
    background-color: var(--ig-blue-hover);
}

.btn-cancel-dark {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.btn-cancel-dark:hover {
    color: var(--text-white);
}

/* ==========================================================================
   Direct Messages / Realtime Chat Layout (Instagram Dark Mode)
   ========================================================================== */
.direct-page-container {
    margin-left: var(--sidebar-width, 270px);
    width: calc(100% - var(--sidebar-width, 270px));
    height: 100vh;
    display: flex;
    background-color: var(--bg-black);
    overflow: hidden;
}

/* Cột trái: Hộp thư danh sách đối tác chat */
.direct-inbox-col {
    width: var(--direct-inbox-width, 504px);
    height: 100%;
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
/* Note: Direct Messages Left Column (.inbox-*) styles are defined in the dedicated section below */

/* Cột phải: Khung hội thoại đang chat */
.direct-conversation-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-black);
}

/* Header trên cùng của cuộc trò chuyện */
.chat-topbar {
    height: 75px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-partner-brief {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-topbar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-topbar-meta {
    display: flex;
    flex-direction: column;
}

.chat-topbar-name {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 600;
}

.chat-topbar-status {
    color: #00c950;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-topbar-actions {
    display: flex;
    gap: 16px;
    color: var(--text-white);
    font-size: 18px;
}

.chat-topbar-actions a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.15s;
}

.chat-topbar-actions a:hover {
    color: var(--ig-blue);
}

/* Khu vực hiển thị tin nhắn */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-header-profile-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 32px;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 16px;
    text-align: center;
}

.chat-header-avatar-lg {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid #333;
}

.chat-header-name {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-header-sub {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 14px;
}

.btn-view-profile-sm {
    background: #efefef;
    color: #262626;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #dbdbdb;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-view-profile-sm:hover {
    background: #e4e4e7;
}

/* Từng dòng tin nhắn được định nghĩa chi tiết tại phần Instagram Direct Chat bên dưới */
.msg-time {
    font-size: 10px;
    color: #737373;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* Thanh nhập tin nhắn ở đáy */
.chat-bottom-input-wrap {
    padding: 14px 24px;
    border-top: 1px solid var(--border-dark);
}

.chat-input-pill {
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 24px;
    padding: 6px 16px;
    gap: 12px;
}

.chat-input-pill:focus-within {
    border-color: #0095f6;
}

.chat-emoji-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.15s;
}

.chat-emoji-btn:hover {
    color: var(--text-white);
}

.chat-text-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-white);
    outline: none;
    font-size: 14px;
    padding: 6px 0;
}

.btn-chat-send {
    background: transparent;
    border: none;
    color: var(--ig-blue);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-chat-send:hover {
    color: var(--ig-blue-hover);
}

/* Trạng thái chưa chọn cuộc trò chuyện nào */
.direct-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.empty-icon-circle {
    width: 96px;
    height: 96px;
    border: 2px solid #262626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: #262626;
    margin-bottom: 18px;
}

.empty-title {
    color: #262626;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Comments & Likes Dynamic Features (Instagram Dark Mode)
   ========================================================================== */
.post-comments-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.comment-preview-row {
    font-size: 14px;
    color: var(--text-white);
    display: flex;
    align-items: baseline;
    gap: 6px;
    position: relative;
}

.comment-preview-row .caption-user {
    font-weight: 700;
    color: var(--text-white);
}

.comment-preview-row .caption-content {
    color: #262626;
    word-break: break-word;
    flex: 1;
}

.btn-delete-comment-sm {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 2px 4px;
    opacity: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, color 0.15s, transform 0.15s;
}

.comment-preview-row:hover .btn-delete-comment-sm {
    opacity: 0.8;
}

.btn-delete-comment-sm:hover {
    opacity: 1 !important;
    color: var(--ig-red);
    transform: scale(1.2);
}

/* Double click Heart Pop Animation */
.post-media-wrap {
    position: relative;
    user-select: none;
    cursor: pointer;
}

.heart-pop-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ffffff;
    font-size: 80px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
    z-index: 10;
}

.heart-pop-icon.pop {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.95;
}

/* Comments Modal Dialog */
.comments-modal-dialog {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 550px;
    width: 92%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #dbdbdb;
}

.comments-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #efefef;
}

.comments-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.comments-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 250px;
    max-height: 420px;
}

.modal-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.modal-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-comment-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.modal-comment-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-delete-btn {
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
}

.modal-delete-btn:hover {
    color: var(--ig-red);
}

.comments-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #363636;
}

/* ==========================================================================
   Story Carousel Scroll Arrows (Prev & Next)
   ========================================================================== */
.story-arrow-prev {
    position: absolute;
    left: -12px;
    top: 36px;
    width: 26px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.15s;
    border: none;
    z-index: 10;
}

.story-arrow-prev:hover {
    transform: scale(1.1);
}

.stories-track {
    scroll-behavior: smooth;
}

/* ==========================================================================
   Post Options Modal (3 Dots Instagram Action Sheet)
   ========================================================================== */
.post-options-dialog {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #dbdbdb;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.post-options-list {
    display: flex;
    flex-direction: column;
}

.post-option-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #efefef;
    color: #262626;
    padding: 14px 16px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: background-color 0.15s;
}

.post-option-item:last-child {
    border-bottom: none;
}

.post-option-item:hover {
    background-color: #f2f2f2;
}

.post-option-item.text-danger {
    color: #ed4956;
    font-weight: 700;
}

.post-option-item.text-cancel {
    color: #262626;
}

/* ==========================================================================
   Search Drawer / Modal (Instagram Dark Mode)
   ========================================================================== */
.ig-search-drawer {
    position: fixed;
    top: 0;
    left: 270px;
    width: 397px;
    height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #efefef;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 1010;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.12, 0.9, 0.24, 1), opacity 0.2s ease, visibility 0.3s;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.ig-search-drawer.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
}

.search-backdrop.active {
    display: block;
}

.search-drawer-inner {
    padding: 24px 16px 16px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.search-drawer-title {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin: 0;
}

.search-drawer-close {
    background: transparent;
    border: none;
    color: #a8a8a8;
    font-size: 26px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.search-drawer-close:hover {
    color: #262626;
}

.search-input-box {
    position: relative;
    background-color: #efefef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #dbdbdb;
    transition: border-color 0.2s;
}

.search-input-box:focus-within {
    border-color: #555555;
}

.search-input-icon {
    color: #8e8e8e;
    font-size: 15px;
    margin-right: 10px;
}

.search-input-box input {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 15px;
    width: 100%;
    outline: none;
}

.search-input-box input::placeholder {
    color: #8e8e8e;
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: #8e8e8e;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-empty-hint {
    text-align: center;
    color: #737373;
    font-size: 14px;
    padding: 40px 10px;
}

.search-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #262626;
    transition: background-color 0.15s;
}

.search-user-card:hover {
    background-color: #f2f2f2;
}

.search-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.search-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.search-user-handle {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.search-user-fullname {
    font-size: 13px;
    color: #737373;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ==========================================================================
   Modern Minimalist Create Post Dropzone
   ========================================================================== */
.dropzone-box {
    border: 1px dashed #dbdbdb;
    border-radius: 12px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.dropzone-box:hover {
    border-color: #0095f6;
    background-color: rgba(255, 255, 255, 0.02);
}

.dropzone-box svg.ig-media-icon {
    color: #262626;
    margin-bottom: 16px;
}

.dropzone-box .dropzone-text {
    font-size: 18px;
    font-weight: 400;
    color: #262626;
    margin: 0 0 20px 0;
}

.btn-select-computer {
    background-color: #0095f6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-select-computer:hover {
    background-color: #1877f2;
}

.dropzone-url-fallback {
    margin-top: 16px;
    text-align: center;
}

.btn-toggle-url {
    background: transparent;
    border: none;
    color: #0095f6;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-toggle-url:hover {
    text-decoration: underline;
}

.url-input-wrap {
    margin-top: 10px;
}

.url-input-inner {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto;
}

.btn-apply-url {
    background-color: #efefef;
    color: #262626;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-apply-url:hover {
    background-color: #0095f6;
}

/* Comment button circular send icon (Threads & iOS Style) */
.btn-post-send {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    margin-left: 6px;
    transition: background-color 0.15s, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s;
}

.btn-post-send:hover:not(:disabled) {
    background-color: #1877f2;
    transform: scale(1.12);
}

.btn-post-send:disabled {
    background-color: #efefef;
    color: #8e8e8e;
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* ==========================================================================
   Instagram Direct Messages & Search Drawer Design System
   (Pixel-perfect matching Instagram Web UI)
   ========================================================================== */

/* Layout Wrapper for Direct Chat */
.direct-view-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

/* ==========================================================================
   Instagram Direct: Snug & Balanced 3-Column Layout (Sidebar, Inbox, Chat)
   ========================================================================== */
.direct-view-wrapper {
    --direct-sidebar-width: 220px;
    --direct-inbox-width: 504px; /* Rộng thêm 3cm (~114px) sang bên phải */
}

/* Sidebar navigation scoped for Direct page: gọn gàng, khít sát với danh sách chat */
.direct-view-wrapper .ig-sidebar {
    width: var(--direct-sidebar-width, 220px) !important;
    padding: 16px 8px 20px 8px !important;
    border-right: 1px solid #dbdbdb !important;
}

.direct-view-wrapper .sidebar-logo {
    height: 52px !important;
    padding: 6px 10px 16px 10px !important;
}

.direct-view-wrapper .sidebar-logo .logo-text {
    font-size: 22px !important;
}

.direct-view-wrapper .sidebar-nav {
    gap: 3px !important;
}

.direct-view-wrapper .sidebar-nav .nav-item {
    padding: 10px 12px !important;
    gap: 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
}

.direct-view-wrapper .sidebar-nav .nav-icon {
    font-size: 19px !important;
    width: 22px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.direct-view-wrapper .sidebar-bottom {
    padding: 0 4px !important;
    gap: 3px !important;
}

.direct-page-container {
    display: flex;
    flex: 1;
    height: 100vh;
    margin-left: 220px !important;
    background-color: #ffffff;
    overflow: hidden;
}

/* Highlight Messages nav item on Direct page */
.direct-view-wrapper .sidebar-nav a[href*="/direct"] {
    font-weight: 700;
    color: #262626;
}

.direct-view-wrapper .sidebar-nav a[href*="/direct"] .nav-icon {
    font-weight: 900;
    transform: scale(1.08);
}

/* ==========================================
   Left Inbox Column (Messages Sidebar - 504px)
   ========================================== */
.direct-inbox-col {
    width: var(--direct-inbox-width, 504px);
    min-width: var(--direct-inbox-width, 504px);
    max-width: var(--direct-inbox-width, 504px);
    height: 100vh;
    border-right: 1px solid #dbdbdb;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    overflow: hidden;
}

/* Top Header */
.inbox-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 10px 20px;
    height: 60px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.inbox-current-username {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    color: #262626;
    cursor: pointer;
    user-select: none;
    letter-spacing: -0.3px;
    transition: opacity 0.15s ease;
}

.inbox-current-username:hover {
    opacity: 0.82;
}

.inbox-current-username i {
    font-size: 12px;
    color: #262626;
    transition: transform 0.2s ease;
}

.inbox-compose-icon {
    font-size: 20px;
    color: #262626;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inbox-compose-icon:hover {
    background-color: #f2f2f2;
    transform: scale(1.06);
}

/* ==========================================================================
   Search Bar in Inbox - Thon gọn, thanh mảnh & tinh tế (Compact Slim Modern)
   ========================================================================== */
.inbox-search-wrap {
    padding: 2px 20px 10px 20px !important;
    border-bottom: none !important;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.inbox-search-box {
    margin: 0 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #efefef !important;
    border: 1px solid #dbdbdb !important;
    border-radius: 16px !important;
    padding: 0 12px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.inbox-search-box:hover {
    background-color: #e5e5e5 !important;
    border-color: #cccccc !important;
}

.inbox-search-box:focus-within {
    background-color: #ffffff !important;
    border-color: #0095f6 !important;
    box-shadow: 0 0 0 1.5px rgba(0, 149, 246, 0.25) !important;
}

.inbox-search-box .inbox-search-icon,
.inbox-search-icon {
    color: #71717a !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
}

.inbox-search-box:focus-within .inbox-search-icon {
    color: #0095f6 !important;
}

.inbox-search-box .inbox-search-input,
.inbox-search-input {
    background: transparent !important;
    border: none !important;
    color: #262626 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 32px !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    letter-spacing: normal !important;
}

.inbox-search-box .inbox-search-input::placeholder,
.inbox-search-input::placeholder {
    color: #8e8e8e !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.inbox-search-box .inbox-search-clear,
.inbox-search-clear {
    background: #dbdbdb !important;
    border: none !important;
    color: #737373 !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
}

.inbox-search-box .inbox-search-clear:hover,
.inbox-search-clear:hover {
    background: #b0b0b0 !important;
    color: #262626 !important;
}

.inbox-search-box .inbox-search-clear:active,
.inbox-search-clear:active {
    transform: scale(0.92) !important;
}

/* Sidebar Nav Search button effect */
.sidebar-nav #navItemSearch {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sidebar-nav #navItemSearch:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(3px) !important;
}

.sidebar-nav #navItemSearch:hover .nav-icon {
    color: #0095f6 !important;
    transform: scale(1.12) !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

/* ==========================================================================
   Direct Inbox Stories Carousel (Matching Instagram Design System)
   ========================================================================== */
.inbox-stories-carousel {
    position: relative;
    padding: 6px 14px 12px 14px;
    border-bottom: 1px solid #efefef;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.inbox-stories-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 2px 2px;
    width: 100%;
}

.inbox-stories-track::-webkit-scrollbar {
    display: none;
}

.inbox-story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.inbox-story-bubble:hover {
    transform: translateY(-2px);
}

.inbox-story-avatar-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    position: relative;
    box-sizing: border-box;
}

.inbox-story-avatar-wrap.story-gradient {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.inbox-story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #ffffff;
    display: block;
    background-color: #fafafa;
}

.inbox-story-plus-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background-color: #0095f6;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
}

.inbox-story-name {
    font-size: 11.5px;
    font-weight: 500;
    color: #737373;
    max-width: 66px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    margin-top: 2px;
    transition: color 0.15s ease;
}

.inbox-story-bubble:hover .inbox-story-name {
    color: #262626;
}

/* Nút mũi tên cuộn Story (Translucent Glass Pill) */
.inbox-story-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #262626;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.inbox-story-arrow:hover {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.22);
    color: #000000;
    transform: translateY(-50%) scale(1.1);
}

.inbox-story-arrow.prev {
    left: 8px;
}

.inbox-story-arrow.next {
    right: 8px;
}

/* Section Header (Messages | Requests) */
.inbox-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 6px 18px;
    flex-shrink: 0;
}

.inbox-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    letter-spacing: -0.2px;
}

.inbox-requests-link {
    font-size: 13.5px;
    font-weight: 600;
    color: #8e8e93;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.inbox-requests-link:hover {
    color: #0095f6;
}

/* Conversation List */
.inbox-partners-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 4px 10px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inbox-partners-list::-webkit-scrollbar {
    display: none;
}

.inbox-partner-item {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
    transition: background-color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.inbox-partner-item:hover {
    background-color: #f4f4f5;
}

.inbox-partner-item.active {
    background-color: #efefef;
}

.inbox-avatar-wrap {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.inbox-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: #1c1c1e;
}

.inbox-avatar-wrap.has-story {
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.inbox-avatar-wrap.has-story .inbox-avatar-img {
    width: 46px;
    height: 46px;
    border: 2px solid #ffffff;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #00ba34;
    border: 2.5px solid #ffffff;
    box-sizing: border-box;
    z-index: 2;
    flex-shrink: 0;
}

.inbox-partner-item.active .online-indicator {
    border-color: #efefef;
}

.inbox-partner-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.inbox-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.inbox-partner-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.inbox-partner-name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.inbox-verified-badge {
    color: #0095f6;
    font-size: 12px;
    flex-shrink: 0;
}

.inbox-item-time {
    font-size: 12px;
    color: #71717a;
    flex-shrink: 0;
    margin-left: 8px;
    font-weight: 400;
}

.inbox-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

.inbox-partner-status {
    font-size: 12.5px;
    color: #8e8e93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    line-height: 1.3;
}

.inbox-partner-item.active .inbox-partner-status {
    color: #262626;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0095f6;
    flex-shrink: 0;
    margin-left: 6px;
}

/* ==========================================
   Right Conversation Column
   ========================================== */
.direct-conversation-col {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    overflow: hidden;
}

/* Topbar */
.chat-topbar {
    height: 75px;
    padding: 0 28px;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background-color: #ffffff;
}

.chat-partner-brief {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-topbar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #dbdbdb;
}

.chat-topbar-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-topbar-name {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
}

.chat-topbar-status {
    font-size: 12px;
    color: #a8a8a8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ws-connection-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #00c950;
    display: inline-block;
    box-shadow: 0 0 6px #00c950;
}

.ws-connection-indicator.disconnected {
    background-color: #ff3040;
    box-shadow: 0 0 6px #ff3040;
}

.chat-topbar-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.chat-topbar-actions a {
    color: #262626;
    font-size: 20px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.chat-topbar-actions a:hover {
    opacity: 0.7;
    transform: scale(1.08);
}

/* Messages Area */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: #dbdbdb transparent;
}

/* Profile header inside chat */
.chat-header-profile-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto 36px auto;
    text-align: center;
}

.chat-header-avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 2px solid #dbdbdb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.chat-header-name {
    font-size: 20px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 4px;
}

.chat-header-sub {
    font-size: 14px;
    color: #a8a8a8;
    margin-bottom: 16px;
}

.btn-view-profile-sm {
    display: inline-block;
    background-color: #efefef;
    color: #262626;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
    transition: background-color 0.2s, transform 0.15s;
    text-decoration: none;
}

.btn-view-profile-sm:hover {
    background-color: #e4e4e7;
    transform: scale(1.02);
}

/* Message Rows (Instagram Direct standard pill bubble layout) */
.msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    margin-bottom: 2px;
    animation: fadeInMsg 0.15s ease-out;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-row.other {
    justify-content: flex-start;
}

.msg-row.self {
    justify-content: flex-end;
}

.msg-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.msg-bubble-wrap {
    width: max-content;
    max-width: 65%;
    display: flex;
    flex-direction: column;
}

.msg-bubble-wrap.other { align-items: flex-start; }
.msg-bubble-wrap.self { align-items: flex-end; }

.msg-bubble {
    width: max-content;
    max-width: 65%;
    padding: 8px 16px;
    font-size: 14.5px;
    line-height: 1.45;
    border-radius: 18px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
    display: inline-block;
    text-align: left;
}

.msg-bubble-wrap .msg-bubble {
    max-width: 100%;
}

.msg-bubble.other {
    background-color: #efefef;
    color: #262626;
    border-bottom-left-radius: 4px;
}

.msg-bubble.self {
    background-color: #3797f0;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-date-divider {
    text-align: center;
    font-size: 11.5px;
    color: #737373;
    margin: 18px 0 10px 0;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.chat-topbar-handle {
    font-size: 12px;
    color: #737373;
}

/* ==========================================================================
   Instagram Form IB (Message Input Bar - Exact Match from Screenshot)
   ========================================================================== */
.chat-bottom-input-wrap {
    padding: 12px 24px 20px 24px;
    background-color: #ffffff;
    flex-shrink: 0;
    position: relative;
}

/* Popover bảng chọn Emoji */
.chat-emoji-popover {
    position: absolute;
    bottom: 74px;
    left: 24px;
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.emoji-popover-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.emoji-cell {
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.12s, background-color 0.12s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-cell:hover {
    transform: scale(1.25);
    background-color: rgba(0, 0, 0, 0.06);
}

/* Khung pill nhập tin nhắn */
.chat-input-pill {
    display: flex;
    align-items: center;
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 24px;
    padding: 4px 14px 4px 16px;
    min-height: 44px;
    gap: 12px;
    transition: border-color 0.2s;
}

.chat-input-pill:focus-within {
    border-color: #0095f6;
}

.chat-pill-icon-btn {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease, color 0.15s ease;
    outline: none;
}

.chat-pill-icon-btn:hover {
    transform: scale(1.12);
    opacity: 0.85;
}

.chat-pill-icon-btn.chat-heart-btn:hover {
    color: #ed4956;
}

.chat-pill-text-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #262626;
    font-size: 14.5px;
    outline: none;
    padding: 8px 0;
    font-family: inherit;
}

.chat-pill-text-input::placeholder {
    color: #8e8e8e;
    font-weight: 400;
}

.chat-pill-actions-right {
    display: flex;
    align-items: center;
}

.chat-default-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-chat-send-text {
    background: transparent;
    border: none;
    color: #0095f6;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.15s, transform 0.15s;
    font-family: inherit;
    outline: none;
}

.btn-chat-send-text:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Empty State */
.direct-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.empty-icon-circle {
    width: 96px;
    height: 96px;
    border: 2px solid #262626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: #262626;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: #737373;
    max-width: 320px;
    margin-bottom: 24px;
    line-height: 1.45;
}

.btn-dark-primary-pill {
    background-color: #0095f6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}

.btn-dark-primary-pill:hover {
    background-color: #1877f2;
    transform: scale(1.02);
}

/* ==========================================================================
   Instagram Global Search Drawer (Panel trượt từ cạnh thanh menu trái)
   ========================================================================== */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
}

.search-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.ig-search-drawer {
    position: fixed;
    top: 0;
    left: var(--sidebar-width, 270px);
    width: 397px;
    height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #dbdbdb;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ig-search-drawer.active {
    transform: translateX(0);
}

.search-drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 0;
}

.search-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 24px 24px;
}

.search-drawer-title {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin: 0;
}

.search-drawer-close {
    background: transparent;
    border: none;
    color: #a8a8a8;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 6px;
}

.search-drawer-close:hover {
    color: #262626;
}

.search-input-box {
    margin: 0 24px 20px 24px;
    position: relative;
    display: flex;
    align-items: center;
    background-color: #efefef;
    border: 1px solid #dbdbdb;
    border-radius: 12px;
    padding: 10px 16px;
    gap: 12px;
    transition: box-shadow 0.2s, background-color 0.2s;
}

.search-input-box:focus-within {
    background-color: #ffffff;
    border-color: #0095f6;
    box-shadow: 0 0 0 1.5px rgba(0, 149, 246, 0.2);
}

.search-input-icon {
    color: #737373;
    font-size: 16px;
    flex-shrink: 0;
}

.search-input-box input {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 14.5px;
    width: 100%;
    outline: none;
}

.search-input-box input::placeholder {
    color: #737373;
}

.search-clear-btn {
    background: #363636;
    border: none;
    color: #a8a8a8;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.search-clear-btn:hover {
    background: #555555;
    color: #ffffff;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-empty-hint {
    padding: 30px 20px;
    text-align: center;
    color: #737373;
    font-size: 14px;
}

.search-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.search-user-card:hover {
    background-color: #f2f2f2;
}

.search-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #dbdbdb;
}

.search-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-user-handle {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-user-card-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    transition: background-color 0.15s ease;
    padding-right: 8px;
}

.search-user-card-wrap:hover {
    background-color: #f2f2f2;
}

.search-user-card-wrap .search-user-card {
    flex: 1;
    background: transparent !important;
}

.search-chat-btn {
    color: #a8a8a8;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color 0.15s, background-color 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-chat-btn:hover {
    color: #0095f6;
    background-color: #efefef;
    transform: scale(1.1);
}

/* Modal Soạn Tin Nhắn Mới (New Message Modal) */
.new-msg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.new-msg-modal.show {
    display: flex;
}

.new-msg-dialog {
    width: 440px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #dbdbdb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalPop 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.new-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #efefef;
}

.new-msg-title {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    margin: 0;
}

.new-msg-close {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.new-msg-search-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #efefef;
    gap: 12px;
}

.new-msg-search-label {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.new-msg-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #262626;
    font-size: 14px;
    outline: none;
}

.new-msg-search-input::placeholder {
    color: #737373;
}

.new-msg-users-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
    padding: 10px 14px;
}

/* ==========================================================================
   Campus Calendar Widget (Lịch Sự Kiện Trường QNU Đầy Đủ & Trực Quan)
   ========================================================================== */
.ig-sidebar-right {
    width: var(--right-sidebar-width, 440px);
    max-width: 440px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    margin-left: 0;
}

.campus-calendar-card {
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 20px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campus-calendar-card:hover {
    border-color: #cccccc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Header Lịch */
.cal-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #efefef;
}

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

.cal-header-icon {
    font-size: 18px;
    color: #0095f6;
    background: rgba(0, 149, 246, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-main-title {
    font-size: 15px;
    font-weight: 700;
    color: #262626;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.cal-sub-title {
    font-size: 12px;
    color: #0095f6;
    font-weight: 600;
}

.cal-nav-btns {
    display: flex;
    gap: 6px;
}

.cal-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #71717a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s ease;
}

.cal-nav-btn:hover {
    background: #e4e4e7;
    color: #262626;
    border-color: #d4d4d8;
    transform: scale(1.05);
}

/* Grid Lịch Tháng */
.cal-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #71717a;
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.cal-day-cell {
    height: 36px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #262626;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.cal-day-cell:hover {
    background-color: #f4f4f5;
    color: #0095f6;
    transform: translateY(-1px);
}

.cal-day-cell.other-month {
    color: #3f3f46;
}

.cal-day-cell.today {
    background-color: rgba(0, 149, 246, 0.15);
    color: #0095f6;
    font-weight: 800;
    border: 1.5px solid rgba(0, 149, 246, 0.5);
}

.cal-day-cell.selected {
    background: linear-gradient(135deg, #0095f6, #0284c7) !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 149, 246, 0.4);
}

.cal-day-cell.has-event {
    font-weight: 700;
}

.event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    bottom: 3.5px;
}

.dot-blue { background-color: #0095f6; box-shadow: 0 0 5px #0095f6; }
.dot-orange { background-color: #f97316; box-shadow: 0 0 5px #f97316; }
.dot-purple { background-color: #ec4899; box-shadow: 0 0 5px #ec4899; }
.dot-cyan { background-color: #06b6d4; box-shadow: 0 0 5px #06b6d4; }

/* Legend Bar */
.cal-legend-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 6px;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
    font-size: 11.5px;
    color: #71717a;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-dot.dot-blue { background-color: #0095f6; }
.legend-dot.dot-orange { background-color: #f97316; }
.legend-dot.dot-purple { background-color: #ec4899; }
.legend-dot.dot-cyan { background-color: #06b6d4; }

/* Agenda Section (Danh Sách Sự Kiện - Dạng Thanh Cuộn Ngang) */
.cal-agenda-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
}

.agenda-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.agenda-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenda-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #262626;
    letter-spacing: -0.1px;
}

.agenda-scroll-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.agenda-scroll-nav-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #71717a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    transition: all 0.15s ease;
}

.agenda-scroll-nav-btn:hover {
    background: #e4e4e7;
    color: #262626;
    border-color: #d4d4d8;
    transform: scale(1.1);
}

.agenda-link-all {
    font-size: 12px;
    font-weight: 600;
    color: #0095f6;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.agenda-link-all:hover {
    color: #38bdf8;
}

/* Thanh cuộn ngang các thẻ sự kiện */
.cal-agenda-horizontal-track {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 2px 2px 8px 2px;
    scrollbar-width: thin;
    scrollbar-color: #383838 transparent;
}

.cal-agenda-horizontal-track::-webkit-scrollbar {
    height: 4px;
}

.cal-agenda-horizontal-track::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.cal-agenda-horizontal-track::-webkit-scrollbar-thumb {
    background: #383838;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cal-agenda-horizontal-track::-webkit-scrollbar-thumb:hover {
    background: #0095f6;
}

.agenda-card-h {
    width: 230px;
    min-width: 230px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fafafa;
    border: 1px solid #e4e4e7;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.agenda-card-h:hover {
    background: #f0f2f5;
    border-color: #dbdbdb;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.agenda-card-h.highlighted {
    border-color: #0095f6;
    background: rgba(0, 149, 246, 0.15);
    box-shadow: 0 0 10px rgba(0, 149, 246, 0.3);
}

.agenda-date-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.badge-blue { background: linear-gradient(135deg, #0095f6, #0284c7); }
.badge-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.badge-purple { background: linear-gradient(135deg, #ec4899, #a855f7); }
.badge-cyan { background: linear-gradient(135deg, #06b6d4, #0284c7); }

.ag-day {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.ag-mon {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
}

.agenda-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.agenda-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #262626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.agenda-item-meta {
    font-size: 11px;
    color: #71717a;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agenda-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-agenda-interest {
    background: transparent;
    border: none;
    color: #71717a;
    font-size: 13px;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-agenda-interest:hover {
    color: #0095f6;
    transform: scale(1.15);
}

.btn-agenda-interest.interested {
    color: #0095f6;
}

/* Footer trong thẻ lịch */
.cal-widget-footer {
    padding-top: 8px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.cal-footer-links {
    font-size: 10.5px;
    color: #8e8e8e;
}

.cal-footer-links a {
    color: #666666;
    text-decoration: none;
    transition: color 0.15s;
}

.cal-footer-links a:hover {
    color: #999999;
    text-decoration: underline;
}

.cal-copyright {
    font-size: 10px;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Modal chi tiết sự kiện tối giản chuẩn Instagram */
.event-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.event-detail-modal-overlay.show {
    display: flex;
}

.event-detail-modal-card {
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.event-modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #efefef;
}

.event-modal-title-header {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
}

.event-modal-close-btn {
    background: transparent;
    border: none;
    color: #a8a8a8;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.15s;
}

.event-modal-close-btn:hover {
    color: #ffffff;
}

.event-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.event-modal-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-modal-cat-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 149, 246, 0.15);
    color: #0095f6;
    text-transform: uppercase;
}

.event-modal-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #262626;
    line-height: 1.35;
}

.event-modal-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f4f4f5;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #52525b;
}

.event-modal-meta-grid div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-modal-meta-grid i {
    width: 16px;
    color: #0095f6;
}

.event-modal-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #52525b;
}

.event-modal-footer {
    display: flex;
    gap: 10px;
    padding-top: 6px;
}

.btn-modal-interest-action {
    flex: 1;
    background: #0095f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-modal-interest-action:hover {
    background: #1877f2;
}

.btn-modal-dismiss {
    background: #efefef;
    color: #262626;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-modal-dismiss:hover {
    background: #444444;
}

/* ==========================================================================
   Instagram 2-Column Post Detail & Comments Modal (Image 2 Style)
   ========================================================================== */
.ig-detail-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ig-detail-backdrop.show {
    display: flex !important;
    opacity: 1 !important;
}

.detail-modal-close-btn {
    position: absolute;
    top: 18px;
    right: 24px;
    background: transparent;
    border: none;
    color: #f5f5f5;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    z-index: 100000;
    padding: 6px;
    transition: opacity 0.15s, transform 0.15s;
}

.detail-modal-close-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.ig-detail-dialog {
    display: flex;
    flex-direction: row;
    width: 92%;
    max-width: 1120px;
    height: 88vh;
    max-height: 840px;
    min-height: 520px;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
    animation: igModalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes igModalScaleIn {
    from {
        transform: scale(1.05);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* CỘT TRÁI: MEDIA */
.detail-media-container {
    flex: 1.35;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #efefef;
    min-width: 0;
}

.detail-media-spinner {
    position: absolute;
    color: var(--text-secondary);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-media-el {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
}

.detail-heart-pop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ffffff;
    font-size: 80px;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.detail-heart-pop.pop {
    transform: translate(-50%, -50%) scale(1.2);
}

/* CỘT PHẢI: INFO & BÌNH LUẬN */
.detail-info-container {
    width: 440px;
    min-width: 380px;
    max-width: 460px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* 1. Header tác giả */
.detail-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #efefef;
    min-height: 60px;
    flex-shrink: 0;
}

.detail-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-avatar-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
    border: 1.5px solid #dbdbdb;
    transition: transform 0.15s;
}

.detail-avatar-ring:hover {
    transform: scale(1.05);
}

.detail-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-username-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.detail-username-text {
    font-weight: 600;
    color: #262626;
    text-decoration: none;
}

.detail-username-text:hover {
    color: #a8a8a8;
}

.detail-dot-separator {
    color: #737373;
    font-size: 12px;
}

.detail-follow-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #0095f6;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.detail-follow-btn:hover {
    color: #00376b;
}

.detail-follow-btn.following {
    color: #a8a8a8;
    font-weight: 500;
}

.detail-more-btn {
    background: transparent;
    border: none;
    color: #262626;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.15s;
}

.detail-more-btn:hover {
    color: #737373;
}

/* 2. Comments Stream */
.detail-comments-stream {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.detail-comments-stream::-webkit-scrollbar {
    width: 6px;
}

.detail-comments-stream::-webkit-scrollbar-track {
    background: #ffffff;
}

.detail-comments-stream::-webkit-scrollbar-thumb {
    background: #dbdbdb;
    border-radius: 3px;
}

.detail-comments-stream::-webkit-scrollbar-thumb:hover {
    background: #363636;
}

.detail-stream-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.detail-caption-item {
    border-bottom: 1px solid #efefef;
    padding-bottom: 16px;
    margin-bottom: 4px;
}

.detail-stream-avatar-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.detail-stream-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-stream-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.detail-stream-user {
    font-weight: 600;
    color: #262626;
    text-decoration: none;
    margin-right: 6px;
}

.detail-stream-user:hover {
    text-decoration: underline;
}

.detail-stream-text {
    color: #262626;
}

.detail-stream-time,
.detail-meta-time {
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 4px;
}

.detail-stream-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: #8e8e8e;
}

.detail-meta-action {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e8e;
    cursor: pointer;
    transition: color 0.15s;
}

.detail-meta-action:hover {
    color: #262626;
}

.detail-meta-action.delete-act {
    color: #8e8e8e;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s, transform 0.15s, background-color 0.15s;
}

.detail-meta-action.delete-act:hover {
    color: #ed4956;
    background-color: rgba(237, 73, 86, 0.12);
    transform: scale(1.25);
}

.detail-comment-heart {
    color: #8e8e8e;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    align-self: flex-start;
    transition: transform 0.15s, color 0.15s;
}

.detail-comment-heart:hover {
    color: #262626;
    transform: scale(1.15);
}

.detail-comment-heart .liked-heart {
    color: #ed4956 !important;
}

.detail-loading-comments,
.detail-empty-comments {
    text-align: center;
    color: #8e8e8e;
    padding: 40px 16px;
    font-size: 14px;
}

.detail-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 3. Footer Panel */
.detail-footer-panel {
    border-top: 1px solid #efefef;
    padding: 12px 16px 8px 16px;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-action-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-icons-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-icon-btn {
    background: none;
    border: none;
    padding: 0;
    color: #262626;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, color 0.15s;
}

.detail-icon-btn:hover {
    transform: scale(1.08);
    color: #a8a8a8;
}

.detail-icon-btn .icon-filled {
    display: none;
    color: #ed4956;
}

.detail-icon-btn.liked .icon-outline {
    display: none;
}

.detail-icon-btn.liked .icon-filled {
    display: inline-block;
}

.detail-likes-count {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-top: 2px;
}

.detail-post-timestamp {
    font-size: 10px;
    color: #8e8e8e;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Form Comment */
.detail-comment-form {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #efefef;
    padding: 10px 0 4px 0;
    margin-top: 4px;
}

.detail-emoji-btn {
    font-size: 20px;
    color: #8e8e8e;
    cursor: pointer;
    transition: color 0.15s;
}

.detail-emoji-btn:hover {
    color: #262626;
}

.detail-comment-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: #262626;
    padding: 4px 0;
    font-family: inherit;
}

.detail-comment-input::placeholder {
    color: #737373;
}

.detail-post-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s, opacity 0.15s;
}

.detail-post-btn:hover:not(:disabled) {
    background-color: #1877f2;
    transform: scale(1.12);
}

.detail-post-btn:disabled {
    background-color: #efefef;
    color: #8e8e8e;
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* Sub-modal Tùy chọn 3 chấm */
.ig-detail-submodal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100005;
    display: none;
    align-items: center;
    justify-content: center;
}

.ig-detail-submodal.show {
    display: flex !important;
}

.detail-submodal-dialog {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    width: 380px;
    max-width: 90%;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.detail-submodal-item {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #efefef;
    color: #262626;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}

.detail-submodal-item:last-child {
    border-bottom: none;
}

.detail-submodal-item:hover {
    background: #f4f4f5;
}

.detail-submodal-item.text-danger {
    color: #ed4956;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .ig-detail-dialog {
        flex-direction: column;
        height: 94vh;
        max-height: none;
        width: 95%;
    }

    .detail-media-container {
        height: 42vh;
        max-height: 380px;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #262626;
    }

    .detail-info-container {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1;
    }
}



