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

:root {
    --background: #ffffff;
    --foreground: #18181b;
    --card: #ffffff;
    --card-foreground: #18181b;
    --popover: #ffffff;
    --primary: #18181b;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #18181b;
    --muted: #F4F4F5;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #18181b;
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #18181b;
    --radius: 0.5rem;
    --sidebar-width: 250px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base styles */
html {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    letter-spacing: -0.011em;
}

/* Typography adjustments */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.navbar-brand,
.sidebar-brand,
.nav-link,
.btn,
.form-control,
.form-select,
.table th,
.table td,
.status-badge,
.pagination-info,
.stat-value,
.stat-label {
    font-family: var(--font-sans);
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.sidebar-brand {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted-foreground);
    padding: 0.75rem 0.75rem 0.5rem;
    letter-spacing: 0.05em;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.nav-link:hover {
    background-color: var(--muted);
    color: var(--foreground);
}

.nav-link.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: 500;
}

.nav-link i {
    font-size: 1.25rem;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Styles */
.navbar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-weight: 600;
    color: var(--foreground);
    font-size: 1rem;
}

h5{
    font-size: 1rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}



.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background-color: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.75rem;
}

.card {
    background-color: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    padding: 1rem;
}

.card-body {
    padding: 1rem;
}

.form-control, .form-select {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    background-color: var(--background);
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
    color: var(--foreground);
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: var(--primary-foreground);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background-color: #0c1321;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background-color: var(--destructive);
    border: none;
    border-radius: var(--radius);
    color: var(--destructive-foreground);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
}

#transcription {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    height: 600px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
    max-width: 85%;
}

.chat-message.assistant {
    align-self: flex-start;
    margin-right: auto;
}

.chat-message.human {
    align-self: flex-end;
    margin-left: auto;
}

.chat-message .timestamp {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
    text-align: center;
}

.message-bubble {
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    position: relative;
    word-wrap: break-word;
    max-width: 100%;
    font-size: 0.875rem;
}

.message-bubble.assistant {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-bottom-left-radius: 0.25rem;
}

.message-bubble.human {
    background-color: var(--muted);
    color: var(--foreground);
    border-bottom-right-radius: 0.25rem;
}

.message-status {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
    text-align: center;
    width: 100%;
}

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

.input-group {
    gap: 0.5rem;
}

.input-group .form-control {
    border-radius: var(--radius);
}

.input-group .btn {
    border-radius: var(--radius);
}

.alert {
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: .75rem;
}

.alert-success {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

h3, h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--foreground);
    font-size: 1rem;
}

.container-fluid {
    max-width: none;
    padding: 1.5rem;
    flex: 1;
}

.system-message {
    align-self: center;
    text-align: center;
    color: var(--muted-foreground);
    margin: 0.75rem 0;
    font-style: italic;
    width: 100%;
    font-size: 0.875rem;
}

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

::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--foreground);
}

/* Hidden class */
.hidden {
    display: none !important;
}


.badge {
    padding: 0.375rem 0.625rem;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    vertical-align: middle;
    margin-left: auto;
}

.badge-generate {
    background: linear-gradient(321deg, #f9a8d4 0%, #e2ccf8 50%, #c8e9ff 100%);
    color: #0f172a;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.badge-generate i {
    font-size: 0.75rem;
}

.badge-outline{
    background: #FFF;
    color: #0f172a;
    border: 1px solid #e4e4e7;
    border-radius:0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-outline:hover {
    background:#f4f4f5;
    /* box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); */
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

/* Call Flow Builder Specific Styles */
.flow-builder {
    display: flex;
    height: calc(100vh - 64px);
    padding: 1.5rem;
    gap: 1.5rem;
}

.flow-submenu {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.flow-settings {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.flow-settings .form-group {
    margin-bottom: 0;
    flex: 1;
}

.flow-settings label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.flow-settings input,
.flow-settings select,
.flow-settings textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
}

.flow-settings button {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.flow-settings button:hover {
    background: #0c1321;
}

.components-panel {
    width: 300px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-y: auto;
}

.flow-canvas {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow: hidden;
    position: relative;
}

.flow-canvas-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
}

.flow-canvas-content {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
    transform-origin: center center;
}

.component-item {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all 0.2s ease;
}

.component-item:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.component-item i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.flow-node {
    position: absolute;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-width: 200px;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flow-node.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.flow-node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.flow-node-title {
    font-weight: 600;
    margin: 0;
}

.flow-node-actions {
    display: flex;
    gap: 0.5rem;
}

.flow-node-content {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.flow-connection {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.flow-connection-path {
    stroke: var(--primary);
    stroke-width: 2;
    fill: none;
}

.flow-connection-arrow {
    fill: var(--primary);
}

.component-category {
    margin-bottom: 1.5rem;
}

.component-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flow-toolbar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.flow-toolbar button {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.flow-toolbar button:hover {
    background: var(--muted);
}

.flow-toolbar button i {
    font-size: 1.25rem;
}

.node-port {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
}

.node-port.input {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port.output {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port:hover {
    transform: translateY(-50%) scale(1.2);
}

.stat-card{
    padding: 0.5rem;
}

.stat-value{
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
}

.stat-label{
    font-weight: 500;
}

/* Responsive adjustments for flow builder */
@media (max-width: 768px) {
    .flow-builder {
        flex-direction: column;
    }

    .components-panel {
        width: 100%;
        height: 200px;
    }

    .flow-settings {
        width: calc(100% - 2rem);
    }
}

/* Agent Builder Specific Styles */
.agent-builder {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    height: calc(100vh - 64px);
}

.agent-form {
    flex: 1;
    background: var(--card);
    padding: 0.5rem;
    overflow-y: auto;
}

.agent-preview {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

/* Tab Styles */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-tabs .nav-link {
    color: var(--muted-foreground);
    border: none;
    padding: 0.5rem 0.75rem;
    margin-right: 0.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.nav-tabs .nav-link i {
    font-size: 0.875rem;
    margin-right: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--foreground);
    background-color: var(--muted);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--primary-foreground);
    background-color: var(--primary);
    border: none;
    font-weight: 600;
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background-color: var(--muted);
    transform: translateY(-2px);
}

.checkbox-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-item label {
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    user-select: none;
}

/* Personality Traits Styles */
.personality-traits {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.form-check:hover {
    background-color: var(--muted);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.source-item {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.source-item-content {
    flex: 1;
}

.source-item-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.source-item-url {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.source-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--foreground);
}

.preview-chat {
    flex: 1;
    background: var(--muted);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-y: auto;
}

.preview-message {
    margin-bottom: 1rem;
    max-width: 85%;
}

.preview-message.assistant {
    margin-right: auto;
}

.preview-message.human {
    margin-left: auto;
}

.preview-input {
    display: flex;
    gap: 0.5rem;
}

.preview-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
}

.preview-input button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-input button:hover {
    background: #0c1321;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Add icon spacing for preview buttons */
.btn-check + .btn i {
    margin-right: 0.5rem;
}

.call-preview {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.call-preview.active {
    display: flex;
}

.call-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), #1e293b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-foreground), #e2e8f0);
    border-radius: 50%;
    animation: blob 12s ease-in-out infinite;
    opacity: 0.8;
}

.blob:nth-child(1) {
    animation-delay: 0s;
    transform: translate(0, 0) scale(1);
}

.blob:nth-child(2) {
    animation-delay: 3s;
    transform: translate(15px, 15px) scale(0.85);
}

.blob:nth-child(3) {
    animation-delay: 6s;
    transform: translate(-15px, -15px) scale(0.95);
}

.blob:nth-child(4) {
    animation-delay: 9s;
    transform: translate(8px, -8px) scale(0.75);
}

@keyframes blob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(15px, 15px) scale(0.85);
    }
    50% {
        transform: translate(-15px, -15px) scale(0.95);
    }
    75% {
        transform: translate(8px, -8px) scale(0.75);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

.call-status {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.call-timer {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

.call-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.call-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-foreground);
}

.call-button.mute {
    background: var(--muted);
    color: var(--foreground);
}

.call-button.mute:hover {
    background: var(--secondary);
}

.call-button.end {
    background: var(--destructive);
}

.call-button.end:hover {
    background: #dc2626;
}

.call-button i {
    font-size: 1.25rem;
}

.call-visualization {
    width: 100%;
    height: 60px;
    background: var(--muted);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.call-visualization::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0% { transform: translateY(-50%) scaleY(1); }
    50% { transform: translateY(-50%) scaleY(2); }
    100% { transform: translateY(-50%) scaleY(1); }
}

.chat-preview {
    display: none;
    flex-direction: column;
    height: 100%;
}

.chat-preview.active {
    display: flex;
}

/* Responsive adjustments for agent builder */
@media (max-width: 768px) {
    .agent-builder {
        flex-direction: column;
    }
}

/* Form Textarea Styles */
.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    resize: vertical;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
    outline: none;
}

/* Table Styles */
.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table th {
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove hover effect */
.table tbody tr:hover {
    background-color: var(--muted);
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.status-completed {
    background-color: #dcfce7;
    color: #166534;
}

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

.status-badge.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.status-canceled {
    background-color: #fff1f2;
    color: #dc2626;
}

.status-badge.status-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.status-light {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Expand Button Styles */
.expand-btn {
    padding: 0.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
}

.expand-btn:hover {
    background-color: var(--muted);
}

.expand-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

/* Filter and Column Toggle Styles */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    width: 300px;
}

.columns-toggle {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination Styles */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.pagination-info {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
}

.pagination-button:hover {
    background: var(--muted);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table Row and Accordion Styles */
.table tbody tr {
    border-bottom: 1px solid var(--border);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr.accordion-row {
    display: none;
    border-bottom: none;
}

.table tbody tr.accordion-row.show {
    display: table-row;
    background-color: var(--muted);
}

.table tbody tr.accordion-row > td {
    padding: 0;
}

.table .accordion-content {
    padding: 1rem;
    background: var(--muted);
}

.table .accordion-content .row {
    margin-left: 0;
    margin-right: 0;
}

.table .accordion-content .col-md-6 {
    padding-left: 0;
    padding-right: 0;
}

.table .accordion-content h6 {
    text-align: left;
    margin-bottom: 0.75rem;
}

.table .accordion-content p {
    text-align: left;
    margin-bottom: 0.5rem;
}

.table .expand-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.table .expand-btn i {
    transition: transform 0.2s ease;
}

/* Tab Group Styles */
.btn-group {
    background: var(--muted);
    padding: 0.25rem;
    border-radius: var(--radius);
    display: inline-flex;
    gap: 0.25rem;
}

.btn-check {
    position: absolute;
    clip: rect(0,0,0,0);
    pointer-events: none;
}

.btn-check + .btn {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: calc(var(--radius) - 0.125rem);
}

.btn-check:checked + .btn {
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Remove hover styles */
.btn-check + .btn:hover:not(:checked) {
    color: var(--foreground);
}

.btn-outline-primary {
    border: none !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    color: var(--foreground) !important;
}

/* Settings Specific Styles */
.settings-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.settings-header {
    margin-bottom: 2rem;
}

.settings-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.settings-description {
    color: var(--muted-foreground);
    font-size: 1rem;
}

.settings-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.settings-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-tab:hover {
    color: var(--foreground);
    background-color: var(--muted);
}

.settings-tab.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.settings-tab i {
    font-size: 1.25rem;
}

.settings-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section:nth-child(1) { animation: none; }
.settings-section:nth-child(2) { animation: none; }
.settings-section:nth-child(3) { animation: none; }
.settings-section:nth-child(4) { animation: none; }
.settings-section:nth-child(5) { animation: none; }

.settings-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section-title i {
    color: var(--primary);
}

/* Save Button */
.save-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.1), 0 3px 6px -1px rgba(0, 0, 0, 0.06);
}

.save-button i {
    font-size: 1.25rem;
}

/* Color Picker */
.color-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-preview {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-preview:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for settings */
@media (max-width: 768px) {
    .settings-container {
        padding: 1rem;
    }

    .settings-tabs {
        padding-bottom: 0.5rem;
    }

    .save-button {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
    }
}

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

/* Connections Specific Styles */
.connections-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.connections-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.add-connection-btn {
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.connection-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.connection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.connection-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-foreground);
}

.connection-info {
    flex: 1;
}

.connection-title {
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

.connection-status {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.connection-status.active {
    color: #22c55e;
}

.connection-status.inactive {
    color: var(--destructive);
}

.connection-actions {
    display: flex;
    gap: 0.5rem;
}

.connection-btn {
    padding: 0.5rem;
    border: none;
    background: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius);
}

.connection-btn:hover {
    background: var(--muted);
    color: var(--foreground);
}

.connection-details {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Modal Styles */
.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header .modal-title {
    font-size: 1.125rem;
    margin: 0;
}

.modal-back-btn {
    background: none;
    border: none;
    color: var(--muted-foreground);
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.modal-back-btn:hover {
    color: var(--foreground);
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.connection-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.connection-type-card {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.connection-type-card:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.connection-type-card.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
}

.connection-type-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.connection-type-title {
    font-weight: 500;
    margin: 0;
    font-size: 0.875rem;
}

.connection-type-description {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.connection-type-card.selected .connection-type-description {
    color: var(--primary-foreground);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.modal-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.modal-tab:hover {
    background: var(--muted);
    color: var(--foreground);
}

.modal-tab.active {
    background: var(--primary);
    color: var(--primary-foreground);
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* Modal Views */
.modal-view {
    display: none;
}

.modal-view.active {
    display: block;
}

/* Responsive adjustments for connections */
@media (max-width: 768px) {
    .connections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
} 