/* Hide page scrollbar */
html,
body {
    overflow-x: hidden;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar {
    height: 100vh;
    background: linear-gradient(135deg, #4568dc 0%, #b06ab3 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.3s ease;
    font-weight: 500;
}
.sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    font-weight: 600;
}
.sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    border-left: 3px solid #ffffff;
}
.sidebar .nav-link.active i {
    color: #ffffff;
    font-weight: bold;
}
.sidebar .nav-link i {
    transition: all 0.3s ease;
}
.sidebar .nav-link:hover i {
    color: #ffffff;
}
.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
    margin-left: 0;
    padding-left: 0;
}

/* Responsive adjustments for sidebar */
@media (min-width: 768px) {
    .main-content {
        margin-left: 16.666667%; /* col-md-2 equivalent */
    }
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 16.666667%; /* col-lg-2 equivalent */
    }
}
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
}
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.stat-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}
.stat-card.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}
.stat-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.stat-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.loading {
    display: none;
}
.loading.show {
    display: block;
}
.config-form {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.page {
    display: none;
}
.page.active {
    display: block;
}
.rule-card {
    border-left: 4px solid #007bff;
    margin-bottom: 1rem;
}
.rule-card.inactive {
    border-left-color: #6c757d;
    opacity: 0.7;
}
.template-card {
    border-left: 4px solid #28a745;
    margin-bottom: 1rem;
}
.settings-section {
    background: #f8f9fa;
    width: 100%;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.action-badge {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}
.modal-xl {
    max-width: 90%;
}
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}
.team-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}
.team-info-card .card-body {
    padding: 1rem;
}
.team-info-card h6 {
    color: white;
    margin-bottom: 0;
}
.team-info-card .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}
.team-info-card .form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 0.875rem;
}
.team-info-card .form-select:focus {
    background-color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Pulse animation for unread emails */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1s ease-in-out;
}

/* Inner scroller styles */
.inner-scroller {
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}
/* Inner scroller height for templates and rules */
.inner-scroller-height-400 {
    max-height: 400px;
}
.inner-scroller-height-500 {
    max-height: 500px;
}

.inner-scroller::-webkit-scrollbar {
    width: 8px;
}

.inner-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.inner-scroller::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.inner-scroller::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Table responsive wrapper for logs */
.table-responsive-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* Fixed table headers */
.table-responsive-scroll table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

.table-responsive-scroll::-webkit-scrollbar {
    width: 8px;
}

.table-responsive-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Auto-generated field styling */
.form-control[disabled] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
}

/* Template ID validation styling */
#template-id-validation {
    transition: all 0.3s ease;
}

#template-id-validation .text-success {
    color: #28a745 !important;
    font-weight: 500;
}

#template-id-validation .text-danger {
    color: #dc3545 !important;
    font-weight: 500;
}

#template-id-validation small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#template-id-validation .text-success::before {
    content: "✓";
    font-weight: bold;
}

#template-id-validation .text-danger::before {
    content: "⚠";
    font-weight: bold;
}

/* Folder input styling to match theme */
.folder-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    border-color: #ced4da;
}

.input-group:focus-within .input-group-text {
    border-color: #86b7fe;
    z-index: 3;
}
