/**
 * Mother Bot Panel - Custom Styles
 * Bootstrap 5 Dark Theme Enhancements
 */

:root {
    --mbp-primary: #6366f1;
    --mbp-primary-dark: #4f46e5;
    --mbp-secondary: #64748b;
    --mbp-success: #22c55e;
    --mbp-warning: #f59e0b;
    --mbp-danger: #ef4444;
    --mbp-info: #06b6d4;
    --mbp-dark: #0f172a;
    --mbp-darker: #020617;
    --mbp-light: #f1f5f9;
    --mbp-sidebar-width: 260px;
    --mbp-sidebar-collapsed: 70px;
    --mbp-topbar-height: 60px;
}

/* Body & Layout */
body {
    background-color: var(--mbp-darker);
    color: var(--mbp-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--mbp-sidebar-width);
    height: 100vh;
    background: var(--mbp-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mbp-light);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-section {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--mbp-secondary);
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: var(--mbp-light);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: var(--mbp-primary);
    background: rgba(99, 102, 241, 0.1);
    border-right: 3px solid var(--mbp-primary);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--mbp-sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--mbp-topbar-height);
    padding: 0 1.5rem;
    background: var(--mbp-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    color: var(--mbp-light);
    display: none;
}

.page-content {
    padding: 2rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Cards */
.card {
    background: var(--mbp-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: var(--mbp-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--mbp-secondary);
    font-size: 0.875rem;
}

/* Tables */
.table {
    color: var(--mbp-light);
}

.table thead th {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Forms */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--mbp-light);
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--mbp-primary);
    color: var(--mbp-light);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-control::placeholder {
    color: var(--mbp-secondary);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--mbp-secondary);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--mbp-secondary);
}

/* Buttons */
.btn-primary {
    background: var(--mbp-primary);
    border-color: var(--mbp-primary);
}

.btn-primary:hover {
    background: var(--mbp-primary-dark);
    border-color: var(--mbp-primary-dark);
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--mbp-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Guest Layout */
.guest-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Avatar Circle */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.avatar-circle.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -2rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
}

.timeline-content {
    padding-left: 0.5rem;
}

/* Bot Card */
.bot-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Product Card */
.product-card {
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
}

/* List Group */
.list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--mbp-light);
}

.list-group-item.active {
    background: var(--mbp-primary);
    border-color: var(--mbp-primary);
}

.list-group-item-action:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--mbp-light);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Modals */
.modal-content {
    background: var(--mbp-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
.dropdown-menu {
    background: var(--mbp-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: var(--mbp-light);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--mbp-light);
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Nav Tabs */
.nav-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: var(--mbp-secondary);
    border: none;
}

.nav-tabs .nav-link:hover {
    color: var(--mbp-light);
    border: none;
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--mbp-primary);
    border: none;
    border-bottom: 2px solid var(--mbp-primary);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item a {
    color: var(--mbp-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--mbp-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--mbp-secondary);
}

/* Pagination */
.page-link {
    background: var(--mbp-dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--mbp-light);
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--mbp-light);
}

.page-item.active .page-link {
    background: var(--mbp-primary);
    border-color: var(--mbp-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mbp-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--mbp-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mbp-primary);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}
