/**
 * Admin Panel Styles
 * 
 * Modern admin panel tasarımı
 * 
 * @package SEO_Blog
 */

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
    background: var(--light);
}

/* Quill Editor Image Styles */
.ql-editor img {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    max-width: 100%;
    height: auto;
    resize: both;
    overflow: auto;
}

.ql-editor img:hover {
    border-color: var(--primary);
}

.ql-editor img.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Alt text'leri gizle */
.ql-editor img::after {
    content: none !important;
}

.ql-editor img[alt]::after {
    display: none !important;
}

/* Quill resim tooltip'ini kapat */
.ql-editor img[alt]:hover::after,
.ql-editor img[alt]::before {
    content: none !important;
    display: none !important;
}

.ql-tooltip {
    display: none !important;
}

/* Resim title attribute'unu gizle */
.ql-editor img[title] {
    font-size: 0 !important;
}

.ql-editor img::before {
    content: '' !important;
    font-size: 0 !important;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--dark);
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 30px;
}

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

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ========================================
   ADMIN LAYOUT
   ======================================== */
.admin-body {
    background: var(--light);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin-logo {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logo h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.admin-logo p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.admin-nav {
    flex: 1;
    padding: 20px 0;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-nav .icon {
    font-size: 18px;
}

.admin-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-header h1 {
    font-size: 24px;
    color: var(--dark);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 13px;
}

.header-user {
    font-weight: 600;
    color: var(--dark);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ========================================
   DASHBOARD
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--secondary);
    font-size: 14px;
}

.stat-info .stat-meta {
    font-size: 12px;
    color: var(--secondary);
    margin-top: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark);
}

.dashboard-actions {
    text-align: center;
    margin-top: 30px;
}

/* ========================================
   FORMS
   ======================================== */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

select.form-control {
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--secondary);
    font-size: 12px;
}

.form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--dark);
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 10px;
}

.current-image {
    margin-bottom: 15px;
}

.current-image img {
    max-width: 300px;
    border-radius: 5px;
    border: 2px solid var(--border);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
}

.btn-block {
    width: 100%;
}

/* ========================================
   TABLES
   ======================================== */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-search-form input, .admin-search-form select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.data-table th a {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.data-table th a:hover {
    color: var(--primary);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: var(--light);
}

.data-table .actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.data-table .actions form {
    margin: 0;
    display: inline-flex;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ========================================
   QUILL EDITOR
   ======================================== */
#editor {
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.ql-toolbar {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.ql-container {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 20px;
    }
    
    .admin-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-search-form {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th, .data-table td {
        padding: 10px;
    }
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
}

.pagination-link {
    display: inline-block;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    cursor: default;
}

.pagination-ellipsis {
    padding: 8px 12px;
    color: var(--secondary);
}
