/* PodOps Connect Master CSS - Clean Modern Design */

/* Base Styles */
body {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* Layout Structure */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 20px 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Sidebar Styles - Enhanced Modern Design */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-right: 1px solid #e8ecef;
    padding: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
    overflow-y: auto;
    overflow-x: hidden;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.logo {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    background: white;
}

.logo img {
    max-width: 150px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.beta-text {
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #6D1A86, #2CC5FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.sidebar nav {
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    margin: 2px 12px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, #6D1A86, #2CC5FF);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 3px 3px 0;
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(109, 26, 134, 0.08), rgba(44, 197, 255, 0.08));
    color: #6D1A86;
    text-decoration: none;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(109, 26, 134, 0.1);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(109, 26, 134, 0.12), rgba(44, 197, 255, 0.12));
    color: #6D1A86;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(109, 26, 134, 0.15);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.25s ease;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-item.active .nav-icon {
    color: #6D1A86;
}

/* Collapsible Menu Improvements */
.collapsible {
    cursor: pointer;
}

.collapsible .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.collapsible:not(.collapsed) .fa-chevron-down {
    transform: rotate(180deg);
}

.collapsible.collapsed .fa-chevron-down {
    transform: rotate(0deg);
}

/* Submenu Styles */
.submenu {
    padding: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu .nav-item {
    padding: 9px 20px 9px 52px;
    font-size: 13.5px;
    margin: 1px 12px;
    font-weight: 500;
}

.submenu .nav-item .nav-icon {
    font-size: 14px;
    width: 16px;
    height: 16px;
}

/* Divider Styling */
.sidebar hr {
    border: none;
    border-top: 1px solid #e8ecef;
    margin: 16px 20px;
    opacity: 0.6;
}

.nav-section-title {
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

/* Header Styles */
.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 12px;
    width: 300px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    margin-left: 8px;
    width: 100%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Button Styles */
.btn {
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #6D1A86 0%, #2CC5FF 100%);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a1571 0%, #1fa8e6 100%);
    color: #fff;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #e8f0fe;
}

.btn-light {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-light:hover {
    background: #e8f0fe;
    color: #2CC5FF;
}

.bg-theme {
    background: linear-gradient(135deg, #6D1A86 0%, #2CC5FF 100%);
    color: white;
}

.bg-theme-btn {
    background: linear-gradient(135deg, #6D1A86 0%, #2CC5FF 100%);
    color: white;
    border: none;
}

.bg-theme-btn:hover {
    background: linear-gradient(135deg, #5a1571 0%, #1fa8e6 100%);
    color: white;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}

.card-header {
    border-bottom: 1px solid #e5e5e5;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table-borderless {
    border: none;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #333;
    padding: 12px 8px;
}

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

.table .fw-bold {
    font-weight: 600;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.badge.rounded-pill {
    border-radius: 50rem;
}

/* Form Styles */
.form-control {
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: #2CC5FF;
    box-shadow: 0 0 0 0.2rem rgba(44, 197, 255, 0.25);
}

/* Dropdown Styles */
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 8px 16px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f0f7ff;
    color: #2CC5FF;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: #6c757d; }
.fw-bold { font-weight: 600; }
.fw-semibold { font-weight: 500; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.d-flex { display: flex; }
.d-block { display: block; }
.align-items-center { align-items: center; }
.align-middle { vertical-align: middle; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.fa-3x { font-size: 3em; }
.fa-spin { animation: fa-spin 2s infinite linear; }

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

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Loading and Empty States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2CC5FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .search-box {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px 0;
    }
    
    .main-content {
        flex: 1;
    }
    
    .header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-box {
        width: 200px;
        order: 2;
    }
    
    .user-menu {
        order: 1;
        gap: 10px;
    }
    
    .content {
        padding: 20px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .row {
        margin-right: -10px;
        margin-left: -10px;
    }
    
    .col-6, .col-12 {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 10px 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .user-menu {
        justify-content: center;
    }
    
    .content {
        padding: 15px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .table th, .table td {
        padding: 8px 4px;
        font-size: 13px;
    }

    .btn-light {
        width: 28px;
        height: 28px;
    }
}

/* Dropdown Menu Z-Index Fix - Ensure dropdowns appear above table rows */
.dropdown-menu {
    z-index: 1050 !important;
}

.table .dropdown {
    position: relative;
    z-index: 10;
}

.table tbody tr {
    position: relative;
    z-index: 1;
}