:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.glass-alert {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.premium-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(15, 23, 42, 0.9);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-content {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-main);
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

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

.table>thead {
    background-color: rgba(0,0,0,0.2);
}

.table>thead>tr>th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table>tbody>tr>td {
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.table>tbody>tr:hover>td {
    background-color: rgba(255,255,255,0.02);
    color: var(--text-main);
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-running {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-stopped {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.table>tbody>tr>td {
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding: 1.25rem 0.5rem;
}

.btn-action {
    width: 36px; 
    height: 36px; 
    padding: 0; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 10px !important;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
}

/* Premium Service & Status Badges */
.service-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.service-active {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.service-inactive {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

/* Hover-to-reveal tokens */
.hover-reveal {
    position: relative;
    cursor: pointer;
}
.hover-reveal .masked {
    transition: filter 0.2s ease;
}
.hover-reveal:hover .masked {
    filter: blur(0px) !important;
}

/* Responsive Card Layout for Mobile */
.bot-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bot-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}
.card-detail-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.card-detail-item:last-child {
    border-bottom: none;
}

/* Premium Nav Pills & Tabs */
.nav-pills .nav-link {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    transition: all 0.2s ease;
}
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    border-color: transparent !important;
}
.nav-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}
.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none !important;
    background: transparent !important;
    padding: 0.75rem 1.2rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
}
.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--primary) !important;
}
.nav-tabs .nav-link:hover:not(.active) {
    color: var(--text-main) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

/* App Layout & Sidebar (PC) */
@media (min-width: 992px) {
    .app-layout {
        display: flex;
        min-height: 100vh;
    }
    .sidebar {
        width: 260px;
        min-width: 260px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-right: 1px solid var(--border-color);
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
    }
    .main-content {
        flex-grow: 1;
        margin-left: 260px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    .content-container {
        max-width: 1400px;
        width: 100%;
        margin: 0 auto;
    }
}

/* Sidebar Styling Details */
.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
}
.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.nav-item-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}
.nav-item-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}
.nav-item-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

/* Mobile Header & Bottom Navigation */
@media (max-width: 991.98px) {
    body {
        padding-top: 56px; /* Space for fixed mobile header */
        padding-bottom: 76px; /* Space for fixed mobile bottom nav */
    }
    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        z-index: 1030;
    }
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        z-index: 1030;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-nav-container {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        height: 100%;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.75rem;
        gap: 4px;
        transition: all 0.2s ease;
    }
    .mobile-nav-item i {
        font-size: 1.25rem;
        transition: transform 0.2s ease;
    }
    .mobile-nav-item:hover {
        color: var(--text-main);
    }
    .mobile-nav-item.active {
        color: var(--primary);
    }
    .mobile-nav-item.active i {
        transform: translateY(-2px);
    }
}




