/* agents.css - أنماط صفحات AI Agents */

:root {
    --dark-green: #1a5e3d;
    --primary-green: #2d8659;
    --light-green: #5fb884;
    --background: #f3fbf7;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --gray: #eaeaea;
    --text-dark: #1a2e22;
    --text-light: #5a7165;
    --shadow: 0 5px 15px rgba(26, 94, 61, 0.08);
    --shadow-hover: 0 10px 25px rgba(26, 94, 61, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --gradient-green: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    --gradient-green-light: linear-gradient(135deg, var(--light-green), var(--primary-green));
}

/* Agent Hero Section */
.agent-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--gradient-green);
    padding: 7rem 5% 3rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.agent-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1677442136019-21780ecad995?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.agent-hero-content {
    position: relative;
    z-index: 1;
    /* max-width: 900px; */
    min-width: 60%;
}

.agent-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.agent-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.agent-hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Make hero logo image smaller like an icon */
.agent-hero .hero-logo-image {
    width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 0;
    border-radius: 8px;
}

/* AI Question Bar Section - بدون خلفية بيضاء */
.ai-question-section {
    padding: 2rem 5% 3rem;
    background: transparent;
}

.ai-question-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.ai-question-bar {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.ai-input-container {
    display: flex;
    background-color: var(--white);
    border-radius: 50px;
    padding: 10px;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-green);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.ai-input-container:focus-within {
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.2);
    transform: translateY(-2px);
}

.ai-input {
    flex: 1;
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
    color: var(--text-dark);
    background: transparent;
    outline: none;
}

.ai-input::placeholder {
    color: var(--text-light);
}

.send-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.send-btn:hover {
    background: var(--dark-green);
    transform: scale(1.05);
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.quick-questions span {
    font-weight: 600;
    color: var(--dark-green);
    margin-right: 10px;
}

.quick-btn {
    background: rgba(45, 134, 89, 0.1);
    color: var(--primary-green);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* Agent Details Section - Conversation History فقط */
.agent-details {
    padding: 0 5% 4rem;
    background-color: var(--background);
}

.agent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Conversation History Section - تصميم محسّن */
.conversation-history {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(45, 134, 89, 0.1);
}

.conversation-history h2 {
    color: var(--dark-green);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.conversation-history h2::before {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: var(--gradient-green);
    border-radius: 2px;
}

.conversation-timeline {
    margin-bottom: 2rem;
}

.timeline-item {
    background: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.timeline-item:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-date::before {
    content: '📅';
    font-size: 0.9rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
}

.message.user .avatar {
    background: var(--primary-green);
}

.message.ai .avatar {
    background: var(--dark-green);
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message .content {
    flex: 1;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user .content {
    background: var(--primary-green);
    color: white;
    border-radius: 15px 15px 15px 5px;
}

.message.ai .content {
    background: var(--white);
    color: var(--text-dark);
    border-left: 3px solid var(--primary-green);
    border-radius: 15px 15px 5px 15px;
}

.message .content p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.message .content .time {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    text-align: right;
}

.message.user .content .time {
    color: rgba(255, 255, 255, 0.8);
}

.load-more {
    text-align: center;
}

.load-more-btn {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* Performance Metrics Section - تصميم مضغوط مع 4 أعمدة جنب بعض */
.performance-metrics {
    padding: 4rem 5%;
    background: linear-gradient(135deg, rgba(95, 184, 132, 0.03) 0%, rgba(45, 134, 89, 0.03) 100%);
}

.metrics-container {
    max-width: 1200px;
    margin: 0 auto;
}

.metrics-container h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
}

.metrics-container p {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* شبكة المقاييس - 4 أعمدة جنب بعض */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 أعمدة */
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* تنسيق البطاقات المضغوطة */
.metrics-grid .metric-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(45, 134, 89, 0.1);
    height: 100%;
    /* ارتفاع متساوي */
    cursor: pointer;
    user-select: none;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-green);
}

.metric-card:active {
    transform: translateY(-3px) scale(0.98);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.metric-content {
    width: 100%;
}

.metric-value {
    font-size: 2.2rem;
    /* تصغير حجم الخط */
    font-weight: 800;
    color: var(--dark-green);
    line-height: 1;
    margin-bottom: 0.3rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: color 0.3s ease;
}

.metric-unit {
    font-size: 0.9rem;
    /* تصغير حجم وحدة القياس */
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: block;
}

.metric-card h3 {
    color: var(--dark-green);
    margin-bottom: 0;
    font-size: 1rem;
    /* تصغير حجم العنوان */
    font-weight: 600;
    line-height: 1.3;
}

/* مؤشر التحميل للعدادات */
.metric-value.counting {
    position: relative;
    color: var(--primary-green);
    animation: pulse 0.6s ease;
}

.metric-value.counting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(45, 134, 89, 0.1), transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* المخطط البياني */
.metrics-chart-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(45, 134, 89, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-header h3 {
    color: var(--dark-green);
    font-size: 1.5rem;
    margin: 0;
}

.chart-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(45, 134, 89, 0.1);
    color: var(--primary-green);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-green);
    color: white;
}

.metrics-chart {
    width: 100%;
    height: 250px;
    position: relative;
}

.chart-grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    border-bottom: 2px solid var(--gray-light);
    position: relative;
}

.chart-bar {
    width: 50px;
    background: linear-gradient(to top, var(--light-green), var(--primary-green));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

.chart-bar:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(45, 134, 89, 0.2);
}

.chart-bar.active {
    background: linear-gradient(to top, var(--dark-green), var(--primary-green));
}

.chart-bar span {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-green);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.chart-bar:hover::after {
    opacity: 1;
}

/* Back Button */
.back-to-agents {
    text-align: center;
    padding: 3rem 5%;
    background: var(--white);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-green);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 134, 89, 0.2);
}

/* Responsive Design للمقاييس */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        /* عمودين للشاشات المتوسطة */
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .agent-hero {
        min-height: 40vh;
        padding: 6rem 5% 2rem;
    }

    .agent-hero h1 {
        font-size: 2rem;
    }

    .agent-icon {
        font-size: 2.5rem;
    }

    .ai-input-container {
        flex-direction: column;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .ai-input {
        background: var(--white);
        border: 2px solid var(--primary-green);
        border-radius: 50px;
        margin-bottom: 1rem;
    }

    .send-btn {
        align-self: center;
    }

    .quick-questions {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        /* عمود واحد للجوال */
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .metric-card {
        padding: 1.5rem;
    }

    .conversation-history {
        padding: 1.5rem;
    }

    .message {
        flex-direction: column;
    }

    .message .avatar {
        align-self: flex-start;
    }

    .chart-grid {
        gap: 1rem;
        padding: 0 1rem;
    }

    .chart-bar {
        width: 40px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .chart-filter {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .agent-hero h1 {
        font-size: 1.8rem;
    }

    .agent-hero p {
        font-size: 1rem;
    }

    .ai-question-section,
    .agent-details,
    .performance-metrics {
        padding-left: 3%;
        padding-right: 3%;
    }

    .metrics-chart-container {
        padding: 1.5rem;
    }

    .chart-bar {
        width: 35px;
    }

    .chart-bar span {
        font-size: 0.8rem;
    }

    .metric-value {
        font-size: 1.8rem;
    }

    .metric-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* RTL Support */
body.rtl .ai-input-container {
    flex-direction: row-reverse;
}

body.rtl .ai-input {
    text-align: right;
}

body.rtl .quick-questions span {
    margin-right: 0;
    margin-left: 10px;
}

body.rtl .quick-questions {
    flex-direction: row-reverse;
}

body.rtl .conversation-history h2::before {
    order: 2;
}

body.rtl .message.ai .content {
    border-left: none;
    border-right: 3px solid var(--primary-green);
}

body.rtl .message.user .content {
    border-radius: 15px 15px 5px 15px;
}

body.rtl .message.ai .content {
    border-radius: 15px 15px 15px 5px;
}

body.rtl .message .content .time {
    text-align: left;
}

body.rtl .chart-bar span {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

body.rtl .chart-bar::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

body.rtl .back-btn {
    flex-direction: row-reverse;
}

body.rtl .metric-value.counting::after {
    animation-direction: reverse;
}

/* إضافات خاصة لصفحة Image Generation Agent */
.image-preview {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray);
}

.preview-placeholder {
    background: linear-gradient(135deg, var(--gray-light), var(--white));
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.preview-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.preview-placeholder span {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ========================================
   ENHANCED AI CHAT INTERFACE STYLES
   ======================================== */

.ai-chat-interface {
    padding: 3rem 5% 5rem;
    background: linear-gradient(135deg, #f3fbf7 0%, #e8f5e9 100%);
    min-height: 80vh;
}

.chat-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.chat-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(26, 94, 61, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-avatar-large {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: pulse-avatar 2s infinite;
}

@keyframes pulse-avatar {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(95, 184, 132, 0.4);
    }
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #4caf50;
    border: 3px solid white;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.ai-info h3 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.ai-info p {
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
    opacity: 0.9;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #fafafa;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--light-green);
    border-radius: 10px;
}

.message-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    box-shadow: 0 4px 10px rgba(45, 134, 89, 0.3);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #607d8b, #90a4ae);
    color: white;
    box-shadow: 0 4px 10px rgba(96, 125, 139, 0.3);
}

.message-bubble {
    max-width: 70%;
    position: relative;
}

.ai-message .message-bubble {
    background: white;
    border-radius: 18px 18px 18px 4px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e8f5e9;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.message-content p {
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

.message-content li {
    margin: 0.4rem 0;
}

.message-time {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.user-message .message-time {
    text-align: right;
}

/* Quick Actions Panel */
.quick-actions-panel {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 2px solid #e8f5e9;
}

.quick-actions-header {
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.quick-action-btn {
    background: linear-gradient(135deg, rgba(95, 184, 132, 0.1), rgba(45, 134, 89, 0.1));
    border: 2px solid var(--light-green);
    border-radius: 12px;
    padding: 0.8rem 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dark-green);
    font-weight: 500;
}

.quick-action-btn i {
    font-size: 1.5rem;
    color: var(--primary-green);
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, rgba(95, 184, 132, 0.2), rgba(45, 134, 89, 0.2));
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(45, 134, 89, 0.2);
    border-color: var(--primary-green);
}

/* Chat Input Area */
.chat-input-area {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 2px solid #e8f5e9;
    display: flex;
    gap: 1rem;
}

.input-features {
    display: flex;
    gap: 0.5rem;
}

.feature-btn {
    width: 45px;
    height: 45px;
    background: rgba(45, 134, 89, 0.1);
    border: 2px solid var(--light-green);
    border-radius: 50%;
    color: var(--primary-green);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.feature-btn:hover {
    background: var(--light-green);
    color: white;
    transform: scale(1.1);
}

.input-wrapper {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--light-green);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.15);
}

.send-btn-new {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.send-btn-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 134, 89, 0.4);
}

/* Capabilities Sidebar */
.capabilities-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.capability-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(26, 94, 61, 0.1);
    border: 2px solid #e8f5e9;
    transition: all 0.3s ease;
    text-align: center;
}

.capability-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(26, 94, 61, 0.15);
    border-color: var(--light-green);
}

.capability-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.capability-card h4 {
    color: var(--dark-green);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.capability-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* AI Decorative Elements */
.ai-decoration {
    position: relative;
    height: 100px;
    margin-top: 2rem;
    overflow: hidden;
}

.ai-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--light-green);
    border-radius: 50%;
    animation: float-particle 3s infinite;
    opacity: 0.6;
}

.ai-particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.ai-particle:nth-child(2) {
    left: 50%;
    animation-delay: 1s;
}

.ai-particle:nth-child(3) {
    left: 80%;
    animation-delay: 2s;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .chat-container {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 992px) {
    .chat-container {
        grid-template-columns: 1fr;
    }

    .capabilities-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ai-decoration {
        display: none;
    }
}

@media (max-width: 768px) {
    .chat-wrapper {
        height: 600px;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .message-bubble {
        max-width: 85%;
    }

    .input-features {
        display: none;
    }

    .capabilities-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .chat-wrapper {
        height: 500px;
        border-radius: 15px;
    }

    .chat-header {
        padding: 1rem;
    }

    .ai-avatar-large {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }

    .ai-info h3 {
        font-size: 1.1rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .send-btn-new span {
        display: none;
    }
}

/* Filter Buttons */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.filter-btn.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.3);
}

.filter-btn.active:hover {
    background: var(--dark-green);
    border-color: var(--dark-green);
    box-shadow: 0 6px 16px rgba(45, 134, 89, 0.4);
}
/* ====== Green Theme + Left/RTL Alignment (No Center) ====== */

/* تأكيد عدم توسيط النص */
.answer-box,
.report,
.answer-text,
.result-body,
.para,
.subhead,
.nice-ul,
.nice-ul li {
  text-align: right !important;   /* RTL -> النص يمين */
}

/* صندوق الإجابة مثل الصورة لكن أخضر */
.answer-box {
  margin-top: 18px;
  padding: 16px;
  background: #f1fbf4 !important;        /* أخضر فاتح */
  border: 1px solid #bfe8c8 !important;  /* إطار أخضر فاتح */
  border-radius: 10px;
}

/* عنوان "الإجابة" */
.report .title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #0f6b3b;                 /* أخضر */
}

/* محتوى الإجابة */
.answer-text {
  background: #f7fffa;            /* أخضر فاتح جدًا */
  border: 1px solid #d7f3df;
  padding: 14px;
  border-radius: 10px;
  line-height: 1.9;
  color: #1c2b1f;
}

/* العناوين الفرعية */
.subhead {
  margin: 12px 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: #0b5f34;
}

/* الفقرات */
.para {
  margin: 6px 0;
  font-size: 16px;
  line-height: 1.9;
  color: #1f2f22;
}

/* القوائم والنقاط */
.nice-ul {
  margin: 10px 0;
  padding-right: 20px;
  line-height: 1.9;
}

.nice-ul li {
  margin: 6px 0;
  font-size: 16px;
}

/* شكل النقطة مثل الصورة - دائرة صغيرة */
.nice-ul li::marker {
  color: #18a558;  /* أخضر قوي */
  font-size: 14px;
}

/* لو في نتائج */
.result-item {
  background: #ffffff;
  border: 1px solid #d7f3df;
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.result-title {
  font-weight: 800;
  font-size: 16px;
  color: #0b5f34;
}

.result-score {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24,165,88,0.12); /* أخضر فاتح */
  color: #0b5f34;
  white-space: nowrap;
}

/* الخط الفاصل */
.report hr {
  border: none;
  border-top: 1px solid #d7f3df;
  margin: 14px 0;
}
