/* ============================================
   KEAH Yönetim - Tasarım Sistemi
   ============================================
   Modern, kurumsal, minimal tasarım.
   Responsive ve mobil uyumlu.
   ============================================ */

/* --- CSS Değişkenler --- */
:root {
  --primary: #1a56db;
  --primary-hover: #1648b8;
  --primary-light: #e8effc;
  --primary-gradient: linear-gradient(135deg, #1a56db 0%, #2563eb 50%, #3b82f6 100%);
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0891b2;
  --info-light: #cffafe;

  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --bg-sidebar: #1e293b;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  --text-on-primary: #ffffff;

  --border: #e2e8f0;
  --border-focus: #1a56db;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --transition: all 0.2s ease;
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  color: var(--text-secondary);
}

/* --- Anonim Form Sayfası (index.html) --- */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #1a56db 100%);
  position: relative;
  overflow: hidden;
}

.page-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.page-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.form-container {
  width: 100%;
  max-width: 540px;
  position: relative;
  z-index: 1;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header .logo-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
}

.form-header h1 {
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-xl);
}

/* --- Form Elemanları --- */
.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

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

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* --- Butonlar --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-on-primary);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.4);
}

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

.btn-secondary {
  background: var(--bg-body);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

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

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

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

.btn-success:hover {
  background: #047857;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
}

.btn-block {
  width: 100%;
}

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--text-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Bildirimler --- */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-info {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* --- Anonimlik Badge --- */
.anon-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.15);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.825rem;
  color: var(--success);
  font-weight: 500;
}

.anon-badge .icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- Login Sayfası --- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.1) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.login-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.825rem;
  transition: var(--transition);
}

.login-footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Admin Layout --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-dark);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition-slow);
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-header .logo-sm {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-header h3 {
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 600;
}

.sidebar-header small {
  color: var(--text-muted);
  font-size: 0.725rem;
  display: block;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.75rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
}

.nav-item.active {
  background: rgba(26, 86, 219, 0.15);
  color: #60a5fa;
}

.nav-item .icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--text-white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-info .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
}

.user-info .role {
  font-size: 0.725rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  background: var(--bg-body);
  min-height: 100vh;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.25rem;
}

.content-area {
  padding: 1.75rem;
}

/* --- Dashboard İstatistikler --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon.blue {
  background: var(--primary-light);
}

.stat-icon.red {
  background: var(--danger-light);
}

.stat-icon.green {
  background: var(--success-light);
}

.stat-icon.orange {
  background: var(--warning-light);
}

.stat-info h4 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Mesaj Listesi --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 0;
}

.card-body.padded {
  padding: 1.35rem;
}

.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filters .form-control {
  padding: 0.5rem 0.75rem;
  font-size: 0.825rem;
  max-width: 180px;
}

.filters select.form-control {
  max-width: 160px;
}

/* Mesaj Satırları */
.message-list {
  list-style: none;
}

.message-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.message-item:last-child {
  border-bottom: none;
}

.message-item:hover {
  background: rgba(26, 86, 219, 0.03);
}

.message-item.unread {
  background: rgba(26, 86, 219, 0.04);
}

.message-item.unread .message-konu {
  font-weight: 700;
}

.message-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.message-dot.unread {
  background: var(--primary);
}

.message-dot.read {
  background: var(--border);
}

.message-body {
  flex: 1;
  min-width: 0;
}

.message-konu {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.message-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.message-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.message-tags {
  display: flex;
  gap: 4px;
}

.tag {
  font-size: 0.675rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-replied {
  background: var(--success-light);
  color: var(--success);
}

.tag-manager {
  background: var(--primary-light);
  color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-state h4 {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Mesaj Detay Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: var(--transition-slow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h3 {
  font-size: 1.05rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  transition: var(--transition);
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.detail-row {
  margin-bottom: 1.25rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.detail-value {
  font-size: 0.925rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.detail-value.message-text {
  background: var(--bg-body);
  padding: 1rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.reply-existing {
  background: var(--success-light);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.5rem;
}

.reply-existing .reply-date {
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 0.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* --- Trend Chart --- */
.chart-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  margin-bottom: 1.75rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chart-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-top: 10px;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar .bar {
  width: 100%;
  max-width: 40px;
  background: var(--primary-gradient);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
  transition: var(--transition-slow);
  position: relative;
}

.chart-bar .bar:hover {
  opacity: 0.85;
}

.chart-bar .bar-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

.chart-bar .bar-value {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Yönetici Ekleme Formu (admin) --- */
.manager-form-section {
  margin-top: 1.75rem;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 0.75rem;
  align-items: end;
}

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

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .content-area {
    padding: 1rem;
  }

  .topbar {
    padding: 0 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .message-item {
    padding: 0.875rem 1rem;
  }

  .message-preview {
    display: none;
  }

  .filters {
    width: 100%;
  }

  .filters .form-control {
    max-width: 100%;
    flex: 1;
  }

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

  .inline-form {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .chart-bars {
    height: 80px;
  }

  h1 {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-wrapper {
    padding: 1rem 0.75rem;
  }

  .form-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .form-header h1 {
    font-size: 1.2rem;
  }
}

/* --- Overlay for mobile sidebar --- */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Karakter Sayacı --- */
.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.char-count.warning {
  color: var(--warning);
}

.char-count.danger {
  color: var(--danger);
}

/* --- Yönetici Listesi --- */
.manager-list {
  list-style: none;
}

.manager-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.manager-item:last-child {
  border-bottom: none;
}

.manager-item .manager-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.manager-item .manager-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.manager-item .manager-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.manager-item .manager-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.manager-item .manager-role {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.manager-role.admin {
  background: var(--danger-light);
  color: var(--danger);
}

.manager-role.manager {
  background: var(--primary-light);
  color: var(--primary);
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.3s ease;
  max-width: 440px;
}

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

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

.toast.info {
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: white;
  max-width: 440px;
  line-height: 1.5;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Şifre Değiştir --- */
.settings-section {
  max-width: 500px;
}

.settings-section h3 {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Section Hide/Show --- */
.section {
  display: none;
}

.section.active {
  display: block;
}

/* --- Dosya Yükleme Alanı --- */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-body);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-area.has-file {
  border-color: var(--success);
  border-style: solid;
  background: var(--success-light);
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.file-upload-icon {
  font-size: 1.5rem;
}

.file-upload-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.file-upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.file-selected-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

.file-remove-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--danger);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
}

.file-remove-btn:hover {
  background: var(--danger-light);
}

/* --- Dosya Tag (mesaj listesi) --- */
.tag-file {
  background: var(--warning-light);
  color: var(--warning);
}

/* --- Attachment Box (modal) --- */
.attachment-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary-light);
  border: 1px solid rgba(26, 86, 219, 0.15);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.35rem;
}

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

.attachment-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

.attachment-warning {
  font-size: 0.75rem;
  color: var(--warning);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}