/* Custom CSS for Tellma */

:root {
    --color-body-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-alt: #f8f9fa;
    --color-surface-highlight: #f8fafc;
    --color-border: #e2e8f0;
    --color-border-muted: rgba(0, 0, 0, 0.08);
    --color-text: #0f172a;
    --color-text-muted: #6c757d;
    --color-shadow: rgba(0, 0, 0, 0.06);
    --color-accent: #0d6efd;
    --color-accent-soft: rgba(13, 110, 253, 0.08);
}

body {
    background: var(--color-body-bg);
    color: var(--color-text);
}


body a {
    color: inherit;
}

/* Fix layout - remove top strip offset since we don't use it */
.app-header {
    top: 0 !important;
    padding-left: 30px;
}

#main-wrapper[data-layout=vertical][data-sidebar-position=fixed] .left-sidebar {
    top: 0 !important;
}

@media (max-width: 991.98px) {
.app-header {
    top: 0 !important;
}

body .card,
body .table,
body .table-responsive,
body .dropdown-menu,
body .modal-content,
body .list-team-item,
body .alert {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

body .text-dark {
    color: var(--color-text) !important;
}

body .text-muted {
    color: var(--color-text-muted) !important;
}

.body-wrapper,
.page-wrapper {
    background: var(--color-body-bg);
    color: var(--color-text);
}

.left-sidebar {
    background: var(--color-surface);
    color: var(--color-text);
    border-right: 1px solid var(--color-border);
}
}

/* Header Enhancements */
.app-header {
    background: var(--color-surface);
    box-shadow: 0 2px 8px var(--color-shadow);
    border-bottom: 1px solid var(--color-border);
}

.header-search-wrapper {
    position: relative;
    margin-right: 10px;
}

.header-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8ea1;
    font-size: 18px;
}

.header-search {
    padding-left: 42px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    transition: all 0.3s ease;
    width: 280px;
}

.header-search::placeholder {
    color: var(--color-text-muted);
}

.header-search:focus {
    background: var(--color-surface);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
    width: 320px;
}
.header-search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border-muted);
    border-radius: 16px;
    box-shadow: 0 18px 40px var(--color-shadow);
    z-index: 1090;
    padding: 0.5rem 0;
}
.header-search-results .search-section-title {
    padding: 0.75rem 1rem 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}
.header-search-results .search-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.65rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.header-search-results .search-result-item:hover,
.header-search-results .search-result-item:focus,
.header-search-results .search-result-item.is-active {
    background-color: rgba(13, 110, 253, 0.08);
    outline: none;
}
.header-search-results .search-result-item small {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}
.header-search-results .search-section + .search-section {
    border-top: 1px solid var(--color-border-muted);
    margin-top: 0.35rem;
    padding-top: 0.35rem;
}
.header-search-results .search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
    font-size: 0.75rem;
}
.header-search-results .search-footer {
    padding: 0.65rem 1rem 0.35rem;
    border-top: 1px solid var(--color-border-muted);
    text-align: right;
}
.header-search-results .search-footer a {
    font-size: 0.75rem;
    color: #0d6efd;
    text-decoration: none;
}
.header-search-results .search-footer a:hover {
    text-decoration: underline;
}
@media (max-width: 1199.98px) {
    .header-search-results {
        width: 320px;
    }
}

.header-dropdown {
    border-radius: 18px;
    border: 1px solid var(--color-border-muted);
    padding: 0;
    box-shadow: 0 20px 48px var(--color-shadow);
    overflow: hidden;
    background: var(--color-surface);
    min-width: 320px;
}
.header-dropdown.profile-dropdown {
    min-width: 260px;
}
.brand-logo {
    min-height: 85px;
}
.header-dropdown-card {
    background: var(--color-surface);
}
.header-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-muted);
}
.header-dropdown-header h6 {
    font-size: 0.95rem;
}
.header-dropdown-body {
    padding: 0.75rem 0.75rem;
}
.header-dropdown-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--color-border-muted);
}
.header-dropdown-item {
    border-radius: 12px;
    padding: 0.75rem 0.8rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.header-dropdown-item:last-child {
    margin-bottom: 0;
}
.header-dropdown-item:hover,
.header-dropdown-item:focus {
    background: var(--color-accent-soft);
    transform: translateY(-1px);
}
.header-dropdown-item p {
    font-size: 0.9rem;
}
.header-dropdown-item small {
    font-size: 0.75rem;
}
.header-dropdown-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    font-size: 1.2rem;
    padding: 0;
    overflow: hidden;
}
.header-dropdown-empty {
    color: var(--color-text-muted);
}
.header-dropdown-empty iconify-icon {
    display: block;
}

.nav-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-surface-alt);
    transition: all 0.3s ease;
    position: relative;
}

.nav-icon-hover:hover .nav-icon-wrapper {
    background: var(--color-surface-highlight);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 16px;
    min-height: 16px;
    line-height: 16px;
    background: #ff6692;
    border-radius: 50%;
    border: 2px solid var(--color-surface);
    display: none; /* Show when there are notifications */
    font-size: 10px;
    color: #ffffff;
    text-align: center;
}

.sidebar-link,
.sidebar-link .hide-menu {
    color: var(--color-text);
}

.sidebar-nav .nav-small-cap .hide-menu {
    color: var(--color-text-muted);
}

.sidebar-item .sidebar-link:hover,
.sidebar-item .sidebar-link:focus,
.sidebar-item .sidebar-link.active {
    background: var(--color-accent-soft);
    color: #0b5ed7;
}
.sidebar-item .sidebar-link:hover iconify-icon,
.sidebar-item .sidebar-link:focus iconify-icon,
.sidebar-item .sidebar-link.active iconify-icon {
    color: #0b5ed7 !important;
}
.sidebar-item .sidebar-link:hover .hide-menu,
.sidebar-item .sidebar-link:focus .hide-menu,
.sidebar-item .sidebar-link.active .hide-menu {
    color: #0b5ed7;
}

.notification-badge.active {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 102, 146, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 102, 146, 0);
    }
}

.dropdown-menu-animate-up {
    animation: slideDown 0.3s ease;
}

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

.dropdown-item:hover {
    background-color: var(--color-surface-highlight);
    border-radius: 8px;
}

/* Avatar styles */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    border-radius: 50%;
}
.app-header .navbar .navbar-nav .nav-item .nav-link {
  line-height: inherit;
  font-size: inherit;
  padding: 7px;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: color-mix(in srgb, var(--color-accent) 6%, transparent);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.table.table-compact th,
.table.table-compact td {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

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

.status-indicator.active {
    background-color: #00ceb6;
    box-shadow: 0 0 0 2px rgba(0, 206, 182, 0.2);
}

.status-indicator.inactive {
    background-color: #8e8ea1;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Form improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #00a1ff;
    box-shadow: 0 0 0 0.2rem rgba(0, 161, 255, 0.15);
}

.profile-banner {
    position: relative;
    border-radius: 18px;
    min-height: 275px;
    background-size: cover;
    background-position: center;
}

.profile-summary-card {
    margin-top: -56px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.profile-summary-card .card-body {
    position: relative;
    padding-left: 160px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.profile-avatar-circle {
    position: absolute;
    top: -40px;
    left: 24px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 6px solid var(--color-surface);
    overflow: hidden;
    background: linear-gradient(135deg, #00ceb6 0%, #8965e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.profile-avatar-initials {
    color: #fff;
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 1px;
}

.profile-avatar-circle:hover {
    transform: scale(1.02);
}

.profile-banner {
    position: relative;
    border-radius: 18px;
    min-height: 275px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.banner-upload-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    color: var(--bs-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.banner-upload-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #0d6efd;
    box-shadow: 0 6px 18px rgba(15, 38, 65, 0.18);
}

.profile-banner:hover .banner-upload-btn {
    opacity: 1;
    pointer-events: auto;
}

.profile-text h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.profile-text {
    margin-left: 15px;
}

.profile-text .profile-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--bs-gray-600);
}

@media (max-width: 991px) {
    .profile-summary-card .card-body {
        padding-left: 0;
        padding-top: 72px;
    }

    .profile-avatar-circle {
        top: -30px;
        left: 16px;
        width: 110px;
        height: 110px;
    }

    .profile-avatar-initials {
        font-size: 28px;
    }
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: color-mix(in srgb, var(--color-text-muted) 60%, transparent);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.analytics-hero-card {
    background: linear-gradient(135deg, #312e81, #5145cd) !important;
    color: #ffffff !important;
    border: none;
}

/* Code/monospace text */
.text-mono {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Stats cards */
.stats-card {
    border-left: 4px solid;
}

.stats-card.primary {
    border-left-color: #00a1ff;
}

.stats-card.success {
    border-left-color: #00ceb6;
}

.stats-card.warning {
    border-left-color: #ffae1f;
}

.stats-card.danger {
    border-left-color: #ff6692;
}

/* Transcript viewer */
.transcript-viewer {
    background-color: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.transcript-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    color: var(--color-text);
}

.transcript-message.user {
    background-color: var(--color-accent-soft);
    margin-left: 2rem;
}

.transcript-message.agent {
    background-color: var(--color-surface);
    margin-right: 2rem;
    border: 1px solid var(--color-border);
}

.transcript-message-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-muted);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Custom scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #d0d2d6 #f8f9fa;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #d0d2d6;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #b8bac0;
}

/* Theme toggle */

/*  */
