/* ========================================
   PIRIL TEMIZLIK - ADMIN PANEL STYLES
   Version: 3.3 (Logout Icon Fixed)
======================================== */

/* === 1. Temel Değişkenler & Reset === */
:root {
  /* Renk Paleti */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;

  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  
  --purple-100: #f3e8ff;
  --purple-500: #a855f7;

  --white: #ffffff;

  /* Gölgeler & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--slate-700);
  background-color: var(--slate-50);
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 0.9375rem; }

/* === 2. Layout & Sidebar === */
.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.admin-sidebar {
  width: 280px;
  background: var(--white);
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--slate-100);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--slate-900);
  border-radius: var(--radius);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo svg { width: 1.5rem; height: 1.5rem; }

.sidebar-title {
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--slate-900);
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-300) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background-color: var(--slate-300); border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: var(--slate-500);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-item svg { width: 1.25rem; height: 1.25rem; }

.nav-badge {
  margin-left: auto;
  background: var(--red-500);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

/* --- DÜZELTİLEN ÇIKIŞ BUTONU KISMI --- */
.sidebar-logout {
  margin: 1rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--red-600);
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  flex-shrink: 0;
  border-top: 1px solid var(--slate-100);
}

.sidebar-logout:hover {
  background: var(--red-100);
}

/* İkon boyutunu sabitleyen yeni kural */
.sidebar-logout svg {
    width: 1.25rem;
    height: 1.25rem;
}
/* ------------------------------------ */


/* === 3. Main Content === */
.admin-main {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  max-width: 1600px;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .admin-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* === 4. Login Page === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--slate-100);
}

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

.login-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-header {
  margin-bottom: 2rem;
}

.login-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--primary-500);
  color: var(--white);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.login-icon svg { width: 1.75rem; height: 1.75rem; }

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--slate-500);
  font-size: 0.9rem;
}

.login-form .form-group { text-align: left; }

.back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.5rem;
  color: var(--slate-500);
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-link:hover { color: var(--slate-900); }

/* === 5. Cards & Stats === */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body { padding: 1.5rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 1.5rem; height: 1.5rem; }

/* Renk Varyasyonları */
.stat-icon-blue { background: var(--blue-100); color: var(--blue-600); }
.stat-icon-green { background: var(--green-100); color: var(--green-600); }
.stat-icon-orange { background: var(--orange-100); color: var(--orange-600); }
.stat-icon-purple { background: var(--purple-100); color: var(--purple-500); }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.875rem; color: var(--slate-500); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--slate-900); }

/* === 6. Tables === */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

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

.data-table th {
  background: var(--slate-50);
  padding: 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}

.data-table tbody tr:hover { background-color: var(--slate-50); }

.empty-row { text-align: center; color: var(--slate-500); padding: 2rem !important; }

/* === 7. Forms & Inputs === */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}

.form-control, 
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius);
  background: var(--white);
  transition: var(--transition);
  font-size: 0.9375rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-row {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-row-3 {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .form-row-3 { grid-template-columns: repeat(3, 1fr); } }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--slate-500);
}

.inline-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius);
}

/* === 8. Buttons & Badges === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-outline { border: 1px solid var(--slate-300); color: var(--slate-700); background: transparent; }
.btn-outline:hover { background: var(--slate-50); border-color: var(--slate-400); }

.btn-danger { background: var(--red-500); color: var(--white); }
.btn-danger:hover { background: var(--red-600); }

.btn-warning { background: var(--orange-500); color: var(--white); }
.btn-warning:hover { background: var(--orange-600); }

.btn-success { background: var(--green-500); color: var(--white); }
.btn-success:hover { background: var(--green-600); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-block { width: 100%; display: flex; }

.btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green { background: var(--green-100); color: var(--green-600); }
.badge-blue { background: var(--primary-100); color: var(--primary-700); }
.badge-orange { background: var(--orange-100); color: var(--orange-600); }
.badge-red { background: var(--red-100); color: var(--red-600); }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }

/* === 9. Tabs === */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--slate-500);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.tab-item:hover { background: var(--slate-100); color: var(--slate-900); }
.tab-item.active { background: var(--primary-50); color: var(--primary-700); }
.tab-item svg { width: 1.125rem; height: 1.125rem; }

/* === 10. Modals === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show { opacity: 1; visibility: visible; }

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 550px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal.show .modal-content { transform: translateY(0); }

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 1.125rem; font-weight: 600; }
.modal-close { font-size: 1.5rem; line-height: 1; color: var(--slate-400); cursor: pointer; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.5rem; border-top: 1px solid var(--slate-100); text-align: right; }

/* === 11. Checkbox & Switch === */
.checkbox-group { display: flex; align-items: center; gap: 0.75rem; }
.checkbox-group input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary-600); cursor: pointer; }
.checkbox-group label { margin: 0; cursor: pointer; }

.toggle { position: relative; display: inline-block; width: 3rem; height: 1.5rem; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--slate-300); transition: .4s; border-radius: 34px; }
.toggle-slider:before { position: absolute; content: ""; height: 1.125rem; width: 1.125rem; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .toggle-slider { background-color: var(--primary-500); }
input:checked + .toggle-slider:before { transform: translateX(1.5rem); }

/* === 12. Alerts === */
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9375rem; }
.alert-success { background: var(--green-100); color: var(--green-600); border: 1px solid var(--green-500); }
.alert-error { background: var(--red-100); color: var(--red-600); border: 1px solid var(--red-500); }
.alert-info { background: var(--primary-100); color: var(--primary-700); border: 1px solid var(--primary-500); }

/* === 13. Page Specific Styles (Reviews, Services, Trust) === */

/* Trust Icons */
.trust-items-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .trust-items-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-item-edit { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius); }
.trust-item-icon { width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); flex-shrink: 0; }
.trust-icon-blue { background: var(--blue-100); color: var(--blue-600); }
.trust-icon-green { background: var(--green-100); color: var(--green-600); }
.trust-icon-orange { background: var(--orange-100); color: var(--orange-600); }
.trust-icon-purple { background: var(--purple-100); color: var(--purple-500); }
.trust-icon-red { background: var(--red-100); color: var(--red-600); }
.trust-item-fields { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }

/* Reviews */
.reviews-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.review-card-admin { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.review-card-admin.inactive { opacity: 0.7; background: var(--slate-50); }
.review-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.review-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.review-author { flex: 1; display: flex; flex-direction: column; }
.review-author strong { font-size: 0.95rem; color: var(--slate-900); }
.review-author span { font-size: 0.8rem; color: var(--slate-500); }
.review-rating { color: var(--orange-500); display: flex; }
.review-rating svg { width: 1rem; height: 1rem; }
.review-text { color: var(--slate-600); font-size: 0.95rem; margin-bottom: 1rem; font-style: italic; overflow: hidden; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.review-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--slate-100); margin-top: auto; }

/* Services */
.services-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.service-card-admin { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; position: relative; }
.service-card-image { height: 160px; overflow: hidden; position: relative; }
.service-card-image img { width: 100%; height: 100%; object-fit: cover; }
.popular-tag { position: absolute; top: 10px; right: 10px; background: var(--orange-500); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.service-card-content { padding: 1.25rem; }
.service-card-content h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--slate-900); }
.service-card-content p { font-size: 0.9rem; color: var(--slate-500); margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em; }
.service-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--slate-100); }
.service-card-footer .price { color: var(--primary-600); font-size: 1.1rem; font-weight: 700; }

/* === 14. Media Library === */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.media-item { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.media-item:hover { box-shadow: var(--shadow-md); border-color: var(--primary-200); }
.media-preview { height: 150px; width: 100%; position: relative; background: var(--slate-50); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; }
.media-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.7); display: flex; align-items: center; justify-content: center; gap: 0.5rem; opacity: 0; transition: var(--transition); }
.media-item:hover .media-overlay { opacity: 1; }
.media-info { padding: 0.75rem; border-top: 1px solid var(--slate-100); }
.media-name { display: block; font-size: 0.8rem; color: var(--slate-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.5rem; }
.empty-state-media { grid-column: 1 / -1; text-align: center; padding: 4rem; color: var(--slate-400); background: var(--white); border-radius: var(--radius-xl); border: 2px dashed var(--slate-200); }
.empty-state-media svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.5; }

.file-upload { position: relative; border: 2px dashed var(--slate-300); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; transition: var(--transition); background: var(--slate-50); }
.file-upload:hover { border-color: var(--primary-500); background: var(--primary-50); }
.file-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-text { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--slate-500); }
.file-upload-text svg { width: 2rem; height: 2rem; }

/* === 15. Mobile Responsive === */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); position: fixed; height: 100%; z-index: 999; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 5px 0 15px rgba(0,0,0,0.1); }
  .admin-main { margin-left: 0; padding: 1rem; }
  .data-table th, .data-table td { padding: 0.75rem; font-size: 0.85rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}