/**
 * Tostland - Admin Panel Stilleri
 * 
 * Bu dosya Tostland admin paneli için tüm stilleri içerir.
 * Login ekranı, dashboard, istatistikler ve tost yönetimi arayüzünü kapsar.
 */

/* ========================================
   CSS DEĞİŞKENLERİ (DESIGN TOKENS)
   ======================================== */
:root {
    /* Renkler */
    --primary-orange: #ff8c00;
    --primary-orange-light: #ffb347;
    --primary-dark: #050508;
    --primary-gray: #111119;
    --text-light: #f5f5f7;
    --text-muted: #a0a0ac; /* WCAG uyumlu - daha açık */
    --success-color: #4caf50;
    --success-light: #9cf39c;
    --error-color: #f44336;
    --error-light: #ff9494;
    --warning-color: #ff9800;
    
    /* Boyutlar */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --border-radius-full: 999px;
    
    /* Geçişler */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    
    /* Gölgeler */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.85);
}

/* ========================================
   RESET VE TEMEL STİLLER
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #22140a 0, #050507 50%, #000 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Focus görünürlüğü - erişilebilirlik için */
:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */
.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: rgba(10, 10, 16, 0.96);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-box h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-box > p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* ========================================
   FORM ELEMENTLERİ
   ======================================== */
.form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 7, 11, 0.96);
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus {
    border-color: rgba(255, 140, 0, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
    background: rgba(10, 10, 15, 0.98);
}

input[type="text"].error,
input[type="password"].error {
    border-color: rgba(244, 67, 54, 0.7);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* Field Error */
.field-error {
    display: block;
    font-size: 0.8rem;
    color: var(--error-light);
    min-height: 1.2em;
    margin-top: 0.25rem;
}

/* ========================================
   BUTONLAR
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--primary-orange-light), var(--primary-orange));
    color: #181818;
    box-shadow: var(--shadow-md);
    position: relative;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-primary .btn-text {
    transition: opacity var(--transition-fast);
}

.btn-primary .btn-lockout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    font-weight: 600;
}

.btn-primary.locked-out .btn-text {
    opacity: 0;
}

.btn-primary.locked-out .btn-lockout {
    opacity: 1;
}

/* ========================================
   HATA VE BAŞARI MESAJLARI
   ======================================== */
.error-message {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: var(--error-light);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    text-align: left;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Demo Bilgisi */
.demo-info {
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: rgba(255, 140, 0, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.demo-info strong {
    color: var(--primary-orange);
}

/* Geri Link */
.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--text-light);
}

/* ========================================
   ADMIN DASHBOARD
   ======================================== */
.admin-dashboard {
    width: 100%;
    max-width: 1000px;
    background: rgba(8, 8, 12, 0.97);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-lg);
}

/* Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-left h1 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.header-left .back-link {
    margin-top: 0;
    font-size: 0.85rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.logout-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: var(--error-light);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.25);
    transform: translateY(-1px);
}

/* ========================================
   İSTATİSTİKLER
   ======================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(12, 12, 18, 0.97);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.stat-card:hover {
    border-color: rgba(255, 140, 0, 0.2);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-orange);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ========================================
   TAB SİSTEMİ
   ======================================== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(9, 9, 14, 0.96);
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 140, 0, 0.3);
}

.tab-btn.active,
.tab-btn[aria-selected="true"] {
    background: rgba(255, 140, 0, 0.2);
    color: var(--text-light);
    border-color: rgba(255, 140, 0, 0.5);
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.2);
}

/* ========================================
   İÇERİK ALANI
   ======================================== */
.content-section {
    margin-top: 0.5rem;
}

.tab-content {
    display: none;
}

.tab-content.active,
.tab-content:not([hidden]) {
    display: block;
}

/* List Header */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.list-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.search-box input {
    width: 220px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-bulk-approve,
.btn-bulk-reject {
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    border: 1px solid;
}

.btn-bulk-approve {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
    color: var(--success-light);
}

.btn-bulk-reject {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.4);
    color: var(--error-light);
}

/* ========================================
   TOST LİSTELERİ
   ======================================== */
.pending-list,
.approved-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar Stillemesi */
.pending-list::-webkit-scrollbar,
.approved-list::-webkit-scrollbar {
    width: 6px;
}

.pending-list::-webkit-scrollbar-track,
.approved-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.pending-list::-webkit-scrollbar-thumb,
.approved-list::-webkit-scrollbar-thumb {
    background: rgba(255, 140, 0, 0.3);
    border-radius: 3px;
}

.pending-list::-webkit-scrollbar-thumb:hover,
.approved-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 140, 0, 0.5);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========================================
   PENDING KART
   ======================================== */
.pending-card {
    background: rgba(12, 12, 18, 0.97);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color var(--transition-fast);
}

.pending-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.pending-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pending-info {
    flex: 1;
}

.pending-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.pending-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pending-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.pending-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pending-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-approve,
.btn-reject {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid;
    transition: all var(--transition-fast);
}

.btn-approve {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.5);
    color: var(--success-light);
}

.btn-approve:hover {
    background: rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

.btn-reject {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.5);
    color: var(--error-light);
}

.btn-reject:hover {
    background: rgba(244, 67, 54, 0.25);
    transform: translateY(-1px);
}

/* ========================================
   APPROVED KART
   ======================================== */
.approved-card {
    background: rgba(12, 12, 18, 0.97);
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition-fast);
}

.approved-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.approved-content {
    flex: 1;
    min-width: 0;
}

.approved-content p:first-child {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    word-wrap: break-word;
}

.approved-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-delete {
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-full);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--error-light);
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.btn-delete:hover {
    background: rgba(244, 67, 54, 0.2);
    transform: translateY(-1px);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(12, 12, 18, 0.98);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-medium);
    z-index: 1000;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.success {
    border-color: rgba(76, 175, 80, 0.5);
}

.toast-notification.error {
    border-color: rgba(244, 67, 54, 0.5);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.9rem;
}

/* ========================================
   MOBİL STİLLER
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        align-items: flex-start;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
    }
    
    .admin-dashboard {
        padding: 1rem 1.25rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .pending-header {
        flex-direction: column;
    }
    
    .pending-image {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .approved-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-delete {
        align-self: flex-end;
    }
    
    .toast-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        border-radius: var(--border-radius);
    }
    
    .admin-dashboard {
        border-radius: var(--border-radius);
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box input {
        width: 100%;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
