/* ============================================================================
   MODERN MOBILE RESPONSIVE STYLES
   ============================================================================ */

/* Modal improvements */
.modal {
    padding: 10px !important;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    .form-group {
        margin-bottom: 20px !important;
    }
    
    .form-input,
    .form-input textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Responsive buttons */
@media (max-width: 480px) {
    .modal-content form > div:last-child {
        flex-direction: column !important;
    }
    
    .modal-content form > div:last-child button {
        flex: 1 !important;
        width: 100% !important;
    }
}

/* ============================================================================
   MOBILE BOTTOM NAVIGATION - ENSURE VISIBILITY
   ============================================================================ */

.mobile-bottom-nav {
    z-index: 9999 !important; /* Below modals but always visible */
}

/* When modal is open, ensure body doesn't hide bottom nav */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Ensure modals don't block bottom nav interaction */
.whatsapp-conversation-modal,
.kb-detail-modal {
    z-index: 10000 !important;
}

/* Ensure modal content has proper padding at bottom for mobile nav */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important; /* Force visibility on mobile */
    }
    
    /* Add padding to main content when bottom nav is visible */
    .main-content {
        padding-bottom: 80px !important;
    }
    
    /* Modal content should account for bottom nav */
    .whatsapp-conversation-modal .modal-content,
    .kb-detail-modal .kb-detail-container {
        margin-bottom: 0 !important;
    }
}

/* ============================================================================
   WHATSAPP CONVERSATION MODAL - MOBILE RESPONSIVE
   ============================================================================ */

.whatsapp-conversation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.whatsapp-conversation-modal .modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.conversation-header {
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    flex-shrink: 0;
    background: white;
}

.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.conversation-footer {
    padding: 15px 20px;
    border-top: 2px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.message-bubble {
    margin-bottom: 15px;
    display: flex;
}

.message-bubble.outgoing {
    justify-content: flex-end;
}

.message-bubble.incoming {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
}

.message-content.outgoing {
    background: #0891b2;
    color: white;
}

.message-content.incoming {
    background: white;
    color: #111827;
    border: 1px solid #e5e7eb;
}

/* Mobile Responsive for WhatsApp Conversation */
@media (max-width: 768px) {
    .whatsapp-conversation-modal {
        padding: 0 !important;
        align-items: flex-start !important;
    }
    
    .whatsapp-conversation-modal .modal-content {
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
        width: 100vw !important;
    }
    
    .conversation-header {
        padding: 16px;
    }
    
    .conversation-header h2 {
        font-size: 18px !important;
        word-break: break-word;
    }
    
    .conversation-header p {
        font-size: 13px !important;
    }
    
    .conversation-messages {
        padding: 16px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 14px;
        word-break: break-word;
    }
    
    .conversation-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .conversation-footer > div {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }
    
    .conversation-footer span {
        font-size: 12px !important;
    }
}

/* ============================================================================
   KNOWLEDGE BASE SPECIFIC MOBILE RESPONSIVE
   ============================================================================ */

/* Filter and Actions Bar */
.kb-filter-actions-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .kb-filter-actions-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }
    
    .kb-filter-actions-bar > div {
        width: 100% !important;
        flex: none !important;
        min-width: auto !important;
    }
    
    .kb-filter-actions-bar select {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .kb-filter-actions-bar button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ============================================================================
   KNOWLEDGE BASE PREVIEW CARDS (Simple & Clean)
   ============================================================================ */

.kb-preview-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.kb-preview-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.kb-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kb-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kb-preview-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.kb-preview-title {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.kb-preview-content {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.kb-preview-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.kb-preview-click {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
}

/* ============================================================================
   KNOWLEDGE BASE DETAIL MODAL (Full Screen)
   ============================================================================ */

.kb-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

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

.kb-detail-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.kb-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-detail-header-left {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.kb-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.kb-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
    outline: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.kb-detail-title:hover {
    background: #f9fafb;
}

.kb-detail-title:focus {
    background: #f3f4f6;
}

.kb-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-detail-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.kb-detail-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.kb-detail-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.kb-detail-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.kb-detail-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.kb-detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    outline: none;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 200px;
}

.kb-detail-content:hover {
    background: #f9fafb;
}

.kb-detail-content:focus {
    background: #f3f4f6;
}

.kb-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

.kb-detail-footer-left {
    flex: 1;
}

.kb-detail-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

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

.kb-detail-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.kb-detail-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.kb-detail-btn-delete:hover {
    background: #fecaca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.kb-detail-btn-save {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.kb-detail-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .kb-detail-modal {
        padding: 0 !important;
        align-items: flex-start !important;
    }
    
    .kb-detail-container {
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
        width: 100vw !important;
    }
    
    .kb-detail-header {
        padding: 20px;
    }
    
    .kb-detail-header-left {
        flex-direction: column;
        gap: 12px;
    }
    
    .kb-detail-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .kb-detail-title {
        font-size: 20px;
    }
    
    .kb-detail-content-wrapper {
        padding: 20px;
    }
    
    .kb-detail-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .kb-detail-hint {
        margin-bottom: 8px;
    }
    
    .kb-detail-actions {
        width: 100%;
    }
    
    .kb-detail-btn {
        flex: 1;
        justify-content: center;
    }
    
    .kb-preview-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .kb-preview-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .kb-preview-title {
        font-size: 16px;
        word-break: break-word;
    }
    
    .kb-preview-content {
        font-size: 13px;
        word-break: break-word;
    }
}

/* Knowledge Base Cards */
.knowledge-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.knowledge-card:hover {
    border-color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
    transform: translateY(-2px);
}

.knowledge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.knowledge-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
}

.knowledge-card-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 12px;
}

.knowledge-card-category.general { background: #e0f2fe; color: #0369a1; }
.knowledge-card-category.services { background: #f0fdf4; color: #15803d; }
.knowledge-card-category.pricing { background: #fef3c7; color: #92400e; }
.knowledge-card-category.faq { background: #fce7f3; color: #9f1239; }
.knowledge-card-category.contact { background: #ede9fe; color: #6b21a8; }
.knowledge-card-category.custom { background: #f3f4f6; color: #374151; }

.knowledge-card-content {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 12px;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.knowledge-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.knowledge-card-actions button {
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.knowledge-card-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.knowledge-card-actions .btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.knowledge-card-actions .btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.knowledge-card-actions .btn-danger:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* Mobile responsive for knowledge cards */
@media (max-width: 768px) {
    .knowledge-card {
        padding: 16px;
    }
    
    .knowledge-card-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .knowledge-card-category {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .knowledge-card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .knowledge-card-actions button {
        width: 100%;
    }
}

/* Conversation Cards */
.conversation-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversation-card:hover {
    border-color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
    transform: translateY(-2px);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.conversation-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.conversation-time {
    font-size: 13px;
    color: #6b7280;
}

.conversation-preview {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-closed {
    background: #fee2e2;
    color: #991b1b;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.dashboard-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    border-color: #0891b2;
    box-shadow: 0 8px 16px rgba(8, 145, 178, 0.15);
    transform: translateY(-4px);
}

.dashboard-card-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.dashboard-card-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.dashboard-card-stat {
    font-size: 32px;
    font-weight: 700;
    color: #0891b2;
    margin-top: 12px;
}

/* Better form inputs */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #0891b2 !important;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1) !important;
    outline: none !important;
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

.loading::before {
    content: "⏳";
    font-size: 24px;
    margin-right: 12px;
    animation: spin 2s linear infinite;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

@media (max-width: 768px) {
    .empty-state {
        padding: 60px 16px;
    }
    
    .empty-state button {
        width: 100%;
        max-width: 300px;
    }
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .empty-state-icon {
        font-size: 48px;
    }
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .empty-state-title {
        font-size: 18px;
    }
}

.empty-state-description {
    font-size: 14px;
    color: #6b7280;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .empty-state-description {
        font-size: 13px;
        padding: 0 10px;
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Knowledge Base Page Header - Mobile Responsive */
    .page-header {
        padding: 16px !important;
        margin-bottom: 20px !important;
    }
    
    .page-header h1 {
        font-size: 22px !important;
        word-wrap: break-word;
    }
    
    .page-header p {
        font-size: 14px !important;
        padding-left: 0 !important;
        margin-top: 8px !important;
    }
    
    .page-header > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .page-header > div:first-child > div:first-child {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }
}

/* ============================================================================
   AGENT TOOLS CONFIG MODAL STYLES
   ============================================================================ */

#config-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#config-modal .modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#config-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#config-modal .modal-header .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

#config-modal .modal-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#config-modal .modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#config-modal .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

#config-modal .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

#config-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#config-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#config-modal .btn-secondary {
    background: #e5e7eb;
    color: #374151;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#config-modal .btn-secondary:hover {
    background: #d1d5db;
}

/* Config form styles */
#config-modal .config-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#config-modal .config-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#config-modal .config-form label {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

#config-modal .config-form label .required {
    color: #ef4444;
    margin-left: 4px;
}

#config-modal .config-form input[type="text"],
#config-modal .config-form input[type="url"],
#config-modal .config-form input[type="password"],
#config-modal .config-form textarea,
#config-modal .config-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

#config-modal .config-form input:focus,
#config-modal .config-form textarea:focus,
#config-modal .config-form select:focus {
    outline: none;
    border-color: #667eea;
}

#config-modal .config-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

#config-modal .config-form .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

#config-modal .config-form .help-text {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #config-modal {
        padding: 10px;
    }
    
    #config-modal .modal-content {
        max-height: 85vh;
        border-radius: 12px;
    }
    
    #config-modal .modal-footer {
        flex-direction: column-reverse;
    }
    
    #config-modal .modal-footer button {
        width: 100%;
    }
}
