/* ============================================
   Admin Panel Styles
   ============================================ */

/* Login Section */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.login-icon i {
    font-size: 1.8rem;
    color: #ef4444;
}

.login-card h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.login-card .form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.3);
}

.login-error {
    color: #ef4444;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.login-error.show {
    display: block;
}

.back-link {
    display: block;
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: 25px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
    background: var(--bg-dark);
}

.admin-header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-title i {
    color: #ef4444;
    font-size: 1.3rem;
}

.admin-title h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-user span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.admin-main {
    padding: 40px 0;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary-color);
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table tbody tr {
    transition: background 0.3s ease;
}

.orders-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.orders-table td {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 50px 20px !important;
}

.date-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.user-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.product-cell {
    color: var(--primary-color);
    font-weight: 500;
}

.price-cell {
    font-weight: 600;
    color: var(--accent-color);
}

.note-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.image-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.image-link:hover {
    text-decoration: underline;
}

.no-image {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.bekliyor {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-badge.onaylandi {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.reddedildi {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.kredi_odendi {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn.approve {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-btn.approve:hover {
    background: rgba(16, 185, 129, 0.2);
}

.action-btn.reject {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn.reject:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-md);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .orders-table th,
    .orders-table td {
        padding: 12px 15px;
    }
}

/* ============================================
   Kredi Yönetimi
   ============================================ */
.credit-manager-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.credit-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Sol ve Sağ panel oranları */
    gap: 20px;
    height: 600px;
    /* Panel yüksekliği */
}

/* Sol ve Sağ Sütunlar */
.player-column,
.transaction-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-header {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Arama Kutusu */
.search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 60%;
}

.search-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Scrollable Listeler */
.scrollable-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Sol Panel: Oyuncu itemi */
.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 5px;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.player-item.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.player-info {
    flex: 1;
}

.player-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.player-balance {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Sağ Panel: Seçilen Oyuncu */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.transaction-input {
    width: 100px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-align: right;
}

.transaction-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-btn:hover {
    opacity: 1;
}

/* Footer ve Butonlar */
.transaction-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.send-credits-btn {
    width: 100%;
    padding: 12px;
    background: var(--success-color, #10b981);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.send-credits-btn:hover {
    filter: brightness(1.1);
}

.clear-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    opacity: 0.6;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .credit-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .player-column {
        height: 300px;
    }

    .transaction-column {
        height: auto;
        min-height: 200px;
    }
}