/* ============================================
   BROFFILKA - Affiliate Pipeline CRM
   Styles v2.0 - Modular & Mobile-First
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #16161f;
    --border-color: #2a2a3a;
    --border-light: #3a3a4a;
    --text-primary: #f0f0f5;
    --text-secondary: #9090a0;
    --text-muted: #606070;
    --accent-blue: #4a9eff;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --accent-red: #ef4444;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --accent-lime: #84cc16;
    --gradient-1: linear-gradient(135deg, #4a9eff 0%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
}

/* ============================================
   FLAG IMAGES (Windows doesn't support flag emojis)
   ============================================ */
.flag-icon {
    width: 20px;
    height: 15px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.flag-uk { background-image: url('https://flagcdn.com/w40/gb.png'); }
.flag-nl { background-image: url('https://flagcdn.com/w40/nl.png'); }
.flag-de { background-image: url('https://flagcdn.com/w40/de.png'); }
.flag-es { background-image: url('https://flagcdn.com/w40/es.png'); }
.flag-it { background-image: url('https://flagcdn.com/w40/it.png'); }
.flag-fr { background-image: url('https://flagcdn.com/w40/fr.png'); }
.flag-us { background-image: url('https://flagcdn.com/w40/us.png'); }
.flag-ca { background-image: url('https://flagcdn.com/w40/ca.png'); }
.flag-au { background-image: url('https://flagcdn.com/w40/au.png'); }
.flag-br { background-image: url('https://flagcdn.com/w40/br.png'); }
.flag-pl { background-image: url('https://flagcdn.com/w40/pl.png'); }
.flag-se { background-image: url('https://flagcdn.com/w40/se.png'); }
.flag-no { background-image: url('https://flagcdn.com/w40/no.png'); }
.flag-dk { background-image: url('https://flagcdn.com/w40/dk.png'); }
.flag-fi { background-image: url('https://flagcdn.com/w40/fi.png'); }
.flag-at { background-image: url('https://flagcdn.com/w40/at.png'); }
.flag-ch { background-image: url('https://flagcdn.com/w40/ch.png'); }
.flag-be { background-image: url('https://flagcdn.com/w40/be.png'); }
.flag-ie { background-image: url('https://flagcdn.com/w40/ie.png'); }
.flag-pt { background-image: url('https://flagcdn.com/w40/pt.png'); }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 0% 0%, rgba(74, 158, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 50%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(34, 197, 94, 0.04) 0%, transparent 50%);
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-logo {
    width: 72px;
    height: 72px;
    background: var(--gradient-1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.3);
}

.login-box h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-box input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

.login-box button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.login-error {
    color: var(--accent-red);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.setup-notice {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

.setup-notice a {
    color: var(--accent-blue);
}

/* ============================================
   MAIN APP CONTAINER
   ============================================ */
.app-container {
    display: none;
}

.app-container.active {
    display: block;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* ============================================
   HEADER
   ============================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.logo-icon {
    width: 46px;
    height: 46px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-icon:hover {
    transform: rotate(-10deg) scale(1.1);
    box-shadow: 0 6px 25px rgba(74, 158, 255, 0.4);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 1rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent-green); }
    50% { opacity: 0.6; box-shadow: 0 0 4px var(--accent-green); }
}

.sync-dot.offline {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: none;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
button {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.125rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 158, 255, 0.5);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background: var(--gradient-2);
    color: white;
    border: none;
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-small {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.btn-archive {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.btn-archive:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: var(--accent-orange);
}

.btn-danger.btn-icon {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.btn-danger.btn-icon:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-red);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    padding: 0.55rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-red);
    transform: translateX(3px);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.btn-logout svg {
    display: block;
}

/* ============================================
   FILTERS
   ============================================ */
.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

select, input[type="text"], input[type="password"], input[type="date"], input[type="email"], input[type="url"], textarea {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

select:focus, input:focus, textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

select {
    cursor: pointer;
    min-width: 130px;
}

.reset-btn {
    color: var(--accent-blue);
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}

.reset-btn:hover {
    text-decoration: underline;
}

/* ============================================
   TABLE
   ============================================ */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

th.sortable:hover {
    color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.05);
}

th.sortable.active {
    color: var(--accent-blue);
}

.sort-icon {
    font-size: 0.65rem;
    margin-left: 0.25rem;
    opacity: 0.4;
    transition: opacity 0.2s;
}

th.sortable:hover .sort-icon {
    opacity: 0.7;
}

th.sortable.active .sort-icon {
    opacity: 1;
    color: var(--accent-blue);
}

td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover {
    background: rgba(74, 158, 255, 0.04);
}

.row-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.crm-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e1e2e;
    background: #fbbf24;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #f59e0b;
}

/* ============================================
   CHECKBOX GROUPS
   ============================================ */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.checkbox-item:hover {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.05);
}

.checkbox-item:has(input:checked) {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--accent-blue);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.checkbox-label {
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   MODEL FIELDS
   ============================================ */
.model-fields {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease;
}

/* ============================================
   NETWORK DETAILS
   ============================================ */
.network-details {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease;
}

.network-details-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.network-details > p {
    margin-bottom: 0.5rem !important;
}

.network-sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.network-source-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    transition: all 0.2s ease;
}

.network-source-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.network-source-toggle {
    margin: 0;
    padding: 0;
}

.network-source-toggle .checkbox-label {
    font-size: 0.8rem;
}

.network-source-details {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.network-source-input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 0.75rem;
}

.network-source-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.network-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.network-sources-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.network-source-view-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--accent-cyan);
}

.network-source-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.network-source-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    font-style: italic;
}

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

.model-fields-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================
   URLS CONTAINER
   ============================================ */
.urls-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.url-entry {
    animation: slideDown 0.2s ease;
}

.url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-input {
    flex: 1;
    min-width: 0;
}

.position-select {
    width: 70px;
    text-align: center;
}

.remove-url {
    flex-shrink: 0;
}

/* ============================================
   COMMENTS CELL
   ============================================ */
.comments-cell {
    max-width: 200px;
}

.comments-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   VIEW MODAL URL LIST
   ============================================ */
.url-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.url-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.url-position {
    background: var(--accent-purple);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.url-link {
    flex: 1;
    color: var(--accent-blue);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
}

.url-link:hover {
    text-decoration: underline;
}

/* ============================================
   KPI BADGES
   ============================================ */
.kpi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kpi-badge {
    padding: 0.35rem 0.7rem;
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================
   RATE DISPLAY
   ============================================ */
.rate-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rate-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.rate-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.rate-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-green);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   PARTNER & BADGES
   ============================================ */
.partner-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.partner-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

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

.geo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.65rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.model-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.model-cpa { background: rgba(74, 158, 255, 0.15); color: var(--accent-blue); }
.model-revshare { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.model-hybrid { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.model-flat-fee { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.model-fee-hybrid { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }
.model-fee-cpa { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.model-fee-rs { background: rgba(132, 204, 22, 0.15); color: var(--accent-lime); }

.source-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
}

.assigned-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

/* ============================================
   TAGS
   ============================================ */
.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.3);
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tags-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 42px;
    align-items: center;
}

.tags-input-wrapper:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 0.9rem;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-input {
    flex: 1;
    min-width: 100px;
    border: none !important;
    background: transparent !important;
    padding: 0.25rem !important;
    box-shadow: none !important;
}

.tag-input:focus {
    outline: none !important;
}

/* ============================================
   PER-GEO RATES
   ============================================ */
.geo-rates-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    animation: slideDown 0.2s ease;
}

.geo-rate-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.geo-rate-item:last-child {
    margin-bottom: 0;
}

.geo-rate-label {
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 60px;
    flex-shrink: 0;
}

.geo-rate-input {
    flex: 1;
    min-width: 120px;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

.geo-rate-view {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.geo-rate-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-width: 120px;
}

.geo-rate-card-geo {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.geo-rate-card-values {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.geo-rate-card-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-green);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

.status-new { background: rgba(74, 158, 255, 0.15); color: var(--accent-blue); }
.status-new .status-dot { background: var(--accent-blue); }
.status-hunting { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.status-hunting .status-dot { background: var(--accent-pink); animation: pulse 1.5s infinite; }
.status-contacted { background: rgba(234, 179, 8, 0.15); color: var(--accent-yellow); }
.status-contacted .status-dot { background: var(--accent-yellow); }
.status-negotiating { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.status-negotiating .status-dot { background: var(--accent-purple); }
.status-approved { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.status-approved .status-dot { background: var(--accent-green); }
.status-live { background: rgba(34, 197, 94, 0.2); color: var(--accent-green); border: 1px solid rgba(34, 197, 94, 0.3); }
.status-live .status-dot { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.status-hold { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }
.status-hold .status-dot { background: var(--accent-orange); }
.status-waiting { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.status-waiting .status-dot { background: var(--accent-cyan); animation: pulse 1.5s infinite; }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.status-rejected .status-dot { background: var(--accent-red); }
.status-archived { background: rgba(96, 96, 112, 0.15); color: var(--text-muted); }
.status-archived .status-dot { background: var(--text-muted); }

.status-badge.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.status-badge.clickable:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* ============================================
   BULK SELECTION
   ============================================ */
.bulk-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.bulk-actions-bar {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease;
}

.bulk-actions-bar.active {
    display: flex;
}

.bulk-count {
    font-weight: 700;
    color: var(--accent-blue);
}

/* ============================================
   ACTIVITY LOG
   ============================================ */
.activity-log {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.8rem;
    border-left: 3px solid var(--accent-blue);
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.activity-text {
    color: var(--text-secondary);
}

/* ============================================
   DATE DISPLAY
   ============================================ */
.date-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.date-badge.fresh {
    color: var(--accent-green);
    font-weight: 600;
}

.date-badge.recent {
    color: var(--accent-cyan);
}

.date-badge.stale {
    color: var(--accent-orange);
}

.date-badge.very-stale {
    color: var(--accent-red);
}

/* ============================================
   STATUS DROPDOWN
   ============================================ */
.status-dropdown {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 50;
    min-width: 160px;
    animation: fadeIn 0.15s ease;
}

.status-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s;
}

.status-dropdown-item:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
}

.settings-item-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
}

.settings-item-remove:hover {
    color: var(--accent-red);
}

.settings-add-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.settings-add-input input {
    flex: 1;
}

/* ============================================
   FILTER COUNT BADGES
   ============================================ */
.filter-count {
    background: var(--accent-blue);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.3rem;
}

.next-steps-cell {
    max-width: 200px;
}

.next-steps-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actions-cell {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.actions-cell .btn-icon.btn-small {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.modal-body {
    padding: 1.75rem;
}

.form-section {
    margin-bottom: 1.75rem;
}

.form-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--accent-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
}

.form-group textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.5;
}

.form-group small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* ============================================
   VIEW DEAL MODAL
   ============================================ */
.view-modal {
    max-width: 700px;
}

.view-header {
    padding: 2rem;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
}

.view-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.view-header-content {
    position: relative;
    z-index: 1;
}

.view-partner-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.view-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.view-badges .status-badge,
.view-badges .model-badge,
.view-badges .geo-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.view-body {
    padding: 2rem;
}

.view-section {
    margin-bottom: 2rem;
}

.view-section:last-child {
    margin-bottom: 0;
}

.view-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-section-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.view-section-content.empty {
    color: var(--text-muted);
    font-style: italic;
}

.view-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.view-meta-item {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-width: 0;
}

.view-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.view-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
}

.view-meta-value a {
    word-break: break-all;
}

.view-footer {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

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

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    margin-bottom: 1.25rem;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.5rem;
    min-width: 140px;
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(20px, 20px);
}

.stat-total::before { background: var(--gradient-1); }
.stat-total::after { background: var(--accent-blue); }
.stat-live::before { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.stat-live::after { background: var(--accent-green); }
.stat-pending::before { background: var(--accent-yellow); }
.stat-pending::after { background: var(--accent-yellow); }
.stat-rejected::before { background: var(--accent-red); }
.stat-rejected::after { background: var(--accent-red); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
}

.stat-total .stat-value { color: var(--accent-blue); }
.stat-live .stat-value { color: var(--accent-green); }
.stat-pending .stat-value { color: var(--accent-yellow); }
.stat-rejected .stat-value { color: var(--accent-red); }

/* ============================================
   CHARTS ROW
   ============================================ */
.charts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    min-height: 160px;
}

.chart-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-bar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
    white-space: nowrap;
}

.chart-bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
}

.chart-bar-value {
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.bar-blue { background: var(--accent-blue); }
.bar-green { background: var(--accent-green); }
.bar-yellow { background: var(--accent-yellow); }
.bar-purple { background: var(--accent-purple); }
.bar-orange { background: var(--accent-orange); }
.bar-red { background: var(--accent-red); }
.bar-cyan { background: var(--accent-cyan); }
.bar-pink { background: var(--accent-pink); }

/* ============================================
   ONLINE USERS
   ============================================ */
.online-users {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.online-count {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-weight: 500;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success { border-left: 4px solid var(--accent-green); }
.toast-error { border-left: 4px solid var(--accent-red); }
.toast-info { border-left: 4px solid var(--accent-blue); }

/* ============================================
   LOADING STATES
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
    gap: 1.5rem;
}

.loading-overlay.hidden {
    display: none;
}

.loading-overlay p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Table Loading Skeleton */
.table-loading {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-cell {
    height: 40px;
    flex: 1;
}

.skeleton-cell-sm {
    width: 60px;
    height: 40px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ============================================
   KEYBOARD SHORTCUTS HINT
   ============================================ */
.keyboard-hint {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    z-index: 50;
}

.keyboard-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 900px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions button {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .online-users {
        font-size: 0.7rem;
    }

    .stats-bar {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem 1rem;
        min-width: 70px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }

    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }

    .view-meta {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .view-meta-item {
        padding: 0.65rem;
        overflow: hidden;
    }
    
    .view-meta-value {
        font-size: 0.85rem;
    }

    .modal {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .view-modal {
        max-width: 100%;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .keyboard-hint {
        display: none;
    }

    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        width: 100%;
    }
}

/* ============================================
   MOBILE CARDS VIEW
   ============================================ */
.mobile-cards {
    display: none;
}

@media (max-width: 600px) {
    .table-container table {
        display: none;
    }

    .table-container {
        overflow-x: visible;
    }

    .mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-card {
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1rem;
        position: relative;
        overflow: hidden;
        transition: all 0.2s ease;
    }
    
    .mobile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--gradient-1);
        opacity: 0.5;
    }
    
    .mobile-card:active {
        transform: scale(0.98);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }

    .mobile-card-title {
        font-weight: 700;
        font-size: 1rem;
        color: var(--text-primary);
    }

    .mobile-card-id {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.7rem;
        font-weight: 700;
        color: #1e1e2e;
        background: #fbbf24;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        border: 1px solid #f59e0b;
    }

    .mobile-card-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .mobile-card-badges .geo-badge,
    .mobile-card-badges .model-badge,
    .mobile-card-badges .status-badge,
    .mobile-card-badges .source-badge,
    .mobile-card-badges .assigned-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .mobile-card-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin-bottom: 0.75rem;
    }

    .mobile-card-info-item {
        display: flex;
        flex-direction: column;
    }

    .mobile-card-info-label {
        font-size: 0.65rem;
        color: var(--text-muted);
        text-transform: uppercase;
        font-weight: 600;
    }

    .mobile-card-actions {
        display: flex;
        gap: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .mobile-card-actions button {
        flex: 1;
        font-size: 0.8rem;
    }

    .view-meta {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .view-meta-item {
        padding: 0.6rem;
    }
    
    .view-meta-value {
        font-size: 0.85rem;
    }
    
    .view-body {
        padding: 1rem;
    }
    
    .view-header {
        padding: 1rem;
    }
    
    .view-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .network-sources-display {
        gap: 0.4rem;
    }
    
    .network-source-view-item {
        padding: 0.4rem;
    }

    .charts-row {
        grid-template-columns: 1fr 1fr;
    }

    .chart-card {
        min-height: 120px;
        padding: 0.75rem;
    }

    .chart-title {
        font-size: 0.65rem;
    }

    .chart-bar-label {
        font-size: 0.6rem;
        min-width: 50px;
    }
}

@media (max-width: 400px) {
    .charts-row {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-width: 60px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .bulk-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   AUTHENTICATION STYLES
   ============================================ */

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 72px;
    height: 72px;
    background: var(--gradient-1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.3);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 0.25rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form-group {
    margin-bottom: 1rem;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.auth-form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

.auth-form-group input::placeholder {
    color: var(--text-muted);
}

.auth-submit {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth Message */
.auth-message {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.auth-message.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Forgot Password */
.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s;
    width: 0%;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--accent-red);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--accent-yellow);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--accent-green);
}

.password-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-admin {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.role-manager {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.role-viewer {
    background: rgba(96, 96, 112, 0.15);
    color: var(--text-muted);
}

/* Users Management Modal */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s;
}

.user-item:hover {
    border-color: var(--border-light);
}

.user-item-delete {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.user-item-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Role Info Card */
.roles-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.roles-info-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-info-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.role-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.role-info-badge {
    flex-shrink: 0;
    width: 70px;
}

.role-info-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Confirm Delete Modal */
.confirm-delete-user {
    text-align: center;
    padding: 1rem 0;
}

.confirm-delete-user p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.confirm-delete-user strong {
    color: var(--text-primary);
}

.confirm-delete-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.user-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-item-info {
    flex: 1;
    min-width: 0;
}

.user-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-item-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}

.user-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-item-actions select {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Mobile Auth */
@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .user-info {
        padding: 0.4rem 0.75rem;
    }
    
    .user-details {
        display: none;
    }
}

/* ============================================
   NOTES & NOTIFICATIONS SYSTEM
   ============================================ */

/* Note Button */
.btn-note {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.3);
    position: relative;
}

.btn-note:hover {
    background: rgba(249, 115, 22, 0.25);
    border-color: var(--accent-orange);
}

.btn-note.has-notes::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Notes indicator on partner name */
.notes-indicator {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.75rem;
    animation: pulse 2s infinite;
    cursor: help;
}

/* Inbox Button in Header */
.btn-inbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-orange);
    box-sizing: border-box;
}


.btn-inbox:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(239, 68, 68, 0.15) 100%);
    border-color: var(--accent-orange);
    transform: translateY(-1px);
}

.btn-inbox.has-unread {
    animation: inboxPulse 2s ease infinite;
}

@keyframes inboxPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50% { box-shadow: 0 0 20px 8px rgba(249, 115, 22, 0.25); }
}

.inbox-count {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

/* (Blocker styles removed - using Inbox instead) */

/* Notes Panel in View Modal */
.notes-section {
    margin-top: 1.5rem;
}

.notes-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.notes-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.note-card:hover {
    border-color: var(--border-light);
}

.note-card.note-done {
    opacity: 0.6;
    border-left: 4px solid var(--accent-green);
}

.note-card.note-active {
    border-left: 4px solid var(--accent-orange);
}

.note-main {
    padding: 1rem;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.note-author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.note-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.note-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.note-status.status-active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
}

.note-status.status-done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
}

.note-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Note Replies */
.note-replies {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.note-reply {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.note-reply:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.note-reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.note-reply-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.note-reply-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.note-reply-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Reply Input */
.note-reply-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.note-reply-input input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Create Note Modal */
.create-note-form .form-group {
    margin-bottom: 1rem;
}

.create-note-form textarea {
    min-height: 120px;
    resize: vertical;
}

.recipient-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recipient-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.recipient-option:hover {
    border-color: var(--accent-blue);
}

.recipient-option:has(input:checked) {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--accent-blue);
}

.recipient-option input {
    accent-color: var(--accent-blue);
}

/* Notes Empty State */
.notes-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.notes-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Notes list scroll */
.notes-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Note buttons */
.note-actions .btn-small {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--accent-green);
}

/* ============================================
   NOTE POPUP (on note button click)
   ============================================ */

.note-popup {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 1000;
    width: 380px;
    max-width: 95vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: popupSlideIn 0.2s ease;
}

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

.note-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 16px 16px 0 0;
}

.note-popup-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-popup-badge {
    background: var(--accent-orange);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.note-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
}

.note-popup-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.note-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.note-popup-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.note-popup-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.note-popup-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.5rem;
}

.note-popup-item:last-child {
    margin-bottom: 0;
}

.note-popup-item.note-active {
    border-left: 3px solid var(--accent-orange);
}

.note-popup-item.note-done {
    border-left: 3px solid var(--accent-green);
    opacity: 0.7;
}

.note-popup-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.note-popup-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.note-popup-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
}

.note-popup-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.note-popup-message {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-popup-replies-count {
    font-size: 0.75rem;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.note-popup-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.note-popup-actions .btn-small {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
}

.note-popup-done-info {
    font-size: 0.75rem;
    color: var(--accent-green);
    margin-top: 0.5rem;
}

.note-popup-reply-input {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.note-popup-reply-input input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.note-popup-more {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem;
}

.note-popup-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 0 0 16px 16px;
}

.note-popup-footer .btn-primary {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.85rem;
}

/* (Countdown timer styles removed) */

/* Note Button Blinking Animation */
.btn-note.has-notes {
    animation: noteButtonBlink 1.5s ease-in-out infinite;
}

@keyframes noteButtonBlink {
    0%, 100% { 
        background: rgba(249, 115, 22, 0.15);
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% { 
        background: rgba(249, 115, 22, 0.35);
        box-shadow: 0 0 15px 5px rgba(249, 115, 22, 0.3);
    }
}

/* Mobile Note Popup */
@media (max-width: 600px) {
    .note-popup {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        width: 95vw;
        max-height: 85vh;
    }
}

/* ============================================
   INBOX MODAL
   ============================================ */

.inbox-modal {
    max-width: 600px;
    width: 95%;
}

.inbox-header-count {
    background: var(--accent-orange);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

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

.inbox-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.inbox-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.inbox-note {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.inbox-note-active {
    border-left: 4px solid var(--accent-orange);
}

.inbox-note-done {
    border-left: 4px solid var(--accent-green);
    opacity: 0.7;
}

.inbox-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.inbox-note-deal {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-blue);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
    transition: all 0.15s;
}

.inbox-note-deal:hover {
    background: rgba(74, 158, 255, 0.2);
}

.inbox-note-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.inbox-note-body {
    display: flex;
    gap: 0.75rem;
}

.inbox-note-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.inbox-note-content {
    flex: 1;
}

.inbox-note-author {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.inbox-note-message {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.inbox-note-replies {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.inbox-reply {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
}

.inbox-reply strong {
    color: var(--accent-purple);
}

.inbox-reply-more {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.inbox-note-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.inbox-reply-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.inbox-reply-form input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.inbox-note-completed {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-green);
}

/* Mobile Inbox */
@media (max-width: 600px) {
    .inbox-modal {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .inbox-reply-form {
        min-width: 100%;
    }
}

/* Mobile Notes */
@media (max-width: 600px) {
    .notes-blocker-content {
        max-width: 100%;
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .notes-blocker-header {
        padding: 1rem 1.25rem;
    }
    
    .notes-blocker-body {
        padding: 1rem 1.25rem;
    }
    
    .notes-blocker-footer {
        padding: 1rem 1.25rem;
    }
    
    .btn-understood {
        width: 100%;
        padding: 1rem;
    }
}

/* ============================================
   PERFORMANCE DASHBOARD
   ============================================ */

/* Performance Button */
.btn-performance {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-cyan) 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-performance::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-performance:hover::before {
    left: 100%;
}

.btn-performance:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.4);
}

/* Performance Modal */
.performance-modal {
    max-width: 900px;
    width: 95%;
}

.perf-import-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.perf-import-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Summary Cards */
.perf-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.perf-summary-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.perf-summary-card.positive {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.perf-summary-card.negative {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.perf-summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.perf-summary-card.positive .perf-summary-value {
    color: var(--accent-green);
}

.perf-summary-card.negative .perf-summary-value {
    color: var(--accent-red);
}

.perf-summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Tabs */
.perf-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.perf-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.perf-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.perf-tab.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.perf-tab-content {
    display: none;
}

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

.perf-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Performance Table */
.perf-table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.perf-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.perf-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.perf-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.perf-table tbody tr.row-positive {
    background: rgba(34, 197, 94, 0.05);
}

.perf-table tbody tr.row-negative {
    background: rgba(239, 68, 68, 0.05);
}

.perf-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

.perf-table .rank {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 40px;
}

.perf-partner-name {
    font-weight: 600;
    color: var(--text-primary);
}

.perf-partner-id {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.perf-table .metric {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    text-align: right;
}

.perf-table .metric.positive {
    color: var(--accent-green);
}

.perf-table .metric.negative {
    color: var(--accent-red);
}

.perf-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* Mobile Performance */
@media (max-width: 768px) {
    .perf-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .perf-summary-value {
        font-size: 1.25rem;
    }
    
    .perf-tabs {
        gap: 0.35rem;
    }
    
    .perf-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .performance-modal {
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .perf-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .perf-summary-card {
        padding: 0.75rem;
    }
    
    .perf-summary-value {
        font-size: 1rem;
    }
}

/* ============================================
   MONDAY REMINDER
   ============================================ */

.performance-reminder {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-green);
    border-radius: 16px;
    padding: 1.25rem;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 20px rgba(34, 197, 94, 0.2);
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
}

.performance-reminder.visible {
    transform: translateX(0);
    opacity: 1;
}

.perf-reminder-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.perf-reminder-content {
    flex: 1;
}

.perf-reminder-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.perf-reminder-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.perf-reminder-last {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.perf-reminder-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.perf-reminder-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.perf-reminder-close:hover {
    color: var(--text-primary);
}

/* Mobile Reminder */
@media (max-width: 480px) {
    .performance-reminder {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .perf-reminder-actions {
        flex-direction: column;
    }
    
    .perf-reminder-actions .btn-small {
        width: 100%;
    }
}

/* ============================================
   REMEMBER ME & AUTH OPTIONS
   ============================================ */

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.remember-me span {
    transition: color 0.15s;
}

.remember-me:hover span {
    color: var(--text-primary);
}

/* ============================================
   INBOX EMPTY STATE
   ============================================ */

.btn-inbox.inbox-no-messages {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    animation: none;
}

.btn-inbox.inbox-no-messages:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-inbox.inbox-no-messages .inbox-count {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

/* ============================================
   NOTE REPLIES IN VIEW MODE
   ============================================ */

.note-replies {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.note-replies-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.note-reply-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.note-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.note-reply-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-reply-content {
    flex: 1;
    min-width: 0;
}

.note-reply-avatar {
    width: 28px;
    height: 28px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.note-reply-content {
    flex: 1;
    min-width: 0;
}

.note-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.note-reply-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.note-reply-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.note-reply-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   LOAD MORE BUTTONS
   ============================================ */

.notes-load-more {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.notes-load-more button {
    padding: 0.6rem 1.5rem;
}

.load-more-replies {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    transition: color 0.15s;
}

.load-more-replies:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.btn-link {
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================
   INBOX REPLY STYLES (Enhanced)
   ============================================ */

.inbox-note-replies {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.inbox-reply {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 6px;
    margin-bottom: 0.35rem;
}

.inbox-reply strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

.inbox-reply-more {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0.25rem 0.75rem;
}

/* ============================================
   AFFILKA SYNC STATUS
   ============================================ */

.sync-affilka {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: default;
}

.sync-affilka-icon {
    font-size: 0.85rem;
}

.sync-affilka.sync-ok {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.sync-affilka.sync-ok .sync-affilka-icon {
    animation: none;
}

.sync-affilka.sync-pending {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.sync-affilka.sync-error {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ============================================
   AFFILKA STATS COLUMNS
   ============================================ */

.stat-ftd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 0.25rem 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-ngr {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(74, 158, 255, 0.15);
    color: var(--accent-blue);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-pending {
    color: var(--text-muted);
    font-style: italic;
}

.affilka-col {
    text-align: center;
}

/* ============================================
   MOBILE CARD STATS
   ============================================ */

.mobile-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin: 0.75rem 0;
}

.mobile-stat {
    text-align: center;
}

.mobile-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.mobile-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

.crm-id-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   LIVE PERFORMANCE BADGE
   ============================================ */

.sync-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: livePulse 2s ease infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.perf-month-label {
    background: var(--accent-purple);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.perf-summary-card.highlight {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: var(--accent-blue);
}

.perf-summary-card.highlight .perf-summary-value {
    color: var(--accent-blue);
}

/* ============================================
   RESPONSIVE - HIDE ON MOBILE
   ============================================ */

@media (max-width: 900px) {
    .hide-mobile {
        display: none !important;
    }
    
    .affilka-col {
        font-size: 0.8rem;
    }
    
    .stat-ftd, .stat-ngr {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 600px) {
    .mobile-card-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sync-affilka {
        display: none;
    }
    
    .perf-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .perf-tabs {
        flex-wrap: wrap;
    }
    
    .perf-tab {
        flex: 1 1 45%;
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}

/* ============================================
   NOTE MENU (Edit/Delete)
   ============================================ */

.note-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inbox-note-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Note Edit/Delete Inline Buttons */
.note-actions-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-note-action {
    background: none;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: all 0.15s;
    opacity: 0.6;
}

.btn-note-action:hover {
    background: var(--bg-tertiary);
    opacity: 1;
}

.btn-note-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

.note-menu {
    position: relative;
}

.note-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
}

.note-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.note-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 120px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.note-menu-dropdown.active {
    display: block;
}

.note-menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.note-menu-dropdown button:hover {
    background: var(--bg-tertiary);
}

.note-menu-dropdown button.danger {
    color: var(--accent-red);
}

.note-menu-dropdown button.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   REPLY FORM IN VIEW MODE
   ============================================ */

.note-reply-form-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.note-reply-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.note-reply-input-wrapper input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
}

.note-reply-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.note-reply-input-wrapper button {
    white-space: nowrap;
}

/* ============================================
   @MENTION SYSTEM
   ============================================ */

.mention {
    color: var(--accent-cyan);
    font-weight: 600;
    background: rgba(6, 182, 212, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.mention-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 4px;
}

.mention-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.mention-suggestion:hover {
    background: var(--bg-tertiary);
}

.mention-suggestion-name {
    font-weight: 600;
    color: var(--accent-cyan);
}

.mention-suggestion-type {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Note actions update */
.note-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ============================================
   SYNC BUTTON & WRAPPER
   ============================================ */

.sync-affilka-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sync {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-sync:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-sync:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   EXPORT DROPDOWN
   ============================================ */

.export-dropdown-wrapper {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 0.25rem;
    transition: transform 0.2s;
}

.export-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    min-width: 160px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.export-dropdown.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

.export-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.export-dropdown button:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   SOURCE BADGE WITH TEXT
   ============================================ */

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
    white-space: nowrap;
}

.source-badge.network {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

/* ============================================
   MORE STATS COLUMNS
   ============================================ */

.stat-visits {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-regs {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    color: var(--accent-purple);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-conversion {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.stat-conversion.good {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-green);
}

.stat-conversion.ok {
    background: rgba(234, 179, 8, 0.2);
    color: var(--accent-yellow);
}

.stat-conversion.low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.stat-ngr.positive {
    color: var(--accent-green);
}

.stat-ngr.negative {
    color: var(--accent-red);
}

.hide-tablet {
    display: table-cell;
}

@media (max-width: 1100px) {
    .hide-tablet {
        display: none !important;
    }
}

/* ============================================
   LIVE PERFORMANCE SECTION (HOMEPAGE)
   ============================================ */

.live-performance-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.live-perf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.live-perf-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.live-perf-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: livePulse 2s ease infinite;
}

.live-perf-period {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.live-perf-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.live-perf-stat {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.live-perf-stat.highlight {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.live-perf-stat.profit {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.live-perf-stat.loss {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.live-perf-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.live-perf-stat.highlight .live-perf-stat-value {
    color: var(--accent-green);
}

.live-perf-stat.profit .live-perf-stat-value {
    color: var(--accent-green);
}

.live-perf-stat.loss .live-perf-stat-value {
    color: var(--accent-red);
}

.live-perf-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.live-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.live-perf-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.live-perf-card-header {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.live-perf-card-body {
    padding: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.live-perf-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.live-perf-row:hover {
    background: var(--bg-secondary);
}

.live-perf-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 20px;
}

.live-perf-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-perf-value {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.live-perf-value.ftd {
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.live-perf-value.ngr.positive {
    color: var(--accent-green);
}

.live-perf-value.ngr.negative {
    color: var(--accent-red);
}

.live-perf-no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.live-perf-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   AFFILKA STATS IN VIEW MODE
   ============================================ */

.affilka-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.affilka-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}

.affilka-stat-card.highlight-ftd {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.affilka-stat-card.highlight-good {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.affilka-stat-card.highlight-low {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.affilka-stat-card.highlight-profit {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.affilka-stat-card.highlight-loss {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.affilka-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.affilka-stat-card.highlight-ftd .affilka-stat-value,
.affilka-stat-card.highlight-good .affilka-stat-value,
.affilka-stat-card.highlight-profit .affilka-stat-value {
    color: var(--accent-green);
}

.affilka-stat-card.highlight-low .affilka-stat-value,
.affilka-stat-card.highlight-loss .affilka-stat-value {
    color: var(--accent-red);
}

.affilka-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.affilka-stats-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.affilka-stats-footer strong {
    color: var(--accent-cyan);
}

/* ============================================
   MOBILE RESPONSIVE - LIVE PERFORMANCE
   ============================================ */

@media (max-width: 900px) {
    .live-perf-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .live-perf-grid {
        grid-template-columns: 1fr;
    }
    
    .affilka-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sync-affilka-wrapper {
        order: -1;
    }
}

@media (max-width: 600px) {
    .live-performance-section {
        padding: 1rem;
    }
    
    .live-perf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .live-perf-stat {
        padding: 0.75rem 0.5rem;
    }
    
    .live-perf-stat-value {
        font-size: 1.25rem;
    }
    
    .affilka-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .affilka-stat-card {
        padding: 0.5rem;
    }
    
    .affilka-stat-value {
        font-size: 1rem;
    }
    
    .affilka-stats-footer {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-sync {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .export-dropdown-wrapper {
        display: none;
    }
}

