/* CrewAI Action Item Tracker - Kelphr Brand Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Kelphr Brand Colors */
    --primary-color: #77bdbc;      /* Kelphr Teal */
    --primary-dark: #68b49f;       /* Kelphr Green */
    --success-color: #68b49f;      /* Kelphr Green */
    --warning-color: #ffc947;      /* Kelphr Yellow */
    --danger-color: #e9633e;       /* Kelphr Orange-Red */
    --info-color: #77bdbc;         /* Kelphr Teal */
    --dark-color: #414142;         /* Kelphr Charcoal */
    --light-color: #f9fafb;        /* Light gray */
    --accent-color: #f4a747;       /* Kelphr Orange */
    --purple-color: #6f67a6;       /* Kelphr Purple */
    --coral-color: #f68953;        /* Kelphr Coral */
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #77bdbc 0%, #68b49f 100%);
    --gradient-accent: linear-gradient(135deg, #f4a747 0%, #f68953 100%);
    --gradient-success: linear-gradient(135deg, #68b49f 0%, #77bdbc 100%);
}

/* General Styles */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f4a747 0%, #f68953 25%, #6f67a6 75%, #77bdbc 100%);
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #414142 0%, #2d2d2e 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid var(--accent-color);
    padding: 1.25rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    border-radius: 0;
    font-weight: 600;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    background: var(--gradient-accent) !important;
    color: white !important;
}

.card-header h5 {
    color: white !important;
    margin: 0;
    font-weight: 600;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #68b49f 0%, #77bdbc 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #6f67a6 0%, #77bdbc 100%) !important;
}

.card-body {
    padding: 2rem 1.5rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.15);
}

textarea.form-control {
    min-height: 300px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #77bdbc 0%, #68b49f 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(119, 189, 188, 0.5);
    background: linear-gradient(135deg, #68b49f 0%, #77bdbc 100%);
}

.btn-success {
    background: linear-gradient(135deg, #68b49f 0%, #77bdbc 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(104, 180, 159, 0.5);
    background: linear-gradient(135deg, #77bdbc 0%, #68b49f 100%);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-light {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
}

.alert-info {
    background-color: #1e7e9e;
    color: #ffffff;
    border-color: #155d7a;
    font-weight: 500;
}

.alert-info .bi {
    font-size: 1.2em;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: var(--success-color);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: var(--danger-color);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background-color: #f8f9fa;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 0.4rem 0.7rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Priority Badges */
.badge-priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.badge-priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

/* Spinner & Loading */
.spinner-border {
    border-width: 4px;
}

.progress {
    border-radius: 6px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Agent Icons */
.agent-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.agent-icon.bg-primary {
    background-color: var(--primary-color);
}

.agent-icon.bg-success {
    background-color: var(--success-color);
}

.agent-icon.bg-warning {
    background-color: var(--warning-color);
    color: white !important;
}

/* Agent Activity List */
.agent-activity-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

.agent-activity-item.completed {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
}

.agent-activity-item.in-progress {
    border-left-color: var(--warning-color);
    background-color: #fffbf0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.completed {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.in-progress {
    background-color: var(--warning-color);
    animation: pulse 1.5s infinite;
}

.status-indicator.pending {
    background-color: #6c757d;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
}

.display-5 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Footer */
footer {
    margin-top: 5rem;
    border-top: 1px solid #dee2e6;
}

/* Action Items Table */
#actionItemsTable {
    font-size: 0.95rem;
}

#actionItemsTable td {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Checkbox Styling */
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
    border-color: #dee2e6;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.15);
}

/* Priority Color Coding */
.priority-urgent {
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: 600;
}

.priority-important {
    background-color: #fd7e14 !important;
    color: white !important;
    font-weight: 600;
}

.priority-medium {
    background-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
}

.priority-low {
    background-color: #6c757d !important;
    color: white !important;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 991px) {
    .container {
        padding: 0 1rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    textarea.form-control {
        min-height: 200px;
    }

    .agent-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    #actionItemsTable {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Utility Classes */
.border-left {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-down {
    animation: slideDown 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .form-control,
    .form-select {
        display: none;
    }

    .card {
        page-break-inside: avoid;
    }

    body {
        background-color: white;
    }
}

/* Email Autocomplete Suggestions */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0;
}

.autocomplete-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.active {
    background-color: #f8f9fa;
}

.autocomplete-suggestion-name {
    font-weight: 500;
    color: #212529;
    display: block;
}

.autocomplete-suggestion-email {
    font-size: 0.875rem;
    color: #6c757d;
    display: block;
}
