/* BotFast Theme CSS */
:root {
    --botfast-green: #2ECC71;
    --botfast-yellow: #F1C40F;
    --botfast-orange: #E67E22;
    --botfast-white: #ffffff;
    --botfast-black: #000000;
    --botfast-dark-gray: #2C3E50;
    --botfast-light-gray: #F8F9FA;
    --botfast-blue: #3498DB;
    --botfast-purple: #9B59B6;
    --shadow-primary: 0 8px 25px rgba(46, 204, 113, 0.15);
    --shadow-secondary: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 35px rgba(46, 204, 113, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    
    /* Legacy color variables for backward compatibility */
    --ufo-green: var(--botfast-green);
    --mustard-yellow: var(--botfast-yellow);
    --vivid-tangelo: var(--botfast-orange);
    --white: var(--botfast-white);
    --black: var(--botfast-black);
    --light-gray: var(--botfast-light-gray);
    --dark-gray: var(--botfast-dark-gray);
    --shadow-sm: var(--shadow-secondary);
    --shadow-md: var(--shadow-primary);
    --shadow-lg: var(--shadow-hover);
}

/* General body styling */
body {
    font-family: 'Changa', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--botfast-light-gray);
    color: var(--botfast-dark-gray);
    margin: 0;
    padding: 0;
}

/* Sidebar Navigation */
.botfast-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--botfast-dark-gray);
    border-right: 3px solid var(--botfast-green);
    box-shadow: var(--shadow-primary);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.botfast-sidebar.collapsed {
    width: 70px;
}

.botfast-sidebar::-webkit-scrollbar {
    width: 6px;
}

.botfast-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.botfast-sidebar::-webkit-scrollbar-thumb {
    background: var(--botfast-white);
    border-radius: 3px;
}

.botfast-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--botfast-yellow);
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--botfast-green) 0%, #27ae60 100%);
    color: var(--botfast-white);
    text-align: center;
    border-bottom: 3px solid var(--botfast-yellow);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--botfast-white);
    font-weight: 700;
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    color: var(--botfast-white);
    text-decoration: none;
    transform: scale(1.02);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
}

.botfast-sidebar.collapsed .sidebar-logo {
    margin-right: 0;
    width: 35px;
    height: 35px;
}

.sidebar-brand-text {
    opacity: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.botfast-sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--botfast-yellow);
    color: var(--botfast-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    transition: all 0.3s ease;
    z-index: 10;
}

.sidebar-toggle-btn:hover {
    background: var(--botfast-orange);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-hover);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

.botfast-sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    margin: 0.15rem 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--botfast-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
    transition: width 0.3s ease;
    z-index: 0;
}

.sidebar-nav .nav-link:hover::before {
    width: 100%;
}

.sidebar-nav .nav-link:hover {
    background: var(--botfast-green);
    color: var(--botfast-white);
    border-left-color: var(--botfast-white);
    transform: translateX(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.sidebar-nav .nav-link.active {
    background: var(--botfast-green);
    color: var(--botfast-white);
    border-left-color: var(--botfast-yellow);
    box-shadow: var(--shadow-secondary);
}

.sidebar-nav .nav-link.active::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.botfast-sidebar.collapsed .sidebar-nav .nav-link {
    padding: 1rem;
    justify-content: center;
    text-align: center;
}

.botfast-sidebar.collapsed .sidebar-nav .nav-link i {
    margin-right: 0;
    font-size: 1.2rem;
}

.nav-link-text {
    opacity: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.botfast-sidebar.collapsed .nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-chevron {
    margin-left: auto;
    transition: all 0.3s ease;
    opacity: 1;
}

.botfast-sidebar.collapsed .nav-chevron {
    opacity: 0;
    width: 0;
}

/* Dropdown in Sidebar */
.sidebar-dropdown {
    background: rgba(46, 204, 113, 0.05);
    margin: 0;
    border-left: 3px solid var(--botfast-green);
    transition: all 0.3s ease;
}

.botfast-sidebar.collapsed .sidebar-dropdown {
    display: none;
}

.sidebar-dropdown .dropdown-item {
    padding: 0.75rem 3rem;
    color: var(--botfast-white);
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.sidebar-dropdown .dropdown-item::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--botfast-green);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar-dropdown .dropdown-item:hover {
    background: var(--botfast-green);
    color: var(--botfast-white);
    transform: translateX(8px);
    padding-left: 3.5rem;
}

.sidebar-dropdown .dropdown-item:hover::before {
    background: var(--botfast-white);
    transform: translateY(-50%) scale(1.5);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

/* Tooltip for collapsed sidebar */
.sidebar-tooltip {
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--botfast-dark-gray);
    color: var(--botfast-white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: var(--shadow-primary);
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--botfast-dark-gray);
}

.botfast-sidebar.collapsed .nav-item:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
    left: 80px;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .botfast-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .botfast-sidebar.show {
        transform: translateX(0);
    }
    
    .botfast-sidebar.collapsed {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .botfast-sidebar.collapsed.show {
        transform: translateX(0);
    }
    
    .main-content,
    .main-content.sidebar-collapsed {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    .sidebar-toggle-btn {
        display: none;
    }
}

/* Mobile Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--botfast-green);
    color: var(--botfast-white);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--shadow-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .botfast-sidebar {
        transform: translateX(-100%);
    }
    
    .botfast-sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Page Container */
.page-container {
    padding: 2rem 0;
}

/* Card Styling */
.botfast-card {
    background: var(--botfast-white);
    border-radius: 16px;
    box-shadow: var(--shadow-primary);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.botfast-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.botfast-card-header {
    background: var(--botfast-green);
    color: var(--botfast-white);
    padding: 1.5rem;
    border-bottom: 3px solid var(--botfast-yellow);
}

.botfast-card-body {
    padding: 2rem;
}

/* Button Styles */
.btn-botfast-primary {
    background: var(--botfast-green);
    border: none;
    color: var(--botfast-white);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-secondary);
}

.btn-botfast-primary:hover {
    background: var(--botfast-yellow);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    color: var(--botfast-white);
}

.btn-botfast-secondary {
    background: var(--botfast-orange);
    border: none;
    color: var(--botfast-white);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-secondary);
}

.btn-botfast-secondary:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    color: var(--botfast-white);
}

/* Alert Styling */
.alert-botfast-success {
    background: var(--botfast-green);
    border: none;
    color: var(--botfast-white);
    border-radius: 12px;
    box-shadow: var(--shadow-secondary);
}

.alert-botfast-warning {
    background: var(--botfast-yellow);
    border: none;
    color: var(--botfast-white);
    border-radius: 12px;
    box-shadow: var(--shadow-secondary);
}

.alert-botfast-danger {
    background: var(--botfast-orange);
    border: none;
    color: var(--botfast-white);
    border-radius: 12px;
    box-shadow: var(--shadow-secondary);
}

/* Form Styling */
.form-control:focus {
    border-color: var(--botfast-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
}

.form-select:focus {
    border-color: var(--botfast-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
}

/* Table Styling */
.table-botfast {
    background: var(--botfast-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-secondary);
}

.table-botfast thead {
    background: var(--botfast-green);
    color: var(--botfast-white);
}

.table-botfast tbody tr:hover {
    background: rgba(46, 204, 113, 0.1);
}

/* Footer */
.botfast-footer {
    background: var(--botfast-dark-gray);
    color: var(--botfast-white);
    padding: 2rem 0;
    margin-top: 3rem;
}

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

::-webkit-scrollbar-track {
    background: var(--botfast-light-gray);
}

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

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

/* Loading Animation */
.botfast-loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--botfast-light-gray);
    border-top: 4px solid var(--botfast-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Enhanced Admin Management Styles */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-botfast-green {
    background-color: var(--botfast-green);
    border-color: var(--botfast-green);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-botfast-green:hover {
    background-color: #27ae60;
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    color: white;
}

/* Admin Table Enhancements */
.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    font-size: 2.5rem;
    color: var(--botfast-green);
}

.admin-name {
    font-weight: 600;
    color: var(--botfast-black);
    margin-bottom: 2px;
}

.admin-email {
    color: #6c757d;
    font-size: 0.85rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.role-super-admin {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.role-country-admin {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--botfast-green);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.role-customer-care {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--botfast-orange);
    border: 1px solid rgba(230, 126, 34, 0.2);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.country-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--botfast-orange);
}

.admin-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    color: var(--botfast-green);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.admin-row:hover {
    background-color: rgba(46, 204, 113, 0.05);
}

/* Form Enhancements */
.botfast-input, .botfast-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.botfast-input:focus, .botfast-select:focus {
    border-color: var(--botfast-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
    background-color: #ffffff;
}

.password-input-group {
    position: relative;
    display: flex;
}

.password-input-group input {
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.password-toggle {
    border-radius: 0 10px 10px 0;
    border-left: none;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background-color: var(--botfast-green);
    color: white;
    border-color: var(--botfast-green);
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--botfast-green) 0%, transparent 100%);
    border-radius: 2px;
}

.field-value {
    font-size: 1rem;
    color: #495057;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--botfast-green);
}

/* Enhanced Card Styling */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-secondary);
    transition: var(--transition);
    background: var(--botfast-white);
    border-left: 4px solid var(--botfast-green);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--botfast-blue);
}

.card-header {
    background: var(--botfast-green);
    color: var(--botfast-white);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 15px 20px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--botfast-yellow);
}

/* Enhanced Table Styling */
.table {
    background: var(--botfast-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-secondary);
    border: 1px solid #e9ecef;
}

.table thead th {
    background: var(--botfast-green);
    color: var(--botfast-white);
    border: none;
    padding: 15px;
    font-weight: 600;
    position: relative;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--botfast-yellow);
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #f1f3f4;
}

.table tbody tr:hover {
    background-color: rgba(46, 204, 113, 0.05);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Enhanced Form Styling */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 12px 15px;
    transition: var(--transition);
    background: var(--botfast-white);
}

.form-control:focus {
    border-color: var(--botfast-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.15);
    background: var(--botfast-white);
}

.form-control:hover {
    border-color: var(--botfast-blue);
}

.form-label {
    color: var(--botfast-dark-gray);
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--botfast-green);
    border-radius: 1px;
}

/* Stats Cards */
.stats-card {
    background: var(--botfast-white);
    color: var(--botfast-dark-gray);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--botfast-green);
    box-shadow: var(--shadow-secondary);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--botfast-green);
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--botfast-blue);
}

.stats-card:hover::before {
    background: var(--botfast-blue);
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--botfast-green);
    transition: var(--transition);
}

.stats-card:hover h3 {
    color: var(--botfast-blue);
}

.stats-card p {
    margin: 10px 0 0 0;
    opacity: 0.8;
    font-weight: 500;
}

/* Enhanced Animations */
@keyframes botfast-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.stats-card:nth-child(2n) {
    animation: float 3s ease-in-out infinite;
    animation-delay: 0.5s;
}
