/* ==========================================
   EMO Basından Görünüm - Admin Panel Styles
   Crystal Light Theme
   ========================================== */

:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-sidebar: rgba(255, 255, 255, 0.92);

    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-green: #059669;
    --accent-red: #dc2626;
    --accent-gold: #d97706;
    --accent-purple: #7c3aed;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: rgba(148, 163, 184, 0.2);
    --border-hover: rgba(37, 99, 235, 0.3);

    --gradient-primary: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-hero: linear-gradient(135deg, #dbeafe 0%, #ede9fe 50%, #dbeafe 100%);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.06);

    --sidebar-width: 260px;
    --topbar-height: 60px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-primary);
    color: var(--text-primary);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.02) 0%, transparent 50%);
    background-attachment: fixed;
}

a { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-primary-hover); }

/* ===== LOGIN PAGE ===== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
}

.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-bg-pattern {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 48px 36px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 64px;
    width: auto;
    margin: 0 auto 16px;
    display: block;
}

.login-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.2);
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-back-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

/* ===== ADMIN LAYOUT ===== */
.admin-body {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-logo {
    height: 36px;
    width: auto;
}

.sidebar-brand .brand-text { display: flex; flex-direction: column; }
.sidebar-brand .brand-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.5px; color: var(--text-primary); }
.sidebar-brand .brand-subtitle { font-size: 0.63rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 2px; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
    font-weight: 600;
}

.sidebar-link i { width: 20px; text-align: center; font-size: 0.95rem; }

.sidebar-link-danger { color: var(--accent-red); }
.sidebar-link-danger:hover { background: rgba(220, 38, 38, 0.06); color: var(--accent-red); }

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.sidebar-user i { font-size: 1.2rem; }

/* Main Content */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }

/* Admin Content */
.admin-content {
    padding: 32px 28px;
    flex: 1;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: var(--accent-primary); }
.page-title .text-muted { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }

/* ===== Admin Stats Row ===== */
.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.admin-stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.admin-stat-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bg-primary { background: rgba(37, 99, 235, 0.08); color: var(--accent-primary); }
.bg-blue { background: rgba(37, 99, 235, 0.08); color: var(--accent-primary); }
.bg-purple { background: rgba(124, 58, 237, 0.08); color: var(--accent-purple); }
.bg-gold { background: rgba(217, 119, 6, 0.08); color: var(--accent-gold); }

.admin-stat-info { display: flex; flex-direction: column; }
.admin-stat-number { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.admin-stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* ===== Admin Filter Bar ===== */
.admin-filter-bar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.admin-filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filter-group {
    flex: 1;
    min-width: 150px;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 0; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i { font-size: 0.75rem; }

.required { color: var(--accent-red); }

.form-control {
    width: 100%;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.form-control option {
    background: #fff;
    color: var(--text-primary);
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-glass);
}

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

.form-group-half { flex: 1; }
.form-group-full { flex: 1; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.record-meta {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.5);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Alerts ===== */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInUp 0.4s ease;
}

.alert i { margin-top: 2px; }

.alert-danger {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: var(--accent-red);
}

.alert-success {
    background: rgba(5, 150, 105, 0.06);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--accent-green);
}

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { margin-bottom: 4px; }
.alert-list li:last-child { margin-bottom: 0; }

/* ===== Admin Table ===== */
.admin-table-wrapper {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    overflow: hidden;
    overflow-x: auto;
    box-shadow: var(--shadow-glass);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table thead {
    background: rgba(37, 99, 235, 0.03);
}

.admin-table th {
    padding: 13px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.87rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: all 0.15s ease;
}

.admin-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-nowrap { white-space: nowrap; }

/* Badges */
.date-badge-sm {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(148, 163, 184, 0.06);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mecra-badge-sm {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mecra-basın, .mecra-basin { background: rgba(37, 99, 235, 0.08); color: #2563eb; }
.mecra-tv { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
.mecra-diger { background: rgba(148, 163, 184, 0.06); color: var(--text-muted); }

.haber-cell { max-width: 350px; }

.haber-link-admin {
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.4;
    transition: var(--transition);
}

.haber-link-admin:hover { color: var(--accent-primary); }
.haber-link-admin i { font-size: 0.65rem; margin-left: 4px; opacity: 0.4; }

/* Action Buttons */
.action-buttons { display: flex; gap: 6px; }

.btn-action {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.5);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.82rem;
    transition: var(--transition);
}

.btn-edit:hover { background: rgba(37, 99, 235, 0.08); color: var(--accent-primary); border-color: rgba(37, 99, 235, 0.3); }
.btn-delete:hover { background: rgba(220, 38, 38, 0.08); color: var(--accent-red); border-color: rgba(220, 38, 38, 0.3); }

.inline-form { display: inline; margin: 0; padding: 0; }

/* ===== Admin Pagination ===== */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: block; }

    .admin-stats-row { grid-template-columns: 1fr 1fr; }

    .admin-filter-form { flex-direction: column; }
    .admin-filter-group { width: 100%; min-width: auto; }

    .admin-content { padding: 20px 16px; }

    .form-row { flex-direction: column; gap: 16px; }
    .form-card { padding: 20px; }

    .content-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .admin-stats-row { grid-template-columns: 1fr; }
    .login-card { padding: 32px 24px; }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-content { animation: fadeInUp 0.4s ease; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
