/* Genel Ayarlar */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    color: #333;
}

.wrapper {
    display: flex;
}

/* Sidebar Navigasyon */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #fff;
    min-height: 100vh;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
}

.sidebar .components {
    padding: 20px 0;
    border-bottom: 1px solid #475a6a;
}

.sidebar ul li a {
    padding: 10px 20px;
    display: block;
    font-size: 1.1em;
    color: #ced4da;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar ul li a:hover {
    color: #fff;
    background: #34495e;
}

.sidebar ul.cta {
    padding: 20px;
}

/* Ana İçerik Alanı */
.content {
    width: 100%;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h1 {
    font-size: 1.5em;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* Butonlar */
.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Tablo */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider.round {
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Modal (Popup) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 22px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.close-btn:hover {
    color: #333;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #4A90E2;
    outline: none;
}

input[type="number"],
.form-control .rate-limit-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.btn-success {
    background-color: #28a745;
    border: none;
    color: #fff;
    padding: 3px 5px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn-success:hover {
    background-color: #218838;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Bildirim Mesajları (Alerts) */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Form Elemanları için Ek Stiller */
.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Platform */
.platform-badge-pinterest {
    background-color: #E60023;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-twitter {
    background-color: #1DA1F2;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-plurk {
    background-color: #bf5600;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-telegram {
    background-color: #006292;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-tumblr {
    background-color: #35465C;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Diğer platformlar için de benzer stiller eklenebilir */

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
}

.status-success {
    background-color: #2ecc71;
}

.status-failed {
    background-color: #e74c3c;
}

.status-processing {
    background-color: #f39c12;
}

.status-pending {
    background-color: #95a5a6;
}

.log-box {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    gap: 6px;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #f0f0f0;
    border-color: #aaa;
}

.pagination a.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

.pagination a.first-page,
.pagination a.last-page,
.pagination a.prev-page,
.pagination a.next-page {
    font-weight: bold;
}

/* Dashboard Grid Yapısı */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-3 {
    width: 25%;
    padding: 0 10px;
    box-sizing: border-box;
}

.col-4 {
    width: 33.33%;
    padding: 0 10px;
    box-sizing: border-box;
}

.col-8 {
    width: 66.66%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* İstatistik Kartları */
.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 16px;
}

.stat-card p {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
    color: #2c3e50;
}

.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: #ecf0f1;
}

/* Hesap Durum Listesi */
.account-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.status-active {
    background-color: #2ecc71;
}

.status-dot.status-inactive {
    background-color: #95a5a6;
}

.status-dot.status-reauth_needed {
    background-color: #e74c3c;
}

.platform-badge-sm {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.account-name {
    font-weight: 500;
}

/* Yaklaşan Paylaşımlar Listesi */
.upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upcoming-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.upcoming-list li:last-child {
    border-bottom: none;
}

.upcoming-list li span {
    display: block;
    color: #555;
    font-size: 14px;
}

.upcoming-list li small {
    color: #95a5a6;
    font-size: 12px;
}

.table-sm td,
.table-sm th {
    padding: 8px 12px;
}

/* İstatistik Kartları Link Haline Getirme */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-link:hover .stat-card {
    box-shadow: none;
}

/* Kart Başlıklarına Link Ekleme */
.card-header a {
    text-decoration: none;
    color: #3498db;
    font-size: 14px;
    font-weight: 500;
}

.card-header a:hover {
    text-decoration: underline;
}

/* Hesap Durumları - Gruplandırılmış Liste */
.platform-group {
    margin-bottom: 15px;
}

.platform-group:last-child {
    margin-bottom: 0;
}

.platform-group-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.platform-group-title .account-count {
    font-size: 12px;
    font-weight: normal;
    color: #7f8c8d;
}

.account-status-list {
    padding-top: 5px;
}

.account-status-item {
    padding-left: 10px;
    margin-bottom: 8px;
}

.account-status-item:last-child {
    margin-bottom: 0;
}

/* Tumblr için özel renk (platform-badge-tumblr) */
.platform-badge-tumblr {
    background-color: #35465C;
}

/* Daha fazla platform için renkler */
.platform-badge-medium {
    background-color: #272727;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-instapaper {
    background-color: #070707;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.platform-badge-flipboard {
    background-color: #E12828;
}

.platform-badge-scoopit {
    background-color: #63bf89;
}

/* Raporlama Filtre */
.filter-form {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filter-form .form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mt-3 {
    margin-top: 1rem;
}

.table-responsive {
    overflow-x: auto;
}

select.status-select {
    padding: 5px 13px;
    border: 1px solid;
    border-radius: 10px;
    font-weight: bold;
}

/* ============================================= */
/* AKSIYON BUTONLARI (ACTION BUTTONS)              */
/* ============================================= */

/* Butonları yan yana dizmek için sarmalayıcı */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Tüm butonlar için ortak temel stil */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
}

/* Butonun üzerine gelince ve devre dışı bırakıldığında efektler */
.action-btn:hover {
    opacity: 0.85;
}

.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Renk Stilleri */
.action-btn.sync-btn {
    background-color: #007bff;
    /* Mavi tonu */
    color: #ffffff;
    border-color: #007bff;
}

.action-btn.edit-btn {
    background-color: #6c757d;
    /* Gri tonu */
    color: #ffffff;
    border-color: #6c757d;
}

.action-btn.delete-btn {
    background-color: #dc3545;
    /* Kırmızı tonu */
    color: #ffffff;
    border-color: #dc3545;
}

/* Buton içindeki ikonlar için (opsiyonel) */
.action-btn i.fas {
    font-size: 13px;
}

/* platforms */
.info-text {
    font-size: 14px;
    color: #666;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
}

#platforms-table .form-control {
    max-width: 120px;
    text-align: center;
}

.status-indicator {
    width: 120px;
    text-align: left;
}

.save-status {
    font-size: 13px;
    font-style: italic;
    color: #6c757d;
    transition: color 0.3s;
}

.save-status.typing {
    color: #ffc107;
}

.save-status.success {
    color: #28a745;
    font-weight: bold;
}

.save-status.error {
    color: #dc3545;
    font-weight: bold;
}

.example-text {
    font-size: 13px;
    color: #555;
}

/* =================================
   DASHBOARD - ABONELİK KARTI YENİ STİLLERİ
   ================================= */
.card-subscription .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
}

.subscription-info-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Sütunlar arası boşluk */
}

/* Sol Sütun: Paket Bilgisi */
.package-details {
    flex: 0 0 220px;
    /* Sütun genişliği sabit, büyümesin/küçülmesin */
    text-align: center;
    padding: 1rem;
    border-right: 1px solid #e9ecef;
}

.package-icon {
    font-size: 2.5rem;
    color: #ffc107;
    /* Sarı renk */
    margin-bottom: 0.75rem;
}

.package-title {
    font-size: 0.9rem;
    color: #858796;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 0.25rem;
}

.package-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.badge-popular {
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    background-color: #e74a3b;
    padding: 3px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
}

.package-expiry-date {
    font-size: 0.8rem;
    color: #5a5c69;
}

/* Sağ Sütun: Kullanım Çubukları */
.usage-details {
    flex: 1 1 auto;
    /* Kalan tüm alanı kapla */
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    /* Çubuklar arası boşluk */
}

.usage-bar-container {
    width: 100%;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #5a5c69;
}

.usage-label i {
    margin-right: 8px;
    color: #858796;
}

.progress {
    height: 14px;
    background-color: #e9ecef;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    overflow: hidden;
    /* Taşmaları engelle */
}

.progress-bar {
    background-color: #1cc88a;
    /* Yeşil */
    transition: width 0.6s ease;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Renk Değişim Mantığı */
.progress-bar[aria-valuenow="80"],
.progress-bar[aria-valuenow="81"],
.progress-bar[aria-valuenow="82"],
.progress-bar[aria-valuenow="83"],
.progress-bar[aria-valuenow="84"],
.progress-bar[aria-valuenow="85"],
.progress-bar[aria-valuenow="86"],
.progress-bar[aria-valuenow="87"],
.progress-bar[aria-valuenow="88"],
.progress-bar[aria-valuenow="89"],
.progress-bar[aria-valuenow="90"],
.progress-bar[aria-valuenow="91"],
.progress-bar[aria-valuenow="92"],
.progress-bar[aria-valuenow="93"],
.progress-bar[aria-valuenow="94"] {
    background-color: #f6c23e;
    /* Sarı */
}

.progress-bar[aria-valuenow="95"],
.progress-bar[aria-valuenow="96"],
.progress-bar[aria-valuenow="97"],
.progress-bar[aria-valuenow="98"],
.progress-bar[aria-valuenow="99"],
.progress-bar[aria-valuenow="100"] {
    background-color: #e74a3b;
    /* Kırmızı */
}

/* Buton Stilleri */
.btn-outline-primary {
    color: #007cba;
    border-color: #007cba;
    transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007cba;
}

/* Mobil Cihazlar için Esneklik (Responsive) */
@media (max-width: 768px) {
    .subscription-info-container {
        flex-direction: column;
        /* Sütunları alt alta yığ */
        align-items: stretch;
        /* Elemanları tam genişliğe yay */
    }

    .package-details {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        /* Ayırıcıyı alta al */
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        flex-basis: auto;
        /* Genişliği serbest bırak */
    }
}