/* Voice AI Space - Scout Relay Design System */

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

:root {
    /* Font Variables */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Liberation Mono", "SF Mono", Consolas, "Courier New", monospace;
    /* Primary Colors */
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;

    /* Interactive Elements */
    --primary: #1e293b;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #1e293b;

    /* Borders & Inputs */
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #0f172a;

    /* Status Colors */
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #1e293b;
    --destructive: #dc2626;
    --destructive-foreground: #f8fafc;
}

/* Dark theme */
.dark {
    --background: #000000;
    --foreground: #fafafa;
    --card: #000000;
    --card-foreground: #fafafa;
    --primary: #fafafa;
    --primary-foreground: #171717;
    --secondary: #262626;
    --secondary-foreground: #fafafa;
    --border: #ffffff;
    --input: #333333;
    --muted: #262626;
    --muted-foreground: #a5a5a5;
    --destructive: #7f1d1d;
}

/* Typography System */
* {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    background: var(--background);
    color: var(--foreground);
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.2;
}

.font-inter, .font-inter * {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.font-mono, .font-mono *, code, pre {
    font-family: var(--font-mono) !important;
}

/* Force navbar brand font */
.navbar-brand, .navbar-brand *, .navbar-brand span, .navbar-brand em, .navbar-brand strong {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Force dashboard title font */
.text-4xl, .text-3xl, .text-2xl, .text-xl {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Force all headings to use Inter */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand,
.card-title {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Typography Scale */
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Grid Background Pattern */
.bg-grid {
    background-image:
        linear-gradient(to right, rgba(156, 163, 175, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(156, 163, 175, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(to right, rgba(156, 163, 175, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(156, 163, 175, 0.08) 1px, transparent 1px);
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    transition: box-shadow 0.2s ease;
    color: var(--card-foreground);
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.dark .card {
    border: 1px solid #ffffff;
}

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

.card-body {
    padding: 1rem;
}

.card-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 1rem;
}

/* Buttons */
.btn {
    font-family: var(--font-inter);
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-primary:hover {
    background: #1f2937;
    border-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: #ffffff;
}

.btn-outline-primary {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline-primary:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--border);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

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

.btn-success {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-outline-success {
    background: transparent;
    color: #22c55e;
    border: 1px solid #22c55e;
}

.btn-outline-success:hover {
    background: #22c55e;
    color: #ffffff;
}

.btn-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border: 1px solid var(--destructive);
}

.btn-outline-danger {
    background: transparent;
    color: var(--destructive);
    border: 1px solid var(--destructive);
}

.btn-outline-danger:hover {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-warning {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-outline-warning {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    color: #ffffff;
}

.btn-info {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-outline-info {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-outline-info:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* Forms */
.form-control {
    border-radius: 0;
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-inter);
}

.form-control:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--ring);
    outline: none;
}

.form-select {
    border-radius: 0;
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
}

.form-label {
    font-weight: 500;
    color: var(--foreground);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tables */
.table {
    color: var(--foreground);
}

.table th {
    font-weight: 600;
    background: var(--muted);
    border-bottom: 2px solid var(--border);
    font-family: var(--font-mono) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    border-color: var(--border);
}

.table-hover tbody tr:hover {
    background: var(--accent);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0;
    border: 1px solid var(--border);
    background: var(--secondary);
    color: var(--secondary-foreground);
    font-family: var(--font-mono) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.bg-success {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.badge.bg-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}

.badge.bg-warning {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

.badge.bg-secondary {
    background: var(--muted);
    color: var(--muted-foreground);
    border-color: var(--border);
}

/* Channel type badges */
.badge-channel-discord {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.badge-channel-telegram {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.badge-channel-whatsapp {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.badge-channel-slack {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.badge-channel-twitter {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Voice AI Header Navigation */
.voiceai-header {
    background: #ffffff !important;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 2rem;
    min-height: 70px;
    margin: 1rem auto;
    margin-bottom: 2rem;
    max-width: 1200px;
}

.voiceai-header .container-fluid {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Brand Styling */
.navbar-brand {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    color: #111827 !important;
    text-decoration: none;
    padding: 0;
    margin-right: 3rem;
}

.navbar-brand:hover {
    color: #111827 !important;
    text-decoration: none;
}

.brand-text {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.brand-text *, 
.brand-text span, 
.brand-text em, 
.brand-text strong {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Main Navigation */
.main-nav {
    gap: 1rem;
}

.main-nav .nav-link {
    color: #6b7280 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem !important;
    transition: color 0.2s ease;
    text-decoration: none;
    border: none;
    border-radius: 0;
    background: transparent;
}

.main-nav .nav-link:hover {
    color: #111827 !important;
    background-color: transparent;
    text-decoration: none;
}

.main-nav .nav-link.active {
    color: #111827 !important;
    font-weight: 600 !important;
    background-color: transparent;
}


/* Dropdown Menus */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: var(--card);
    margin-top: 8px;
}

.dropdown-item {
    color: var(--card-foreground);
    padding: 8px 16px;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* Mobile Responsive */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* User Dropdown Button */
.btn-link.text-muted {
    color: #6b7280 !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0 !important;
}

.btn-link.text-muted:hover {
    color: #111827 !important;
    text-decoration: none !important;
}

@media (max-width: 991px) {
    .voiceai-header {
        padding: 1rem;
        margin: 1rem;
    }
    
    .main-nav {
        margin-top: 1rem;
        gap: 0;
    }
    
    .main-nav .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #f3f4f6;
    }
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 0;
    margin-right: 8px;
    border: 1px solid var(--border);
}

.status-active {
    background: #000000;
}

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

/* Alerts */
.alert {
    border-radius: 0;
    border: 1px solid var(--border);
    font-family: var(--font-inter);
}

.alert-success {
    background: var(--background);
    color: #22c55e;
    border-color: #22c55e;
}

.alert-danger {
    background: var(--background);
    color: var(--destructive);
    border-color: var(--destructive);
}

.alert-warning {
    background: var(--background);
    color: #f59e0b;
    border-color: #f59e0b;
}

.alert-info {
    background: var(--background);
    color: #3b82f6;
    border-color: #3b82f6;
}

/* Progress bars */
.progress {
    height: 6px;
    border-radius: 0;
    background: var(--muted);
}

.progress-bar {
    border-radius: 0;
}

.progress-bar.bg-success {
    background: #000000;
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: var(--card);
}

.dropdown-item {
    color: var(--card-foreground);
    padding: 8px 16px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* Container */
.container, .container-fluid {
    max-width: 1400px;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Loading states */
.btn-loading {
    position: relative;
    color: transparent !important;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus states */
.form-control:focus,
.btn:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive breakpoints */
@media (min-width: 640px) { 
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) { 
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) { 
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) { 
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1536px) { 
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    h1, .h1 {
        font-size: 1.875rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
}

/* Stat Card Styles */
.stat-card .card-body {
    padding: 1rem 1.25rem;
    min-height: auto;
}

.stat-card h3 {
    line-height: 1;
}

.stat-card p {
    margin-bottom: 0;
    margin-top: 0.25rem;
}

/* Icon Background Styles */
.icon-bg {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 6px !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    opacity: 1 !important;
}

/* Footer Styles */
.footer {
    border-top: 1px solid var(--border);
    background: var(--background);
    margin-top: auto;
}

.footer small {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scout Card Styles */
.scout-card {
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.scout-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.scout-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--foreground);
}

.stat-box {
    padding: 0.75rem;
    background: var(--muted);
    border-radius: 4px;
    text-align: center;
    transition: background 0.2s ease;
}

.stat-box:hover {
    background: var(--secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.scout-card .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    letter-spacing: 0.02em;
}

.scout-card .btn-primary {
    font-weight: 500;
    padding: 0.625rem 1rem;
}

.scout-card .btn-outline-primary,
.scout-card .btn-outline-secondary {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Format date short for compact display */
.format-date-short {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Scout Name Box on Detail Page */
.scout-name-box {
    border: 1px solid var(--foreground);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    background: var(--background);
}

.scout-name-box h1 {
    margin: 0;
    padding: 0;
}

.scout-name-box .status-indicator {
    margin-right: 0.75rem;
}