/* ==========================================================================
   EmlakFlow Design System & Premium CSS Stylesheet
   ========================================================================== */

/* 1. Global Reset & Variables */
:root {
    /* Color Palette */
    --primary: #10b981;        /* Emerald Green (Success, Price, Active status) */
    --primary-hover: #059669;
    --primary-light: rgba(16, 185, 129, 0.1);
    
    --accent: #6366f1;         /* Indigo (Links, mentions, special UI components) */
    --accent-hover: #4f46e5;
    
    --sidebar-bg: #1e1e2d;     /* Deep Slate Navy (Premium Slack Sidebar) */
    --sidebar-hover: #2b2b3d;
    --sidebar-active: #313149;
    --sidebar-text: #a6a6b8;
    --sidebar-text-active: #ffffff;
    
    --bg-main: #f8fafc;        /* Soft Slate Light Gray */
    --bg-card: #ffffff;
    
    --text-main: #0f172a;      /* Slate 900 */
    --text-muted: #64748b;     /* Slate 500 */
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;   /* Slate 200 */
    --border-light: #f1f5f9;   /* Slate 100 */
    
    --status-online: #22c55e;
    --status-offline: #94a3b8;
    --status-away: #eab308;
    
    /* Status tags */
    --tag-active-bg: #ecfdf5;
    --tag-active-color: #059669;
    --tag-reserved-bg: #fff7ed;
    --tag-reserved-color: #ea580c;
    --tag-sold-bg: #fef2f2;
    --tag-sold-color: #dc2626;

    /* Fonts & Radii */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 16px -6px rgba(0, 0, 0, 0.03);
    
    /* Animation Curve */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme overrides */
body.dark-theme {
    --bg-main: #0f172a;        /* Slate 900 */
    --bg-card: #1e293b;        /* Slate 800 */
    --text-main: #f8fafc;      /* Slate 50 */
    --text-muted: #94a3b8;     /* Slate 400 */
    --border-color: #334155;   /* Slate 700 */
    --border-light: #1e293b;   /* Slate 800 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-main);
    background-color: var(--bg-main);
    height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 2. Main App Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   LEFT SIDEBAR (Slack Style)
   ========================================================================== */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.workspace-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.workspace-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.workspace-meta {
    display: flex;
    flex-direction: column;
}

.workspace-name {
    font-size: 0.95rem;
    color: var(--sidebar-text-active);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.user-status-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background-color: var(--status-online); }
.status-dot.offline { background-color: var(--status-offline); }
.status-dot.away { background-color: var(--status-away); }

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--sidebar-text);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-active);
}

.notification-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--tag-sold-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: bold;
    border: 2px solid var(--sidebar-bg);
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sidebar Scrollbar */
.sidebar-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-search {
    position: relative;
    margin: 0 4px;
}

.sidebar-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--sidebar-text);
}

.sidebar-search input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 8px 12px 8px 30px;
    color: var(--sidebar-text-active);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-smooth);
}

.sidebar-search input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 6px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.add-section-btn {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.add-section-btn:hover {
    opacity: 1;
    color: var(--sidebar-text-active);
}

/* Lists styling */
.channel-list, .member-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-list li, .member-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    user-select: none;
}

.channel-list li:hover, .member-list li:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.channel-list li.active, .member-list li.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-text-active);
    box-shadow: inset 3px 0 0 var(--primary);
}

.channel-item-left, .member-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-item-left i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

/* Sidebar Widget */
.sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 8px 4px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.widget-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.stat-label {
    color: var(--sidebar-text);
}

.stat-val {
    font-weight: 600;
    color: var(--sidebar-text-active);
}

.text-success {
    color: var(--primary) !important;
}

/* User Profile Footer */
.user-profile-footer {
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar.small {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
}

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

.username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sidebar-text-active);
}

.role-badge {
    font-size: 0.7rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    width-max: max-content;
    align-self: flex-start;
    margin-top: 2px;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text-active);
}

/* ==========================================================================
   2. MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-main);
    overflow: hidden;
}

/* Header */
.main-header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.channel-info {
    display: flex;
    flex-direction: column;
}

.active-channel-name {
    font-size: 1.15rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-channel-name i {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.channel-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.header-search-bar {
    position: relative;
    width: 260px;
}

.header-search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-search-bar input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px 8px 34px;
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-smooth);
}

.header-search-bar input:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    width: 320px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--border-light);
    border-color: #cbd5e1;
}

/* Content Body Scroll Area */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ==========================================================================
   DYNAMIC VIEWS & COMPONENTS
   ========================================================================== */

/* A. CHAT VIEW (For #genel, #saha-ekibi) */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-message {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.chat-message:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

.chat-message.highlighted {
    background-color: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--accent);
}

.message-sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-sender-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.message-timestamp {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.message-body {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
}

/* Interactive elements inside message body */
.message-card-attachment {
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: white;
    display: flex;
    overflow: hidden;
    max-width: 550px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.message-card-attachment:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.attachment-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.attachment-details {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.attachment-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.attachment-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.attachment-specs {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* System Notifications inside Chat */
.system-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    align-self: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 8px 0;
    box-shadow: var(--shadow-sm);
}

.system-notification i {
    color: var(--accent);
}

/* B. PORTFOLIO / LISTINGS VIEW (#yeni-ilanlar) */
.listings-view-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Filtering & Sorting Bar */
.filter-bar {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-select {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    outline: none;
    background-color: var(--bg-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-select:focus {
    border-color: var(--primary);
}

.search-results-summary {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Awaiting-reply toggle chip (owner chat coordination) */
.filter-toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-toggle-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-toggle-chip.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.filter-toggle-chip .chip-count {
    background-color: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
}

.filter-toggle-chip.active .chip-count {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Region tag quick-filter chips */
.region-chips-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 20px;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}

.region-chip {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.25);
    background-color: rgba(99, 102, 241, 0.06);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.region-chip:hover {
    background-color: rgba(99, 102, 241, 0.15);
}

.region-chip.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

/* Pulsing owner-chat badge on property cards */
.awaiting-reply-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background-color: rgba(245, 158, 11, 0.92);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    animation: awaitingPulse 2s ease-in-out infinite;
}

@keyframes awaitingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.85; }
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.property-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: #cbd5e1;
}

.card-img-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.property-card:hover .card-img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.status-badge.active {
    background-color: var(--tag-active-bg);
    color: var(--tag-active-color);
}

.status-badge.reserved {
    background-color: var(--tag-reserved-bg);
    color: var(--tag-reserved-color);
}

.status-badge.sold {
    background-color: var(--tag-sold-bg);
    color: var(--tag-sold-color);
}

.category-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    background-color: rgba(15, 23, 42, 0.75);
    color: white;
    backdrop-filter: blur(4px);
    font-size: 0.72rem;
    font-weight: 600;
}

.price-tag {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background-color: white;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.35;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-location {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.card-location i {
    color: var(--tag-sold-color);
}

.card-specs-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-item i {
    color: var(--accent);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.agent-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.card-action-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.card-action-btn:hover {
    color: var(--accent-hover);
    gap: 6px;
}

/* C. CLIENT DEMANDS VIEW (#musteri-talepleri) */
.demands-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demand-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-smooth);
}

.demand-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.demand-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.client-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-icon {
    width: 42px;
    height: 42px;
    background-color: var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
}

.client-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.demand-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.demand-budget {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem;
}

.demand-criteria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background-color: var(--bg-main);
    padding: 14px 18px;
    border-radius: var(--radius-md);
}

.criteria-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.criteria-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.criteria-value {
    font-size: 0.85rem;
    font-weight: 600;
}

.demand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.demand-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 70%;
}

.match-action-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.match-action-btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

/* D. TRANSACTION / SALES VIEW (#satis-kiralama) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-value {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 700;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.metric-icon.green { background-color: #ecfdf5; color: #059669; }
.metric-icon.blue { background-color: #eff6ff; color: #2563eb; }
.metric-icon.indigo { background-color: #eef2ff; color: #4f46e5; }
.metric-icon.purple { background-color: #faf5ff; color: #9333ea; }

.timeline-container {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.timeline-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.timeline {
    position: relative;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -23px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid var(--accent);
    z-index: 2;
}

.timeline-marker.success { border-color: var(--primary); }
.timeline-marker.warning { border-color: var(--status-away); }

.timeline-content {
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.85rem;
}

.timeline-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.timeline-text {
    color: #334155;
    line-height: 1.45;
}

/* ==========================================================================
   3. DETAILS SIDEBAR (Right Drawer)
   ========================================================================== */
.details-sidebar {
    width: 380px;
    height: 100%;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 8;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
}

/* Collapsed details state */
.details-sidebar.collapsed {
    width: 0;
    border-left-width: 0;
    overflow: hidden;
}

.details-header {
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.details-header h3 {
    font-size: 1.05rem;
    color: var(--text-main);
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.close-sidebar-btn:hover {
    background-color: var(--border-light);
    color: var(--text-main);
}

.details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Details components */
.detail-gallery {
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

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

.detail-specs-card {
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 16px;
}

.detail-price {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.detail-val {
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 4px;
}

.detail-description {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.5;
}

/* Simulation Map Card */
.detail-map-box {
    height: 120px;
    background-color: #cbd5e1;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(circle, #e2e8f0 10%, transparent 11%), radial-gradient(circle, #e2e8f0 10%, transparent 11%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-map-box::before {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: var(--tag-sold-color);
    animation: pinBounce 1.5s infinite;
}

.map-label {
    position: absolute;
    bottom: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 3px 8px;
    font-size: 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

@keyframes pinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Comments & Activity Thread */
.activity-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thread-message {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
}

.thread-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.thread-body-wrapper {
    flex: 1;
}

.thread-name {
    font-weight: 600;
    color: var(--text-main);
    margin-right: 4px;
}

.thread-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.thread-text {
    color: #475569;
    line-height: 1.4;
    margin-top: 2px;
}

.thread-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.thread-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-smooth);
}

.thread-input:focus {
    border-color: var(--accent);
}

.thread-send-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.thread-send-btn:hover {
    background-color: var(--accent-hover);
}

/* ==========================================================================
   4. MODALS & FORMS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: white;
    border-radius: var(--radius-lg);
    width: 580px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: var(--transition-smooth);
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    background-color: var(--border-light);
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.col-6 {
    flex: 1;
}

label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
}

input[type="text"], input[type="number"], select, textarea {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
    background-color: var(--bg-card);
    color: var(--text-main);
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.image-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.image-option {
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    height: 70px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.image-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-option:hover {
    opacity: 0.85;
}

.image-option.selected {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.image-option.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--primary);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   5. FLOATING MESSAGE INPUT & MISCELLANEOUS
   ========================================================================== */
.message-input-footer {
    padding: 0 24px 20px 24px;
    background-color: var(--bg-main);
}

.rich-input-container {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.rich-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.05), 0 4px 6px -4px rgba(99, 102, 241, 0.05);
}

.input-formatting-bar {
    background-color: var(--border-light);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.format-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 6px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.input-formatting-bar .divider {
    width: 1px;
    height: 16px;
    background-color: var(--border-color);
    margin: 0 4px;
}

.input-text-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 10px 14px;
    gap: 12px;
}

.input-text-wrapper textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    height: 44px;
    padding: 4px 0;
    font-size: 0.88rem;
    font-family: var(--font-secondary);
    color: var(--text-main);
}

.input-text-wrapper textarea:focus {
    box-shadow: none;
}

.send-message-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.send-message-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: #0f172a;
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.removing {
    animation: toastOut 0.3s forwards;
}

.toast i {
    color: var(--primary);
}

@keyframes toastIn {
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateY(20px); opacity: 0; }
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .details-sidebar {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        flex-shrink: 0;
    }
    .workspace-header {
        height: 54px;
        padding: 0 14px;
    }
    .user-profile-footer,
    .sidebar-search,
    .sidebar-voice-call,
    .sidebar-widget,
    .sidebar-section + .sidebar-section,
    .sidebar-section .section-title {
        display: none !important;
    }
    .sidebar-scrollable {
        display: block;
        padding: 6px 10px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        border-top: 1px solid rgba(255,255,255,0.06);
    }
    .sidebar-section {
        margin-bottom: 0;
    }
    .channel-list {
        display: flex;
        flex-direction: row;
        gap: 6px;
        white-space: nowrap;
    }
    .channel-item {
        padding: 5px 10px;
        font-size: 0.76rem;
        flex-shrink: 0;
    }
    .main-header {
        height: auto;
        min-height: 56px;
        padding: 8px 14px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .channel-description,
    .header-search-bar {
        display: none;
    }
    .details-sidebar {
        width: 100vw;
        max-width: 100vw;
        z-index: 60;
    }
    .details-sidebar.collapsed {
        width: 0 !important;
        pointer-events: none;
    }
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   7. LOGIN SCREEN STYLING
   ========================================================================== */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-secondary);
}

.login-bg-decor {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.login-bg-decor .circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.login-bg-decor .circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -50px;
    left: -50px;
}

.login-bg-decor .circle-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -100px;
    right: -100px;
}

.login-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    width: 440px;
    max-width: 90vw;
    padding: 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: loginFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    margin-bottom: 8px;
}

.login-header h1 {
    font-size: 1.6rem;
    color: white;
    font-weight: 700;
}

.login-header p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.login-form input[type="text"], 
.login-form input[type="password"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 40px;
    color: white;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-smooth);
}

.login-form input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.9rem;
}

.quick-login-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.quick-login-section h3 {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    text-align: center;
}

.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-login-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.quick-login-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.quick-login-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.quick-login-meta {
    display: flex;
    flex-direction: column;
}

.quick-login-meta span {
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
}

.quick-login-meta small {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Profile footer updates */
.profile-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.logout-btn {
    background: none;
    border: none;
    color: #ef4444; /* Light red */
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* ==========================================================================
   8. EMPLOYEE PERFORMANCE PANEL STYLING
   ========================================================================== */
.performance-view-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agent-performance-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-smooth);
}

.agent-performance-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.agent-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.agent-profile-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agent-profile-summary img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 3px solid var(--border-light);
}

.agent-name-role h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.agent-name-role p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.agent-badges {
    display: flex;
    gap: 8px;
}

.perf-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.perf-badge.gold {
    background-color: #fef3c7;
    color: #d97706;
}

.perf-badge.silver {
    background-color: #f1f5f9;
    color: #475569;
}

.agent-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: var(--bg-main);
    padding: 16px;
    border-radius: var(--radius-md);
}

@media (max-width: 768px) {
    .agent-metrics-row {
        grid-template-columns: 1fr 1fr;
    }
}

.metric-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-box-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-box-val {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
}

.progress-tracker-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   9. SIDEBAR VOICE CALL TRIGGER & DELETE CHANNEL BUTTONS
   ========================================================================== */
.sidebar-voice-call {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px dashed rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.sidebar-voice-call:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.05);
}

.voice-call-trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sidebar-text-active);
}

.voice-call-trigger-content i {
    color: #ef4444; /* Alert Red */
    animation: huddlePulse 1.8s infinite;
}

.pulse-indicator-small {
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: blink 1.2s infinite;
}

/* Channel Header Layout & Delete Button */
.channel-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.delete-channel-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-channel-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   10. HUDDLE FLOATING VOICE CALL PANEL
   ========================================================================== */
.huddle-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: white;
    transition: var(--transition-smooth);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.huddle-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.huddle-panel.minimized {
    width: 260px;
}

.huddle-panel.minimized .huddle-body {
    display: none;
}

.huddle-header {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.huddle-title-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.huddle-live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.huddle-live-indicator .status-dot.blink {
    background-color: #ef4444;
    animation: huddlePulse 1s infinite;
}

.huddle-timer {
    font-size: 0.72rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
}

.huddle-minimize-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.huddle-minimize-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.huddle-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Canvas Audio Visualizer */
.huddle-visualizer-container {
    height: 50px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.huddle-visualizer-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Transcript subtitle */
.huddle-transcript-box {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.4;
    min-height: 48px;
    max-height: 72px;
    overflow-y: auto;
    border-left: 3px solid #ef4444;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    transition: var(--transition-smooth);
}

/* Speaking Avatars Grid */
.huddle-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.huddle-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.huddle-member-card span {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.avatar-ring {
    position: relative;
    width: 44px;
    height: 44px;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 5;
    transition: var(--transition-smooth);
}

/* speaking pulsing glow ring */
.speaking-wave {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    z-index: 2;
    transition: var(--transition-smooth);
}

.huddle-member-card.speaking .speaking-wave {
    animation: huddleSpeakRing 1.5s infinite;
    opacity: 1;
}

.huddle-member-card.speaking .avatar-ring img {
    border-color: var(--primary);
}

/* Screensharing simulation panel */
.huddle-screenshare-view {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.huddle-screenshare-view.active {
    display: flex;
}

.screenshare-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.screenshare-mock-content {
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.mock-map {
    width: 80px;
    height: 80px;
    background-color: #334155;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(#475569 1px, transparent 1px);
    background-size: 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mock-map .radar-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    position: relative;
}

.mock-map .radar-dot::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 50%;
    animation: radarPulse 1.5s infinite;
}

.mock-map-label {
    position: absolute;
    bottom: 2px;
    font-size: 0.55rem;
    background: rgba(0,0,0,0.6);
    padding: 1px 4px;
    border-radius: 2px;
}

.mock-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-stat-item {
    display: flex;
    flex-direction: column;
    font-size: 0.68rem;
}

.mock-stat-item span {
    color: rgba(255,255,255,0.5);
    font-size: 0.6rem;
}

/* Footer controls */
.huddle-footer {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.huddle-controls {
    display: flex;
    gap: 8px;
}

.huddle-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.huddle-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.huddle-control-btn.active {
    background-color: var(--primary);
}

.huddle-control-btn.active:hover {
    background-color: var(--primary-hover);
}

.huddle-control-btn.muted {
    background-color: #ef4444 !important;
}

.btn-huddle-leave {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-md);
}

/* Animations */
@keyframes huddlePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

@keyframes huddleSpeakRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes radarPulse {
    from { transform: scale(0.5); opacity: 1; }
    to { transform: scale(1.5); opacity: 0; }
}

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ==========================================================================
   11. SETTINGS TABS & PROFILE CARD EDITING
   ========================================================================== */
.settings-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    gap: 16px;
    background-color: var(--bg-main);
}

.settings-tab-btn {
    background: none;
    border: none;
    padding: 12px 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.settings-tab-btn:hover {
    color: var(--text-main);
}

.settings-tab-btn.active {
    color: var(--accent);
}

.settings-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent);
}

.settings-tab-content {
    display: none;
    padding: 20px;
}

.settings-tab-content.active {
    display: block;
}

/* Settings Profile Preview Card */
.profile-preview-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 14px;
    text-align: center;
}

.preview-cover-bg {
    height: 80px;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1;
}

.preview-avatar-wrap {
    width: 64px;
    height: 64px;
    margin: -32px auto 8px auto;
    position: relative;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background-color: white;
}

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

.preview-meta h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.preview-meta span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* File inputs style */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    font-size: 0.82rem;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    cursor: pointer;
}

/* Details Sidebar Profile Card Layout */
.details-profile-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.details-cover-photo {
    height: 110px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}

.details-avatar-overlap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid white;
    margin: -36px auto 10px auto;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background-color: white;
}

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

.details-profile-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 2px;
}

.details-profile-role {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.details-profile-bio {
    font-size: 0.78rem;
    color: #475569;
    padding: 0 16px 14px 16px;
    text-align: center;
    line-height: 1.4;
    font-style: italic;
}

/* ==========================================================================
   12. EMOJI REACTIONS ON MESSAGES
   ========================================================================== */
.message-reactions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition-smooth);
    user-select: none;
}

.reaction-badge:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background-color: rgba(99, 102, 241, 0.05);
}

.reaction-badge.user-reacted {
    background-color: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.add-reaction-trigger-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    position: relative;
}

.add-reaction-trigger-btn:hover {
    background-color: var(--border-light);
    color: var(--text-main);
}

/* Reaction Tooltip Popover */
.emoji-picker-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-md);
    padding: 6px;
    display: none;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 999;
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.add-reaction-trigger-btn:hover .emoji-picker-tooltip {
    display: flex;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.25);
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   13. HIZLI EV BULMA (AI SEARCH INTERFACE)
   ========================================================================== */
.ai-search-container {
    max-width: 760px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 16px;
}

.ai-search-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-search-header-text {
    text-align: center;
}

.ai-search-header-text h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-search-header-text h2 i {
    color: var(--primary);
    animation: huddlePulse 2s infinite;
}

.ai-search-header-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ai-search-box-row {
    display: flex;
    gap: 12px;
}

.ai-search-input-wrap {
    flex: 1;
    position: relative;
}

.ai-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.ai-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-primary);
    transition: var(--transition-smooth);
}

.ai-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: white;
}

.ai-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ai-pills-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ai-pill {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-pill:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
    color: var(--primary);
    transform: translateY(-1px);
}

/* AI Loading Simulator */
.ai-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ai-loading-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}

.ai-loading-spinner i {
    font-size: 2.2rem;
    color: var(--primary);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ai-loading-spinner .spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px dashed var(--accent);
    border-radius: 50%;
    animation: rotateRing 2s linear infinite;
}

.ai-loading-box span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI Response Card */
.ai-response-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-response-header {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    padding: 12px 18px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-info-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-logo-icon {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.model-name {
    font-size: 0.82rem;
    font-weight: 700;
}

.model-badge {
    font-size: 0.65rem;
    background-color: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.ai-response-body {
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #334155;
    border-bottom: 1px solid var(--border-color);
}

.ai-response-body p {
    margin-bottom: 10px;
}

.ai-response-body p:last-child {
    margin-bottom: 0;
}

.ai-response-body strong {
    color: var(--text-main);
}

/* AI Matching listings results */
.ai-results-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 16px 20px 8px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-results-grid {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Match Score Badge on Listing Cards */
.match-score-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(99, 102, 241, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar mini avatars for Slack experience */
.member-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.member-item-left .status-dot {
    position: absolute;
    bottom: -1px;
    left: 14px;
    border: 2px solid var(--sidebar-bg);
    z-index: 10;
}

.member-avatar-mini {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: var(--sidebar-bg);
}

.message-body code {
    background-color: var(--bg-main);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.82em;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   14. DYNAMIC PERFORMANCE CHARTS & INLINE DEMAND MATCHES
   ========================================================================= */
.agent-chart-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.agent-chart-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-chart-card h4 i {
    color: var(--primary);
}

.agent-chart-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.agent-chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-chart-info {
    width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-chart-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-chart-info span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-chart-bar-wrap {
    flex: 1;
    height: 14px;
    background-color: var(--bg-main);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.agent-chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-chart-value {
    width: 90px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}

/* Inline Matches Drawer */
.demand-matches-drawer {
    display: none;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 16px;
    margin-top: -8px;
    margin-bottom: 8px;
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.demand-matches-drawer.open {
    display: block;
}

.demand-matches-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demand-matches-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-matched-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mini-matched-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.mini-matched-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.mini-matched-info {
    flex: 1;
}

.mini-matched-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.mini-matched-specs {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.mini-matched-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- OWNER CHAT SIMULATOR PANELS & THEMES --- */
.owner-chat-modal-header.theme-whatsapp {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%) !important;
}

.owner-chat-modal-header.theme-imessage {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%) !important;
}

.owner-chat-body.theme-whatsapp {
    background-color: #efeae2 !important;
    background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0), radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0) !important;
    background-size: 16px 16px !important;
    background-position: 0 0, 8px 8px !important;
}

.owner-chat-body.theme-imessage {
    background-color: #ffffff !important;
    background-image: none !important;
}

.channel-toggle-btn {
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent !important;
}

.channel-toggle-btn.active.wp {
    color: #128c7e !important;
    border-bottom: 3px solid #128c7e !important;
}

.channel-toggle-btn.active.im {
    color: #007aff !important;
    border-bottom: 3px solid #007aff !important;
}

/* Bubbles styling */
.owner-chat-bubble {
    max-width: 75%;
    padding: 8px 14px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    word-break: break-word;
}

.owner-chat-bubble .msg-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
    align-self: flex-end;
}

/* WhatsApp bubble themes */
.owner-chat-bubble.theme-whatsapp {
    border-radius: 7px;
}

.owner-chat-bubble.sent.theme-whatsapp {
    background-color: #d9fdd3;
    color: #303030;
    align-self: flex-end;
    border-top-right-radius: 0px;
}

.owner-chat-bubble.received.theme-whatsapp {
    background-color: #ffffff;
    color: #303030;
    align-self: flex-start;
    border-top-left-radius: 0px;
}

/* iMessage bubble themes */
.owner-chat-bubble.theme-imessage {
    border-radius: 18px;
    padding: 8px 16px;
}

.owner-chat-bubble.sent.theme-imessage {
    background-color: #007aff;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.owner-chat-bubble.sent.theme-imessage .msg-time {
    color: rgba(255, 255, 255, 0.7);
}

.owner-chat-bubble.received.theme-imessage {
    background-color: #e9e9eb;
    color: #000000;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Quick buttons in sidebar */
.owner-connect-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.owner-connect-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.owner-connect-btn.wp {
    background-color: #e8faf4;
    color: #0f8b68;
}

.owner-connect-btn.wp:hover {
    background-color: #d1f7ea;
}

.owner-connect-btn.im {
    background-color: #e8f4fd;
    color: #0c82df;
}

.owner-connect-btn.im:hover {
    background-color: #d1e9fc;
}

/* Polish Voice Reader Button & Animation Styles */
.btn-play-voice {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--primary);
    opacity: 0.6;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.btn-play-voice:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.1);
}

.btn-play-voice.playing {
    color: #eab308; /* Yellow/Gold when playing */
    opacity: 1;
}

.pulse-animation {
    animation: voice-pulse 1s infinite alternate;
}

@keyframes voice-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* --- WARDROBE & SHOP MODAL TABS & LAYOUTS --- */
.wardrobe-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wardrobe-tab:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
}

.wardrobe-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Custom details-avatar-overlap override for vector SVG avatars */
.details-avatar-overlap svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* --- CRM AUTO MATCH NOTIFICATION POPUP --- */
.match-popup-card {
    position: fixed;
    bottom: 24px;
    right: -400px;
    width: 350px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(99, 102, 241, 0.2);
    padding: 16px;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    color: white;
}

.match-popup-card.active {
    right: 24px;
    opacity: 1;
}

/* --- LİDERLİK KÜRSÜSÜ (PODIUM) & TABLE --- */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 20px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.podium-step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.podium-avatar-wrapper {
    margin-bottom: 8px;
    position: relative;
    display: flex;
    justify-content: center;
}

.crown-icon {
    position: absolute;
    top: -18px;
    font-size: 1.15rem;
    color: #facc15;
    filter: drop-shadow(0 2px 4px rgba(250, 204, 21, 0.4));
    transform: rotate(-10deg);
    animation: bounce 1.5s infinite;
}

.podium-step {
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: white;
}

.pedestal-first {
    height: 120px;
    background: linear-gradient(135deg, #ca8a04 0%, #854d0e 100%);
    border: 1.5px solid #facc15;
}

.pedestal-second {
    height: 95px;
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    border: 1.5px solid #94a3b8;
}

.pedestal-third {
    height: 75px;
    background: linear-gradient(135deg, #7c2d12 0%, #431407 100%);
    border: 1.5px solid #ea580c;
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.podium-name {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.podium-stats {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.85;
}

.leaderboard-table th {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1.5px solid rgba(255,255,255,0.06);
}

.leaderboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.leaderboard-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.current-user-row {
    background: rgba(99, 102, 241, 0.08) !important;
    border-left: 3px solid var(--accent);
}

@keyframes modalPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- PREMIUM LISTINGS & PAYMENT MODAL STYLES --- */
.payment-pack-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.payment-pack-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.5);
}

.payment-pack-card.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Premium Listing Card Styles */
.property-card.premium-card {
    border: 2.5px solid #facc15 !important;
    position: relative;
    box-shadow: 0 4px 20px rgba(250, 204, 21, 0.2), inset 0 0 10px rgba(250, 204, 21, 0.05) !important;
    background: linear-gradient(to bottom, #1e1b4b, #0f172a) !important;
}

.property-card.premium-card .card-title {
    color: #ffffff !important;
}

.property-card.premium-card .card-location {
    color: #cbd5e1 !important;
}

.property-card.premium-card .card-location i {
    color: #facc15 !important;
}

.property-card.premium-card .spec-item {
    color: #94a3b8 !important;
}

.property-card.premium-card .spec-item i {
    color: #facc15 !important;
}

.property-card.premium-card .agent-name {
    color: #cbd5e1 !important;
}

.property-card.premium-card .card-specs-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.property-card.premium-card .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.premium-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    color: #1e1b4b;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

.dial-key-btn:active {
    transform: scale(0.9) !important;
}









