/* CORE SYSTEM DESIGN TOKENS */
:root {
    /* LIGHT MODE (Mockup default) */
    --bg-page: #f8fafc;        /* Slate 50 (Very light gray-blue) */
    --bg-card: #ffffff;        /* Clean white cards */
    --bg-banner: #0a0d14;      /* Deep dark slate header banner */
    --bg-stat-card: #121824;   /* Translucent dark cards in banner */
    
    --border-color: rgba(0, 0, 0, 0.05);
    --border-banner: rgba(255, 255, 255, 0.05);

    --text-primary: #0f172a;   /* Slate 900 */
    --text-secondary: #64748b; /* Slate 500 */
    
    --text-banner-primary: #ffffff;
    --text-banner-secondary: #94a3b8; /* Slate 400 */
    
    --accent-purple: #8b5cf6;  /* Purple matching active toggle/badges */
    --accent-yellow: #eab308;  /* Amber/yellow */
    --accent-green: #10b981;   /* Emerald green */
    --accent-pink: #ec4899;    /* Pink/red for cancel status */
    
    --font-family: 'Inter', sans-serif;
    --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.015), 0 1px 3px rgba(0, 0, 0, 0.01);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* DARK MODE OVERRIDES */
body.dark-theme {
    --bg-page: #070a13;
    --bg-card: #0f1320;
    --bg-banner: #05070c;
    --bg-stat-card: #0b0e17;
    
    --border-color: rgba(255, 255, 255, 0.05);
    --border-banner: rgba(255, 255, 255, 0.03);

    --text-primary: #f8fafc;   /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 25px 40px rgba(0, 0, 0, 0.45);
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* TOP DARK BANNER */
.top-banner {
    background-color: var(--bg-banner);
    border-bottom: 1px solid var(--border-banner);
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    padding: 24px 0 44px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.banner-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 32px;
}

/* NAVIGATION HEADER */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.35);
}

.logo-text {
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.5px;
    color: var(--text-banner-primary);
}

/* Center menu links exactly like mockup */
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 4px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-item {
    color: var(--text-banner-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-banner-primary);
}

.nav-item.active {
    color: var(--text-banner-primary);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

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

.nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-banner-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-banner-primary);
}

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

.spinning {
    animation: spin 0.8s linear infinite;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* PAGE TITLE ROW */
.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.title-row h1 {
    color: var(--text-banner-primary);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--accent-green);
    background-color: rgba(16, 185, 129, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(0.95); opacity: 1; }
}

/* KPI METRICS CARDS INSIDE BANNER (Mockup Layout) */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    background-color: var(--bg-stat-card);
    border: 1px solid var(--border-banner);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent);
}

.stat-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1;
}

.stat-label {
    color: var(--text-banner-secondary);
    font-size: 13.5px;
    font-weight: 500;
}

.stat-card h3 {
    color: var(--text-banner-primary);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
}

.stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.stat-purple { background-color: #8b5cf6; color: #ffffff; }
.stat-yellow { background-color: #f59e0b; color: #ffffff; }
.stat-green { background-color: #10b981; color: #ffffff; }
.stat-pink { background-color: #ec4899; color: #ffffff; }

/* MAIN BODY GRID */
.main-body {
    max-width: 1360px;
    margin: 40px auto;
    padding: 0 32px;
}

.body-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
}

/* FILTERS SIDEBAR */
.filters-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px 24px;
    align-self: flex-start;
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.4px;
}

.filter-group {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.group-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

/* CUSTOM CHECKBOX (Mockup Style) */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    color: var(--text-primary);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 19px;
    width: 19px;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .checkmark {
    background-color: rgba(255, 255, 255, 0.02);
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: rgba(0, 0, 0, 0.06);
    border-color: var(--text-secondary);
}

body.dark-theme .custom-checkbox:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.06);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid var(--bg-card);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* CUSTOM RADIO */
.custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    color: var(--text-primary);
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radiomark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 19px;
    width: 19px;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.25s ease;
}

body.dark-theme .radiomark {
    background-color: rgba(255, 255, 255, 0.02);
}

.custom-radio input:checked ~ .radiomark {
    background-color: var(--bg-card);
    border-color: var(--text-primary);
    border-width: 5px;
}

/* PREMIUM IOS TOGGLE SWITCH */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.06);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

body.dark-theme .slider {
    background-color: rgba(255, 255, 255, 0.06);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.switch input:checked + .slider {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* SIDEBAR SEARCH */
.filter-group-toggle span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: block;
}

.sidebar-search input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    outline: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.dark-theme .sidebar-search input {
    background-color: rgba(255, 255, 255, 0.01);
}

.sidebar-search input:focus {
    border-color: var(--text-primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.02);
}

/* LEADS SECTION */
.leads-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.section-header h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.leads-count {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.03);
    padding: 4px 10px;
    border-radius: 20px;
}

body.dark-theme .leads-count {
    background-color: rgba(255, 255, 255, 0.03);
}

/* LEADS GRID (2-Column clean cards mockup layout) */
.leads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* GUEST LEAD CARD (Highly Compact layout to prevent clutter with 10k users) */
.lead-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(0, 0, 0, 0.08);
}

body.dark-theme .lead-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

/* Selected State */
.lead-card.selected {
    border-color: var(--accent-purple);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

/* CARD HEADER */
.lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.user-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

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

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

.user-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

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

.status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.1px;
}

.pill-yangi { background-color: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.pill-jarayonda { background-color: rgba(245, 158, 11, 0.08); color: #d97706; }
.pill-yakunlagan { background-color: rgba(16, 185, 129, 0.08); color: #059669; }
.pill-blok { background-color: rgba(239, 68, 68, 0.08); color: #dc2626; }

/* TWO-COLUMN FIELDS WRAPPER */
.lead-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 10px;
}

body.dark-theme .lead-fields {
    background-color: rgba(255, 255, 255, 0.01);
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* COMPACT LEAD PROGRESS LINE (New compact UI indicator) */
.lead-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 2px 0;
}

.lead-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.lead-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    overflow: hidden;
}

body.dark-theme .lead-progress-bar {
    background: rgba(255, 255, 255, 0.03);
}

.lead-progress-fill {
    height: 100%;
    background: var(--accent-purple);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* COMPACT DETAILS TRIGGER ACTION BUTTON */
.btn-card-compact-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-card-compact-trigger:hover {
    border-color: var(--text-primary);
    background-color: var(--text-primary);
    color: var(--bg-card);
}

/* FULL DETAILED CARD INSIDE MODAL (Matches 2nd image design perfectly!) */
.modal-full-card {
    background-color: var(--bg-card);
    border: 2px solid var(--accent-purple);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

.modal-full-card .menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-full-card .menu-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.modal-full-card .menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-full-card .menu-item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}

.modal-full-card .menu-item-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.modal-full-card .menu-item-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-full-card .menu-item-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-full-card .menu-item-qty {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.03);
    padding: 2px 6px;
    border-radius: 4px;
}

body.dark-theme .modal-full-card .menu-item-qty {
    background-color: rgba(255, 255, 255, 0.03);
}

.modal-full-card .more-items-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: right;
}

/* Modal notes block */
.modal-full-card .question-box {
    background-color: rgba(0, 0, 0, 0.015);
    border-left: 3px solid var(--text-primary);
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.dark-theme .modal-full-card .question-box {
    background-color: rgba(255, 255, 255, 0.01);
    border-left-color: var(--text-banner-secondary);
}

.modal-full-card .question-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-full-card .question-ans {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
}

.modal-full-card .btn-card-details {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-card);
    border: 1.5px solid var(--text-primary);
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.modal-full-card .btn-card-details:hover {
    opacity: 0.9;
}

/* MODAL WINDOW SYSTEM */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 13, 20, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    background: transparent;
    position: relative;
    padding: 10px;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content-form {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: var(--hover-shadow);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 100;
}

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

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* TAB CONTENT UTILITY */
.tab-content-hidden {
    display: none !important;
}

/* BOSHQRUV (DASHBOARD) TAB STYLES */
.dashboard-overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.info-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.action-btn-primary {
    background: var(--text-primary);
    color: var(--bg-card);
    border: 1px solid var(--text-primary);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn-primary:hover {
    opacity: 0.9;
}

.recent-status-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.status-box-header h4 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.keywords-grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .keywords-grid-list {
        grid-template-columns: 1fr;
    }
}

.keyword-badge-item {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-theme .keyword-badge-item {
    background: rgba(255, 255, 255, 0.01);
}

.keyword-badge-val {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.keyword-badge-action {
    font-size: 12px;
    color: var(--accent-purple);
    cursor: pointer;
    font-weight: 600;
}

/* DARSLAR (LESSONS) TAB STYLES */
.lessons-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .lessons-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .lessons-grid-container {
        grid-template-columns: 1fr;
    }
}

.lesson-manage-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lesson-manage-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.lesson-manage-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lesson-manage-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.lesson-manage-header span {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.lesson-manage-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    height: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.lesson-actions {
    display: flex;
    gap: 10px;
}

.btn-edit-lesson {
    flex: 1;
    background: rgba(0,0,0,0.015);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12.5px;
    text-align: center;
    transition: all 0.2s;
}

body.dark-theme .btn-edit-lesson {
    background: rgba(255,255,255,0.01);
}

.btn-edit-lesson:hover {
    border-color: var(--text-primary);
    background-color: var(--text-primary);
    color: var(--bg-card);
}

.btn-delete-lesson {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.1);
    color: var(--accent-pink);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12.5px;
    text-align: center;
    transition: all 0.2s;
}

.btn-delete-lesson:hover {
    background: var(--accent-pink);
    color: white;
    border-color: var(--accent-pink);
}

/* RASSILKA (BROADCAST) TAB STYLES */
.broadcast-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .broadcast-layout {
        grid-template-columns: 1fr;
    }
}

.broadcast-form-card, .broadcast-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.broadcast-form-card h3, .broadcast-status-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.broadcast-form-card .subtext {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    font-size: 13.5px;
    transition: border-color 0.2s;
}

body.dark-theme .form-group input, body.dark-theme .form-group textarea {
    background: rgba(255, 255, 255, 0.01);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--text-primary);
}

.queue-status-metric {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.metric-label {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-bar-container {
    height: 8px;
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
    overflow: hidden;
}

body.dark-theme .progress-bar-container {
    background: rgba(255,255,255,0.04);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-purple);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.queue-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* LIVE LOGS TAB */
.logs-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

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

.live-dot-glowing {
    width: 8px;
    height: 8px;
    background-color: var(--accent-pink);
    border-radius: 50%;
    animation: glow 1.2s infinite;
}

@keyframes glow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(236, 72, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.live-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-pink);
    background-color: rgba(236, 72, 153, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
}

.logs-container {
    height: 60vh;
    overflow-y: auto;
    padding: 16px 24px;
}

.log-item {
    font-size: 13.5px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 12.5px;
}

.log-user {
    font-weight: 600;
    color: var(--text-primary);
}

.log-action-text {
    font-weight: 600;
    color: var(--accent-purple);
}

.placeholder-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1024px) {
    .body-grid {
        grid-template-columns: 1fr;
    }
    .leads-grid {
        grid-template-columns: 1fr;
    }
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    .nav-header {
        flex-direction: column;
        gap: 16px;
    }
    .banner-container {
        padding: 0 16px;
    }
    .main-body {
        padding: 0 16px;
    }
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
}
body.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}
body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Image upload widget styling */
.image-upload-wrapper {
    position: relative;
    width: 100%;
}

.image-upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
    background: rgba(0, 0, 0, 0.015);
}

body.dark-theme .image-upload-dropzone {
    background: rgba(255, 255, 255, 0.005);
}

.image-upload-dropzone:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.02);
}

.image-upload-dropzone svg {
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.image-upload-dropzone:hover svg {
    color: var(--accent-purple);
}

.upload-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-subtext {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.image-preview-container {
    position: relative;
    width: 100%;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-preview-container img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-image-btn:hover {
    background: rgba(15, 23, 42, 0.9);
}

/* Lesson card thumbnail styling */
.lesson-manage-thumbnail {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

body.dark-theme .lesson-manage-thumbnail {
    background: rgba(255, 255, 255, 0.01);
}

.lesson-manage-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lesson-manage-thumbnail.telegram-file-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
}

.lesson-manage-thumbnail.telegram-file-id span {
    font-size: 11px;
    font-weight: 500;
}

/* Custom select component */
.custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    font-size: 13.5px;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
}

body.dark-theme .custom-select {
    background-color: rgba(255, 255, 255, 0.01);
}

.custom-select:focus {
    border-color: var(--accent-purple);
}

/* Mobile filter toggle button - hidden on desktop */
.mobile-filter-toggle-btn {
    display: none;
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
    display: none; /* Hidden on desktop */
}

@media (max-width: 640px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 6px);
    }
    
    body.dark-theme .bottom-nav {
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 10px;
        font-weight: 500;
        flex: 1;
        height: 100%;
        transition: color 0.15s ease;
    }

    .bottom-nav-item svg {
        transition: transform 0.2s, color 0.15s;
    }

    .bottom-nav-item:hover svg {
        transform: translateY(-1px);
    }

    .bottom-nav-item.active {
        color: var(--accent-purple);
    }

    /* Adjust page wrapper padding to prevent content overlapping bottom navigation */
    .dashboard-wrapper {
        padding-bottom: 74px; /* Space for fixed bottom nav */
    }

    /* Hide the top header navigation links on mobile */
    .nav-links {
        display: none !important;
    }

    /* Mobile filter button */
    .mobile-filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        border-radius: 12px;
        padding: 12px;
        font-family: inherit;
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s;
        margin-bottom: 16px;
    }

    .mobile-filter-toggle-btn:active {
        background: rgba(0, 0, 0, 0.02);
    }
    
    body.dark-theme .mobile-filter-toggle-btn:active {
        background: rgba(255, 255, 255, 0.02);
    }

    /* Hide filters sidebar by default on mobile */
    .filters-sidebar {
        display: none;
        width: 100%;
        margin-bottom: 24px;
        animation: slideDown 0.2s ease-out;
        box-shadow: none;
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 20px;
    }

    .filters-sidebar.show-filters {
        display: block;
    }

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

    /* Restructure stats widgets on mobile to compact 2x2 grid */
    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-top: 20px !important;
    }

    .stat-card {
        padding: 14px 16px !important;
        border-radius: 14px !important;
        gap: 8px !important;
    }

    .stat-meta h3 {
        font-size: 20px !important;
    }

    .stat-label {
        font-size: 11px !important;
    }

    /* Mobile details card and uploader padding improvements */
    .leads-section {
        margin-top: 12px;
    }

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

    /* Native Bottom Sheet Drawer on Mobile */
    .modal-backdrop {
        align-items: flex-end !important;
    }

    .modal-content, .modal-content-form {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 24px 24px 0 0 !important;
        padding: 24px 16px 40px 16px !important;
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        border-bottom: none !important;
        border-left: none !important;
        border-right: none !important;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}
