/* Authentic WhatsApp Light Theme & Minimalist Group List CSS - Fully Responsive Mobile Layout */

:root {
    /* WhatsApp Light Theme Color Tokens */
    --bg-main: #F0F2F5;
    --bg-secondary: #FFFFFF;
    --bg-chat: #EFEAE2;
    --bg-chat-pattern: rgba(229, 221, 213, 0.6);
    --border-color: #E9EDEF;
    
    /* WhatsApp Greens & Accents */
    --wa-green: #00A884;
    --wa-green-hover: #029071;
    --wa-dark-green: #075E54;
    --wa-teal: #128C7E;
    --wa-light-green: #D9FDD3;
    
    /* Text Colors */
    --text-primary: #111B21;
    --text-secondary: #54656F;
    --text-muted: #8696A0;

    /* Accents */
    --accent-blue: #027EB5;
    --accent-orange: #E67E22;
    --accent-red: #E53935;
    
    --sidebar-width: 320px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B0B0B0;
}

/* Top Global Navigation Bar - Responsive WhatsApp Header */
.global-navbar {
    height: 60px;
    background: var(--wa-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

.brand-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-green);
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.brand-title-text {
    font-size: 17px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-nav-login {
    background: #FFFFFF;
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    color: var(--wa-dark-green);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-nav-login:hover {
    background: #F0F2F5;
}

/* App Container */
.app-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* Sidebar - Clean Light WhatsApp */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 30;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 12px 16px;
    background: #F0F2F5;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #E9EDEF;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-nim {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Quick Tools Bar */
.quick-tools-bar {
    padding: 12px 14px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
}

.quick-tools-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.tool-chip {
    background: #F0F2F5;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-chip:hover {
    background: #E9EDEF;
    border-color: var(--wa-green);
}

.tool-chip i {
    font-size: 15px;
    color: var(--wa-green);
}

.tool-chip span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Channel / Group List Sidebar */
.groups-container {
    flex: 1;
    overflow-y: auto;
    background: #FFFFFF;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 16px 6px 16px;
}

.group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    border-bottom: 1px solid #F5F6F6;
    min-width: 0;
}

.group-item:hover {
    background: #F5F6F6;
}

.group-item.active {
    background: #F0F2F5;
}

.group-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #128C7E, #075E54);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.group-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.group-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.group-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 6px;
}

.group-last-msg {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* --- DEDICATED TOOL PAGES RESPONSIVE SYSTEM --- */
.tool-page-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.tool-tab-bar {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.tool-tab-item {
    background: #F0F2F5;
    color: #54656F;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.tool-tab-item.active {
    background: var(--wa-green);
    color: #FFFFFF;
}

.tool-content-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tool-header-title {
    font-size: 20px;
    font-weight: 800;
    color: #111B21;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

.tool-header-subtitle {
    font-size: 13px;
    color: #54656F;
    margin: 3px 0 0 0;
    line-height: 1.4;
    word-break: break-word;
}

/* --- INTERACTIVE MONTHLY CALENDAR GRID STYLING --- */
.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.calendar-month-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--wa-dark-green);
}

.calendar-nav-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--wa-green);
    color: #FFFFFF;
    border-color: var(--wa-green);
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 6px 0;
    background: #F0F2F5;
    border-radius: 8px;
}

.calendar-days-header .col-sun {
    color: var(--accent-red);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}

.date-cell {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    aspect-ratio: 1;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    user-select: none;
}

.date-cell:hover {
    border-color: var(--wa-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.date-cell.active-selected {
    border: 2px solid var(--wa-green) !important;
    background: #F0FDF4 !important;
}

.date-cell.empty-cell {
    background: transparent;
    border: none;
    cursor: default;
}

.date-number {
    font-size: 13px;
    font-weight: 700;
    color: #111B21;
}

/* Today Cell Marker (Visual Highlight for Current Date) */
.date-cell.today-cell {
    border: 2.5px solid var(--wa-green) !important;
    background: #E8F5E9 !important;
    box-shadow: 0 0 12px rgba(0, 168, 132, 0.45) !important;
    position: relative;
}

.today-marker-pill {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--wa-green);
    color: #FFFFFF;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.date-cell.today-cell .date-number {
    background: var(--wa-green);
    color: #FFFFFF !important;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(0,168,132,0.3);
}

/* Tanggal Merah (Red Background Highlight for Holidays & Sundays) */
.date-cell.holiday {
    background: #FFEBEE !important;
    border-color: #FFCDD2 !important;
}

.date-cell.holiday .date-number {
    color: #D32F2F !important;
}

.date-cell.today-cell.holiday .date-number {
    background: #D32F2F !important;
    color: #FFFFFF !important;
}

/* Event Indicator Badge/Icon */
.date-cell.has-event {
    box-shadow: inset 0 0 0 1px #00A884;
}

.event-icon-badge {
    font-size: 12px;
    line-height: 1;
    margin-top: 2px;
}

.event-dot-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--wa-green);
    margin-top: 2px;
}

/* Date Detail Panel */
.calendar-detail-panel {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.detail-date-header {
    font-size: 15px;
    font-weight: 800;
    color: var(--wa-dark-green);
    padding-bottom: 8px;
    border-bottom: 1px dashed #CBD5E1;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-item-card {
    background: #FFFFFF;
    border-left: 4px solid var(--wa-green);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 8px;
}

.event-item-card:last-child {
    margin-bottom: 0;
}

.event-item-card.holiday-event {
    border-left-color: #E53935;
    background: #FFF5F5;
}

.event-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #111B21;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Minimalist WhatsApp Group Hub Landing */
.hub-workspace {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--bg-main);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.hub-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.hub-header-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.hub-title-group {
    min-width: 0;
    flex: 1;
}

.hub-title-group h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.hub-title-group p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Minimalist Group List Rows */
.wa-group-list {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.wa-group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.wa-group-row:last-child {
    border-bottom: none;
}

.wa-group-row:hover {
    background: #F8F9FA;
}

.wa-group-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.wa-group-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A884, #075E54);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.wa-group-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.wa-group-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.wa-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.wa-group-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.wa-group-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 10px;
}

.wa-group-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.btn-wa-enter {
    background: var(--wa-green);
    color: #FFFFFF;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.3);
    white-space: nowrap;
}

.btn-wa-enter:hover {
    background: var(--wa-green-hover);
}

/* Main Workspace Chat Area - Authentic Light WhatsApp */
.main-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-chat);
    position: relative;
    width: 100%;
    min-width: 0;
}

.chat-header {
    height: 60px;
    padding: 0 12px;
    background: #F0F2F5;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.chat-title-text-box {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    margin-right: 2px;
    flex-shrink: 0;
}

.chat-group-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.chat-group-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Messages Stream Area */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-chat);
    background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
    background-size: 20px 20px;
    width: 100%;
    box-sizing: border-box;
}

.message-row {
    display: flex;
    gap: 8px;
    max-width: 80%;
}

.message-row.me {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-row.bot {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #E9EDEF;
}

.message-content-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.message-sender {
    font-size: 11px;
    font-weight: 700;
    color: var(--wa-dark-green);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-row.me .message-sender {
    justify-content: flex-end;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 2px rgba(11, 20, 26, 0.12);
    word-break: break-word;
}

.message-row.me .message-bubble {
    background: var(--wa-light-green);
    color: #111B21;
    border-top-right-radius: 0px;
}

.message-row.other .message-bubble {
    background: #FFFFFF;
    color: #111B21;
    border-top-left-radius: 0px;
}

.message-row.bot .message-bubble {
    background: #E8F5E9;
    border: 1px solid #C8E6C9;
    color: #111B21;
    border-top-left-radius: 0px;
}

.message-img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 8px;
    margin-top: 6px;
}

.message-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

/* Chat Input Bar */
.chat-input-container {
    padding: 10px 14px;
    background: #F0F2F5;
    border-top: 1px solid var(--border-color);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.command-palette {
    position: absolute;
    bottom: 100%;
    left: 14px;
    right: 14px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    z-index: 20;
    max-height: 180px;
    overflow-y: auto;
}

.command-palette.active {
    display: flex;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.command-item:hover {
    background: #F0F2F5;
}

.command-item strong {
    color: var(--wa-green);
    font-size: 13px;
}

.command-item span {
    color: var(--text-secondary);
    font-size: 12px;
}

.chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.chat-input {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E9EDEF;
    border-radius: 10px;
    padding: 10px 40px 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--wa-green);
}

.upload-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wa-green);
    border: none;
    color: #FFFFFF;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.3);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 20, 26, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalPop 0.2s ease-out;
}

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

.modal-header {
    padding: 14px 16px;
    background: #F0F2F5;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 16px;
}

/* Digital KTM Card */
.ktm-card {
    width: 100%;
    aspect-ratio: 1.586;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 50%, #00A884 100%);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.ktm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.ktm-university {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
}

.ktm-body {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ktm-photo {
    width: 64px;
    height: 76px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
}

.ktm-info h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 2px;
}

.ktm-info p {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2px;
}

.ktm-barcode {
    margin-top: 10px;
    background: #fff;
    padding: 4px;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
}

/* Dropzone & Forms */
.dropzone {
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #F8FAFC;
    width: 100%;
    box-sizing: border-box;
}

.canvas-preview-box {
    text-align: center;
    margin-top: 14px;
    display: none;
}

#bgCanvas {
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
    background: repeating-conic-gradient(#E2E8F0 0% 25%, #FFFFFF 0% 50%) 50% / 16px 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.btn-primary {
    width: 100%;
    background: var(--wa-green);
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.3);
}

/* --- FULL RESPONSIVE MEDIA QUERIES FOR MOBILE --- */
@media (max-width: 768px) {
    .global-navbar {
        padding: 0 12px;
    }

    .brand-title-text {
        font-size: 15px;
    }

    .desktop-only {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        width: 82vw;
        max-width: 300px;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: block;
    }

    .tool-page-wrapper {
        margin: 12px auto;
        padding: 0 10px;
    }

    .tool-content-card {
        padding: 16px;
    }

    .tool-header-title {
        font-size: 17px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .date-cell {
        padding: 3px;
        border-radius: 6px;
    }

    .date-number {
        font-size: 11px;
    }

    .event-icon-badge {
        font-size: 11px;
    }

    .gpa-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: #F8FAFC;
        padding: 12px;
        border-radius: 10px;
        border: 1px solid #E2E8F0;
    }

    .hub-workspace {
        padding: 12px 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .hub-header-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .hub-title-group h2 {
        font-size: 17px;
    }

    .hub-title-group p {
        font-size: 12px;
    }

    .wa-group-list {
        width: 100%;
        box-sizing: border-box;
    }

    .wa-group-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .wa-group-left {
        width: 100%;
        gap: 10px;
    }

    .wa-group-avatar {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .wa-group-title {
        font-size: 14px;
    }

    .wa-group-desc {
        font-size: 12px;
        white-space: normal;
    }

    .wa-group-right {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        padding-top: 8px;
        border-top: 1px dashed var(--border-color);
    }

    .btn-wa-enter {
        padding: 6px 12px;
        font-size: 12px;
    }

    .message-row {
        max-width: 88%;
    }
}

@media (max-width: 480px) {
    .brand-title-text {
        font-size: 14px;
    }

    .btn-nav-login {
        padding: 5px 10px;
        font-size: 11px;
    }

    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .tool-chip {
        padding: 6px 2px;
    }

    .tool-chip i {
        font-size: 13px;
    }

    .tool-chip span {
        font-size: 9px;
    }
}

/* ==========================================================================
   App Launcher Icons Section (Placed below Chat/Group List)
   ========================================================================== */
.apps-section {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    border: 1px solid #E2E8F0;
}

.apps-section-header {
    margin-bottom: 16px;
}

.apps-section-title {
    font-size: 15px;
    font-weight: 800;
    color: #111B21;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apps-section-sub {
    font-size: 12px;
    color: #667781;
    margin-top: 2px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.app-tile:hover {
    background: #FFFFFF;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 168, 132, 0.15);
    border-color: #00A884;
}

.app-tile-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}

.app-tile:hover .app-tile-icon {
    transform: scale(1.08);
}

.app-tile-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #111B21;
    text-align: center;
    line-height: 1.25;
}

@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .app-tile {
        padding: 10px 4px;
    }
    
    .app-tile-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
        border-radius: 12px;
    }

    .app-tile-name {
        font-size: 10.5px;
    }
}

/* ==========================================================================
   Mobile Responsive Optimizations for Komunitas Freelance
   ========================================================================== */
@media (max-width: 768px) {
    .freelance-card-item {
        flex-direction: column !important;
        padding: 14px !important;
        gap: 12px !important;
    }

    .freelance-card-item > div[style*="width:130px"] {
        width: 100% !important;
        height: 160px !important;
    }

    .messages-container {
        padding: 14px 10px 40px 10px !important;
    }

    /* Collapse Grid Column Layouts on Mobile */
    div[style*="grid-template-columns: 1.2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Hero Banner Mobile Spacing & Text Wrapping */
    div[style*="background: linear-gradient(135deg, #005c4b"] {
        padding: 16px !important;
    }
    
    div[style*="background: linear-gradient(135deg, #005c4b"] h2 {
        font-size: 18px !important;
        word-break: break-word !important;
    }

    div[style*="background: linear-gradient(135deg, #005c4b"] a {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Search & Filter Bar Mobile Wrapping */
    #searchFreelanceInput {
        font-size: 12px !important;
    }
}

/* ==========================================================================
   WhatsApp Signature Mobile Bottom Navigation Bar
   ========================================================================== */
.wa-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    border-top: 1px solid #E9EDEF;
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 0 12px;
}

.wa-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #54656F;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    height: 100%;
}

.wa-bottom-nav-item .nav-icon-wrapper {
    width: 50px;
    height: 28px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.wa-bottom-nav-item .nav-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.2px;
    transition: color 0.2s;
}

.wa-bottom-nav-item:hover {
    color: #00A884;
}

.wa-bottom-nav-item.active {
    color: #00A884;
}

.wa-bottom-nav-item.active .nav-icon-wrapper {
    background: #D9FDD3;
    color: #00A884;
}

@media (max-width: 768px) {
    .wa-bottom-nav {
        display: flex;
    }
    
    .main-workspace, .app-container {
        padding-bottom: 0 !important;
        height: 100% !important;
    }

    .insta-feed-wrapper {
        padding-bottom: 90px !important;
    }

    .chat-footer {
        position: fixed !important;
        bottom: 64px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 998 !important;
        background: #F0F2F5 !important;
        border-top: 1px solid #E9EDEF !important;
    }
}

/* ==========================================================================
   Instagram Campus Photo Feed Workspace Styles
   ========================================================================== */
.insta-feed-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 60px 16px;
}

.insta-feed-header {
    background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #F56040 100%);
    border-radius: 20px;
    padding: 20px 24px;
    color: #FFFFFF;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(225, 48, 108, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.insta-feed-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insta-feed-header p {
    font-size: 13px;
    opacity: 0.9;
}

.btn-upload-feed {
    background: #FFFFFF;
    color: #FD1D1D;
    border: none;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-upload-feed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.insta-card {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #E9EDEF;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.insta-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #F0F2F5;
}

.insta-author-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.insta-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #E1306C;
    object-fit: cover;
    background: #F0F2F5;
}

.insta-author-name {
    font-size: 14px;
    font-weight: 800;
    color: #111B21;
    line-height: 1.2;
}

.insta-author-time {
    font-size: 11.5px;
    color: #8696A0;
}

.insta-media-container {
    width: 100%;
    max-height: 520px;
    background: #111B21;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.insta-media-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.insta-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 8px 18px;
}

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

.insta-action-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #54656F;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.insta-action-btn:hover {
    transform: scale(1.15);
    color: #111B21;
}

.insta-action-btn.like-btn.liked {
    color: #E1306C;
}

.insta-action-btn span {
    font-size: 13px;
    font-weight: 700;
}

.insta-caption-box {
    padding: 4px 18px 16px 18px;
}

.insta-caption-text {
    font-size: 14px;
    color: #111B21;
    line-height: 1.5;
}

.hashtag {
    color: #008069;
    font-weight: 700;
    text-decoration: none;
}

.hashtag:hover {
    text-decoration: underline;
}

/* Stories Highlight Bar */
.stories-bar {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 16px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #E9EDEF;
    margin-bottom: 20px;
    scrollbar-width: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

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

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
}

.story-item-link {
    text-decoration: none !important;
    color: inherit;
    display: inline-block;
}

.story-avatar-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.story-add-ring {
    position: relative;
}

.story-add-badge {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background: #00A884;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.story-icon-box {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #0F172A;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
}

.story-item:hover .story-avatar-ring {
    transform: scale(1.08);
}

.story-item.active-story .story-avatar-ring {
    box-shadow: 0 0 0 3px #00A884;
}

.story-avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    object-fit: cover;
    background: #FFFFFF;
}

.story-name {
    font-size: 11px;
    font-weight: 700;
    color: #111B21;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Share Sheet Modal Grid */
.share-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 12px;
    gap: 8px;
}

.share-option-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.share-option-btn i {
    font-size: 24px;
}

.share-wa { background: linear-gradient(135deg, #25D366, #128C7E); }
.share-ig { background: linear-gradient(135deg, #833AB4, #FD1D1D, #F56040); }
.share-twitter { background: linear-gradient(135deg, #1DA1F2, #0D8BD9); }
.share-yt { background: linear-gradient(135deg, #FF0000, #C40000); }
.share-copy { background: linear-gradient(135deg, #00A884, #075E54); }
.share-native { background: linear-gradient(135deg, #027EB5, #015982); }

/* Skeleton Loading Shimmer */
.skeleton-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid #E9EDEF;
}

.skeleton-box {
    background: linear-gradient(90deg, #F0F2F5 25%, #E9EDEF 50%, #F0F2F5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
}

/* Multi-Photo Collage Grid System */
.feed-collage-grid {
    display: grid;
    gap: 4px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    margin-bottom: 12px;
    position: relative;
}

.collage-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #111B21;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.collage-item:hover img {
    transform: scale(1.04);
}

/* 1 Photo Layout */
.feed-collage-grid.collage-1 {
    grid-template-columns: 1fr;
    max-height: 480px;
}
.feed-collage-grid.collage-1 .collage-item {
    aspect-ratio: 4/3;
    max-height: 480px;
}

/* 2 Photos Layout */
.feed-collage-grid.collage-2 {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 16/9;
}

/* 3 Photos Layout (1 Large left, 2 Stacked right) */
.feed-collage-grid.collage-3 {
    grid-template-columns: 1.8fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16/10;
}
.feed-collage-grid.collage-3 .collage-item:nth-child(1) {
    grid-row: span 2;
}

/* 4+ Photos Layout (1 Large left, 3 Stacked grid right) */
.feed-collage-grid.collage-4 {
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 16/11;
}
.feed-collage-grid.collage-4 .collage-item:nth-child(1) {
    grid-row: span 3;
}

/* Dark Overlay for +X More Photos */
.collage-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(2px);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    z-index: 2;
}
.collage-overlay span {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Image Error Fallback Box */
.img-fallback-box {
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    color: #64748B;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 180px;
    box-sizing: border-box;
}
.img-fallback-box i {
    font-size: 32px;
    color: #94A3B8;
}
.img-fallback-box .fallback-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.img-fallback-box .fallback-btn {
    background: #00A884;
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
}

/* Compact Dark Fallback for Collage Grid Items */
.collage-fallback-box {
    width: 100%;
    height: 100%;
    background: #1E293B;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    padding: 8px;
    box-sizing: border-box;
    gap: 4px;
    text-align: center;
}
.collage-fallback-box i {
    font-size: 18px;
    color: #94A3B8;
}
.collage-fallback-text {
    font-size: 10px;
    font-weight: 600;
    color: #CBD5E1;
}
.collage-retry-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: background 0.2s;
}
.collage-retry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Fullscreen Lightbox Gallery Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(10px);
    z-index: 99999;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding: 16px;
}
.lightbox-modal.active {
    display: flex;
}
.lightbox-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    box-sizing: border-box;
}
.lightbox-close-btn {
    background: rgba(255,255,255,0.15);
    color: #FFFFFF;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.lightbox-close-btn:hover {
    background: rgba(255,255,255,0.3);
}
.lightbox-body {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 75vh;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    user-select: none;
}
.lightbox-fallback-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-align: center;
    color: #FFFFFF;
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}
.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-nav-btn.prev-btn { left: 16px; }
.lightbox-nav-btn.next-btn { right: 16px; }

.lightbox-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
}
.lightbox-thumb {
    width: 50px; height: 50px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.lightbox-thumb.active {
    opacity: 1;
    border-color: #00A884;
    transform: scale(1.1);
}

/* Multi Upload Preview Box in Modal */
.upload-multi-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
    max-height: 160px;
    overflow-y: auto;
}
.upload-thumb-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #CBD5E1;
}
.upload-thumb-item img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.upload-thumb-remove {
    position: absolute;
    top: 4px; right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: #FFFFFF;
    border: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.upload-thumb-remove:hover {
    transform: scale(1.2);
    background: #DC2626;
}

/* Drag & Drop Upload Zone Styling */
.drag-drop-zone {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    position: relative;
    user-select: none;
    overflow: hidden;
}

.drag-drop-zone:hover, .drag-drop-zone.drag-over {
    border-color: #00A884;
    background: #F0FDF4;
    box-shadow: 0 8px 24px rgba(0, 168, 132, 0.12);
    transform: translateY(-2px);
}

.drop-zone-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #00A884, #075E54);
    color: #FFFFFF;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.3);
    transition: transform 0.3s ease;
}

.drag-drop-zone:hover .drop-zone-icon {
    transform: scale(1.1) rotate(-6deg);
}

.drop-zone-text strong {
    display: block;
    font-size: 14px;
    color: #0F172A;
    font-weight: 800;
    margin-bottom: 4px;
}

.drop-zone-text span {
    font-size: 12.5px;
    color: #64748B;
}

.drop-zone-text mark {
    background: transparent;
    color: #00A884;
    font-weight: 800;
    text-decoration: underline;
}

.drop-zone-hint {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 8px;
}

/* Quick Hashtag Chips */
.hashtag-chip-btn {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hashtag-chip-btn:hover {
    background: linear-gradient(135deg, #E1306C, #FD1D1D);
    color: #FFFFFF;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(225, 48, 108, 0.3);
}

/* Double Tap Floating Heart Animation */
.floating-heart-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 80px;
    color: #FFFFFF;
    text-shadow: 0 6px 20px rgba(225, 48, 108, 0.6);
    pointer-events: none;
    z-index: 99;
    animation: heartPopFloating 0.8s ease-out forwards;
}

@keyframes heartPopFloating {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(1.4);
    }
}

/* Instagram / Facebook Style Comments Sheet Modal */
.comment-item-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.comment-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid #CBD5E1;
    flex-shrink: 0;
}
.comment-content-bubble {
    background: #F1F5F9;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.4;
    max-width: 88%;
}
.comment-user-name {
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.comment-time {
    font-size: 10px;
    color: #94A3B8;
    font-weight: 500;
}
.comment-text-body {
    color: #334155;
}
.emoji-chip-btn {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s;
}
.emoji-chip-btn:hover {
    transform: scale(1.2);
    background: #F1F5F9;
}
.btn-view-comments {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 6px;
    display: inline-block;
    transition: color 0.2s;
}
.btn-view-comments:hover {
    color: #00A884;
}

/* Custom Modern Comment Input Bar Design */
.modal-comment-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.comment-current-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #E2E8F0;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-field-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    border-radius: 24px;
    padding: 2px 14px;
    transition: all 0.2s ease;
}

.comment-input-field-wrapper:focus-within {
    background: #FFFFFF;
    border-color: #00A884;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.15);
}

.comment-custom-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 10px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #0F172A;
    box-shadow: none !important;
}

.comment-custom-input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.comment-send-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A884, #128C7E);
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.25);
}

.comment-send-circle-btn:hover:not(:disabled) {
    transform: scale(1.08);
    background: linear-gradient(135deg, #029071, #075E54);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.4);
}

.comment-send-circle-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.comment-send-circle-btn:disabled {
    background: #CBD5E1;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Emoji Bar Refresh */
.emoji-quick-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px 2px;
    scrollbar-width: none;
}

.emoji-quick-bar::-webkit-scrollbar {
    display: none;
}

.emoji-chip-btn {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 6px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emoji-chip-btn:hover {
    transform: scale(1.25) translateY(-2px);
    background: #FFFFFF;
    border-color: #CBD5E1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Share Modal Options & Download Button Styling */
.share-option-btn.share-download {
    background: linear-gradient(135deg, #00A884, #075E54);
    color: #FFFFFF;
}
.share-option-btn.share-download:hover {
    background: linear-gradient(135deg, #029071, #044840);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.35);
}

.lightbox-action-btn {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.lightbox-action-btn.btn-dl-all {
    background: linear-gradient(135deg, #00A884, #128C7E);
    border: none;
}
.lightbox-action-btn.btn-dl-all {
    background: linear-gradient(135deg, #00A884, #128C7E);
    border: none;
}
.lightbox-action-btn.btn-dl-all:hover {
    background: linear-gradient(135deg, #029071, #075E54);
}

/* Global Toast Notification System */
#globalToastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
}

@media (max-width: 640px) {
    #globalToastContainer {
        top: 16px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

.custom-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.9);
    font-size: 13.5px;
    font-weight: 500;
    color: #1E293B;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.custom-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.custom-toast.hide {
    transform: translateY(-15px) scale(0.95);
    opacity: 0;
}

.toast-icon-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.custom-toast.toast-success .toast-icon-wrapper {
    background: #E6F4EA;
    color: #00A884;
}

.custom-toast.toast-error .toast-icon-wrapper {
    background: #FEE2E2;
    color: #EF4444;
}

.custom-toast.toast-warning .toast-icon-wrapper {
    background: #FEF3C7;
    color: #D97706;
}

.custom-toast.toast-info .toast-icon-wrapper {
    background: #E0F2FE;
    color: #0284C7;
}

.toast-message-content {
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close-btn {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: #475569;
}

/* UKM (Unit Kegiatan Mahasiswa) Showcase Styles */
.ukm-workspace-header {
    background: linear-gradient(135deg, #075E54 0%, #00A884 100%);
    border-radius: 18px;
    padding: 24px;
    color: #FFFFFF;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 168, 132, 0.2);
    position: relative;
    overflow: hidden;
}

.ukm-workspace-header h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ukm-workspace-header p {
    font-size: 13.5px;
    opacity: 0.92;
    margin: 0;
    line-height: 1.5;
}

.ukm-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.ukm-filter-bar::-webkit-scrollbar {
    display: none;
}

.ukm-filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ukm-filter-chip:hover,
.ukm-filter-chip.active {
    background: #00A884;
    color: #FFFFFF;
    border-color: #00A884;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.25);
}

.ukm-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ukm-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.ukm-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border-color: #CBD5E1;
}

.ukm-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #0F172A;
}

.ukm-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ukm-card:hover .ukm-card-thumb {
    transform: scale(1.08);
}

.ukm-category-badge-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.ukm-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ukm-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ukm-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.ukm-card-meta {
    flex: 1;
}

.ukm-category-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ukm-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
}

.ukm-desc {
    font-size: 12.5px;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 14px;
}

.ukm-details-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    background: #F8FAFC;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    color: #334155;
    border: 1px solid #F1F5F9;
}

.ukm-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ukm-detail-row i {
    width: 14px;
    color: #00A884;
    text-align: center;
}

.ukm-join-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00A884, #075E54);
    color: #FFFFFF;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.ukm-join-btn:hover {
    background: linear-gradient(135deg, #029071, #044840);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.3);
}

.ukm-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 16px 0;
}

.ukm-section-divider span {
    font-size: 14px;
    font-weight: 800;
    color: #475569;
    white-space: nowrap;
}

.ukm-section-divider .line {
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* UKM Detail & Gallery Modal Overlay */
.ukm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.ukm-modal-card {
    background: #FFFFFF;
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.ukm-modal-header {
    padding: 24px;
    border-radius: 20px 20px 0 0;
    color: #FFFFFF;
    position: relative;
}

.ukm-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.ukm-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.ukm-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.ukm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.ukm-gallery-item {
    border-radius: 12px;
    overflow: hidden;
    height: 140px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.25s ease;
}

.ukm-gallery-item:hover {
    transform: scale(1.03);
}

.ukm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ukm-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 12px 10px 8px 10px;
}

.ukm-wa-box {
    background: #F0FDF4;
    border: 1.5px solid #BBF7D0;
    border-radius: 16px;
    padding: 18px;
    margin-top: 20px;
}

.ukm-wa-submit-btn {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    background: #25D366;
    color: #FFFFFF;
    border: none;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.ukm-wa-submit-btn:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Standard Chat Workspace & Stream Styling (WhatsApp Emerald Style) */
.main-workspace,
.chat-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 60px);
    background: #E5DDD5;
    background-image: radial-gradient(#CBD5E1 1px, transparent 0);
    background-size: 24px 24px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .main-workspace,
    .chat-workspace {
        height: calc(100vh - 124px) !important;
        max-height: calc(100vh - 124px) !important;
        padding-bottom: 0 !important;
    }
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.message-row {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.message-row.me {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-row.other {
    align-self: flex-start;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.message-content-box {
    display: flex;
    flex-direction: column;
}

.message-sender {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-row.me .message-sender {
    text-align: right;
    justify-content: flex-end;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    word-break: break-word;
}

.message-row.me .message-bubble {
    background: #D9FDD3;
    color: #111B21;
    border-top-right-radius: 2px;
}

.message-row.other .message-bubble {
    background: #FFFFFF;
    color: #111B21;
    border-top-left-radius: 2px;
}

.message-time {
    font-size: 10px;
    color: #64748B;
    text-align: right;
    margin-top: 4px;
    font-weight: 500;
}

.message-img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 10px;
    margin-top: 6px;
    object-fit: cover;
}

/* Chat Input Container & Sticky Bar */
.chat-input-container {
    background: #F0F2F5;
    padding: 10px 14px;
    border-top: 1px solid #E2E8F0;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .chat-input-container {
        padding: 8px 10px;
    }
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 4px 10px 4px 14px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-wrapper:focus-within {
    border-color: #00A884;
    box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.15);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 6px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #111B21;
    resize: none;
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
    font-family: inherit;
    box-sizing: border-box;
}

.chat-input::placeholder {
    color: #8696A0;
}

.upload-btn {
    background: none;
    border: none;
    color: #54656F;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    margin-bottom: 2px;
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.upload-btn:hover {
    background: #F1F5F9;
    color: #00A884;
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #00A884;
    color: #FFFFFF;
    border: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 168, 132, 0.3);
    transition: all 0.2s ease;
}

.send-btn:hover {
    background: #029071;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Command Palette Popup */
.command-palette {
    position: absolute;
    bottom: 100%;
    left: 14px;
    right: 14px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #E2E8F0;
    padding: 8px 0;
    display: none;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    z-index: 105;
}

.command-palette.active {
    display: flex;
}

.command-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s;
}

.command-item:hover {
    background: #F1F5F9;
}

.command-item strong {
    color: #00A884;
    font-size: 13px;
}

.command-item span {
    color: #64748B;
    font-size: 11.5px;
}

/* Responsive Desktop vs Mobile Brand Title Display Utilities */
@media (min-width: 769px) {
    .desktop-only {
        display: inline-block !important;
    }
    .mobile-only {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-block !important;
    }
}

/* Report Flag Button in Chat & Feed */
.btn-report-flag {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s;
}

.message-row:hover .btn-report-flag,
.btn-report-flag:hover {
    opacity: 1;
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}







