/* =============================================================
   ElitTemizlik — Admin Panel Stilleri
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --a-bg:       #060d1e;
  --a-sidebar:  #0a1628;
  --a-card:     rgba(255,255,255,0.04);
  --a-border:   rgba(255,255,255,0.08);
  --a-cyan:     #00d4ff;
  --a-gold:     #f5c518;
  --a-text:     #e8eaf6;
  --a-muted:    rgba(232,234,246,0.55);
  --a-success:  #00e676;
  --a-danger:   #ff4757;
  --a-warning:  #ffc107;
  --a-sidebar-w: 260px;
  --a-header-h: 64px;
  --font-h: 'Outfit', sans-serif;
  --font-b: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-b);
  background: var(--a-bg);
  color: var(--a-text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.admin-sidebar {
  width: var(--a-sidebar-w);
  background: var(--a-sidebar);
  border-right: 1px solid var(--a-border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--a-border);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-family: var(--font-h);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.sidebar-logo-text span { color: var(--a-cyan); }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,234,246,0.3);
  padding: 12px 8px 6px;
  display: block;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--a-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 2px;
  position: relative;
}
.sidebar-link i { width: 20px; text-align: center; font-size: 14px; transition: all 0.2s; }
.sidebar-link:hover { background: rgba(0,212,255,0.07); color: var(--a-text); }
.sidebar-link.active {
  background: rgba(0,212,255,0.12);
  color: var(--a-cyan);
  box-shadow: inset 3px 0 0 var(--a-cyan);
}
.sidebar-link.active i { color: var(--a-cyan); }

/* Notification badge on sidebar links */
.sidebar-badge {
  margin-left: auto;
  background: var(--a-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 20px;
  text-align: center;
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.sidebar-badge.gold { background: var(--a-gold); color: #000; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--a-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--a-border);
  margin-bottom: 10px;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-cyan), #0099cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--a-bg);
  flex-shrink: 0;
}
.sidebar-username { font-size: 13px; font-weight: 600; color: var(--a-text); }
.sidebar-role { font-size: 11px; color: var(--a-muted); }

/* ─── MAIN CONTENT ─── */
.admin-main {
  margin-left: var(--a-sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── TOP BAR ─── */
.admin-topbar {
  height: var(--a-header-h);
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--a-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 700;
  color: var(--a-text);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* Notification bell */
.notif-bell {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--a-border);
  background: var(--a-card);
  color: var(--a-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.notif-bell:hover { border-color: var(--a-cyan); color: var(--a-cyan); }
.notif-count {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--a-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePulse 1.5s ease-in-out infinite;
  border: 2px solid var(--a-bg);
}
.notif-count.hidden { display: none; }

.btn-view-site {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 10px;
  color: var(--a-cyan);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-view-site:hover { background: rgba(0,212,255,0.15); }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(255,71,87,0.08);
  border: 1px solid rgba(255,71,87,0.2);
  border-radius: 10px;
  color: var(--a-danger);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,71,87,0.15); }

/* ─── CONTENT AREA ─── */
.admin-content { padding: 32px 28px; flex: 1; }

/* ─── STAT CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  transition: transform 0.3s ease;
  transform: scaleX(0);
}
.stat-card.cyan::before { background: var(--a-cyan); }
.stat-card.gold::before { background: var(--a-gold); }
.stat-card.green::before { background: var(--a-success); }
.stat-card.red::before { background: var(--a-danger); }
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { border-color: rgba(0,212,255,0.2); transform: translateY(-2px); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-card.cyan .stat-icon { background: rgba(0,212,255,0.12); color: var(--a-cyan); }
.stat-card.gold .stat-icon { background: rgba(245,197,24,0.12); color: var(--a-gold); }
.stat-card.green .stat-icon { background: rgba(0,230,118,0.12); color: var(--a-success); }
.stat-card.red .stat-icon { background: rgba(255,71,87,0.12); color: var(--a-danger); }

.stat-number {
  font-family: var(--font-h);
  font-size: 30px;
  font-weight: 800;
  color: var(--a-text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--a-muted); font-weight: 500; }

/* Unread indicator */
.stat-card.has-unread { border-color: rgba(255,71,87,0.3); }

/* ─── CARDS ─── */
.a-card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.a-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--a-border);
}
.a-card-title {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 700;
  color: var(--a-text);
}
.a-card-body { padding: 24px; }

/* ─── TABLE ─── */
.a-table { width: 100%; border-collapse: collapse; }
.a-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--a-muted);
  border-bottom: 1px solid var(--a-border);
}
.a-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--a-text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.a-table tr:last-child td { border-bottom: none; }
.a-table tr:hover td { background: rgba(255,255,255,0.02); }
.a-table .td-muted { color: var(--a-muted); font-size: 13px; }

/* ─── BUTTONS ─── */
.a-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.a-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.a-btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }
.a-btn-cyan { background: rgba(0,212,255,0.12); color: var(--a-cyan); border: 1px solid rgba(0,212,255,0.2); }
.a-btn-cyan:hover { background: var(--a-cyan); color: var(--a-bg); }
.a-btn-green { background: rgba(0,230,118,0.12); color: var(--a-success); border: 1px solid rgba(0,230,118,0.2); }
.a-btn-green:hover { background: var(--a-success); color: var(--a-bg); }
.a-btn-red { background: rgba(255,71,87,0.12); color: var(--a-danger); border: 1px solid rgba(255,71,87,0.2); }
.a-btn-red:hover { background: var(--a-danger); color: #fff; }
.a-btn-gold { background: rgba(245,197,24,0.12); color: var(--a-gold); border: 1px solid rgba(245,197,24,0.2); }
.a-btn-gold:hover { background: var(--a-gold); color: var(--a-bg); }
.a-btn-ghost { background: transparent; color: var(--a-muted); border: 1px solid var(--a-border); }
.a-btn-ghost:hover { color: var(--a-text); border-color: rgba(255,255,255,0.2); }
.a-btn-primary { background: linear-gradient(135deg, #00d4ff, #0099cc); color: var(--a-bg); border: none; }
.a-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,212,255,0.3); }

/* ─── FORMS ─── */
.a-form-group { margin-bottom: 20px; }
.a-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-muted);
  margin-bottom: 8px;
}
.a-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  color: var(--a-text);
  font-family: var(--font-b);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.a-input::placeholder { color: rgba(232,234,246,0.25); }
.a-input:focus { border-color: var(--a-cyan); background: rgba(0,212,255,0.04); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
textarea.a-input { resize: vertical; min-height: 100px; }
select.a-input { cursor: pointer; }
.a-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── STATUS BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-cyan { background: rgba(0,212,255,0.12); color: var(--a-cyan); }
.badge-green { background: rgba(0,230,118,0.12); color: var(--a-success); }
.badge-red { background: rgba(255,71,87,0.12); color: var(--a-danger); }
.badge-gold { background: rgba(245,197,24,0.12); color: var(--a-gold); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--a-muted); }

/* Unread dot */
.unread-dot {
  width: 8px; height: 8px;
  background: var(--a-danger);
  border-radius: 50%;
  display: inline-block;
  animation: badgePulse 1.5s ease-in-out infinite;
}

/* ─── MODAL ─── */
.a-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.a-modal-overlay.open { opacity: 1; visibility: visible; }
.a-modal {
  background: #0a1628;
  border: 1px solid var(--a-border);
  border-radius: 20px;
  width: min(600px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transform: scale(0.92) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.a-modal-overlay.open .a-modal { transform: scale(1) translateY(0); }
.a-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--a-border);
}
.a-modal-title { font-family: var(--font-h); font-size: 17px; font-weight: 700; }
.a-modal-close { background: none; border: none; color: var(--a-muted); cursor: pointer; font-size: 20px; line-height: 1; transition: all 0.2s; }
.a-modal-close:hover { color: var(--a-danger); transform: rotate(90deg); }
.a-modal-body { padding: 24px; }
.a-modal-footer { padding: 16px 24px; border-top: 1px solid var(--a-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── NOTIFICATIONS PANEL (Dashboard alert box) ─── */
.notif-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid;
  position: relative;
  overflow: hidden;
}
.notif-alert.msg {
  background: rgba(255,71,87,0.06);
  border-color: rgba(255,71,87,0.2);
}
.notif-alert.msg::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--a-danger);
}
.notif-alert.review {
  background: rgba(245,197,24,0.06);
  border-color: rgba(245,197,24,0.2);
}
.notif-alert.review::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--a-gold);
}
.notif-alert-icon { font-size: 22px; flex-shrink: 0; }
.notif-alert.msg .notif-alert-icon { color: var(--a-danger); }
.notif-alert.review .notif-alert-icon { color: var(--a-gold); }
.notif-alert-text strong { display: block; font-size: 14px; font-weight: 700; color: var(--a-text); }
.notif-alert-text span { font-size: 13px; color: var(--a-muted); }

/* ─── MESSAGE DETAIL ─── */
.msg-card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.msg-card.unread { border-left: 3px solid var(--a-danger); }
.msg-card.unread .msg-name { color: var(--a-cyan); }
.msg-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.msg-name { font-family: var(--font-h); font-size: 15px; font-weight: 700; color: var(--a-text); }
.msg-meta { font-size: 12px; color: var(--a-muted); }
.msg-body { font-size: 14px; color: var(--a-muted); line-height: 1.7; }
.msg-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ─── ICON PICKER ─── */
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.icon-opt {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--a-border);
  background: var(--a-card);
  color: var(--a-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}
.icon-opt:hover, .icon-opt.selected {
  background: rgba(0,212,255,0.1);
  border-color: var(--a-cyan);
  color: var(--a-cyan);
}

/* ─── GOOGLE TOOLS ─── */
.google-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.google-tool-card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: 14px;
  padding: 20px;
}
.google-tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.google-tool-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.google-tool-title { font-family: var(--font-h); font-size: 14px; font-weight: 700; }
.google-tool-desc { font-size: 12px; color: var(--a-muted); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  :root { --a-sidebar-w: 220px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .a-form-row { grid-template-columns: 1fr; }
  .google-tools-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 20px 16px; }
}

/* ─── ADMIN LOGIN ─── */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--a-bg);
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  padding: 24px;
}
.login-card {
  background: rgba(10,22,40,0.95);
  border: 1px solid var(--a-border);
  border-radius: 24px;
  padding: 48px;
  width: min(440px, 100%);
  backdrop-filter: blur(30px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.05);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-title {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}
.login-title span { color: var(--a-cyan); }
.login-subtitle { font-size: 14px; color: var(--a-muted); text-align: center; margin-bottom: 32px; }
