/* Ana stil dosyası */

/* Genel Stiller */
body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    padding-top: 60px;
    background-color: #343a40;
    transition: all 0.3s ease;
    width: 250px;
}

/* Mobil görünümde sidebar başlangıçta gizli */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -250px !important;
        transform: translateX(-100%);
    }
    
    #sidebar.active {
        margin-left: 0 !important;
        transform: translateX(0);
    }
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 60px);
    padding-top: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #ced4da;
    padding: 0.75rem 1rem;
    margin: 0.2rem 0;
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(0, 123, 255, 0.7);
    border-radius: 0.25rem;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* Ana içerik */
.main-content {
    margin-left: 250px;
    padding: 1.5rem;
    transition: all 0.3s;
    width: calc(100% - 250px);
}

/* Responsive ayarlar - Mobil görünüm */
@media (max-width: 991px) {
    .sidebar {
        margin-left: -250px;
        box-shadow: none;
        z-index: 1050; /* Navbardan yüksek z-index */
        transition: all 0.3s ease;
    }
    
    .sidebar.active {
        margin-left: 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        transition: all 0.3s ease;
    }
    
    /* Mobil menü toggle buton stili */
    #sidebar-toggle {
        display: inline-block !important;
        cursor: pointer;
        color: white;
        font-size: 1.2rem;
        border: none;
        background: transparent;
        padding: 0.5rem;
        border-radius: 4px;
    }
    
    #sidebar-toggle:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    #sidebar-toggle:focus {
        outline: none;
    }
    
    .navbar-toggler {
        display: block !important;
    }
    
    /* Mobil ekranda sidebar overlay etkisi */
    .sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }
    
    .sidebar.active::before {
        opacity: 1;
        pointer-events: all;
    }
}

/* Tablet için ek düzenlemeler */
@media (min-width: 768px) and (max-width: 991px) {
    .main-content {
        padding: 1.25rem;
    }
}

/* Çok küçük ekranlar için ek düzenlemeler */
@media (max-width: 576px) {
    .main-content {
        padding: 0.75rem;
    }
}

/* Navbar */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-collapse {
    background-color: #343a40;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    width: 200px;
    position: absolute;
    right: 10px;
    top: 55px;
    z-index: 1500;
    transform-origin: top;
    animation: dropdown 0.3s ease;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Dropdown menü stili */
.dropdown-menu {
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    z-index: 1500;
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: auto;
    min-width: 180px;
    animation: dropdown 0.3s ease;
    transform-origin: top;
}

/* Menü açılınca renklerin görünür olması için */
.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #495057;
    color: white;
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.4rem;
    }
}

/* Bot Kontrol Paneli */
.bot-card {
    transition: all 0.3s;
}

.status-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #dc3545;
}

/* Loglar */
.log-container {
    height: 300px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .log-container {
        height: 250px;
        font-size: 0.75rem;
    }
}

.log-entry {
    margin-bottom: 0.25rem;
    padding: 0.25rem;
    border-bottom: 1px solid #eee;
    word-break: break-word;
}

.log-time {
    color: #6c757d;
    margin-right: 0.5rem;
}

.log-success {
    color: #28a745;
}

.log-error {
    color: #dc3545;
}

.log-info {
    color: #17a2b8;
}

/* Kullanıcı Tablosu */
.user-table th, .user-table td {
    vertical-align: middle;
}

@media (max-width: 767px) {
    .user-table {
        font-size: 0.85rem;
    }
    
    .table-responsive {
        border: 0;
    }
    
    .user-action-buttons .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Form Elemanları */
.custom-switch {
    padding-left: 2.25rem;
}

.form-floating {
    position: relative;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .form-floating {
        margin-bottom: 0.75rem;
    }
    
    .form-control {
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.375rem 0.75rem;
        font-size: 0.95rem;
    }
}

/* Bot Durum Kartı */
.bot-status-card {
    border-left: 5px solid;
    transition: all 0.3s;
}

.bot-status-active {
    border-left-color: #28a745;
}

.bot-status-inactive {
    border-left-color: #dc3545;
}

/* Dashboard İstatistik Kartları */
.stat-card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-card-body {
    padding: 1.25rem;
}

.stat-card-icon {
    font-size: 2rem;
    opacity: 0.7;
}

@media (max-width: 767px) {
    .stat-card {
        margin-bottom: 0.75rem;
    }
    
    .stat-card-body {
        padding: 1rem;
    }
    
    .stat-card-icon {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Login sayfası */
.login-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 400px;
    margin: 2rem auto;
}

.login-header {
    padding: 1.5rem;
}

.login-body {
    padding: 2rem;
}

@media (max-width: 576px) {
    .login-card {
        margin: 1rem auto;
        max-width: 100%;
    }
    
    .login-header {
        padding: 1.25rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
}

/* Özel renkler */
.bg-primary-dark {
    background-color: #0062cc;
}

.text-primary-dark {
    color: #0062cc;
}

/* Animasyonlar */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dropdown {
    from { 
        opacity: 0;
        transform: translateY(-20px) scaleY(0.8);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

/* Yükleniyor animasyonu */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s linear infinite;
}

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