/* ========================================
   SYSTEM / DASHBOARD - Tizim boshqaruvi
   Banner, stats, services, news, bottom nav, chat
   ======================================== */

/* Banner */
.banner {
    margin: 16px 20px;
    padding: 24px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banner-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.banner-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 20px;
    max-width: 80%;
    line-height: 1.4;
}

/* Stats */
.stats-container {
    padding: 0 20px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    background: white;
    padding: 16px 10px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Services Grid */
.grid {
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.service-card {
    background: var(--surface);
    padding: 24px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.service-card:active {
    transform: scale(0.97);
    background: #f1f5f9;
}

.service-card span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.service-card:hover .card-icon {
    transform: translateY(-4px);
}

.card-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.card-icon.green {
    background: #ecfdf5;
    color: #10b981;
}

.card-icon.orange {
    background: #fff7ed;
    color: #f97316;
}

.card-icon.purple {
    background: #faf5ff;
    color: #a855f7;
}

/* News */
.news-item {
    background: var(--surface);
    margin: 0 20px 12px;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.news-thumb {
    width: 80px;
    height: 80px;
    background: #e2e8f0;
    border-radius: 12px;
    flex-shrink: 0;
}

.news-info h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

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

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-item.active {
    color: #ffffff;
}

.nav-item .icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

/* AI Chat */
.chat-container {
    height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #f1f5f9;
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.message.ai {
    background: #ffffff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: #1e293b;
}

.message.user {
    background: var(--primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    z-index: 1001;
}

#chat-input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--primary);
}

#send-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}