/* ==========================================================================
   Tarım Cep — Kurumsal Web Admin Paneli
   Renk Paleti: #2E7D32 (Ziraat Yeşili), #A3B18A (Adaçayı), #EAD7B7 (Toprak), #FAF9F6 (Krem)
   Durumlar: #16A34A (Sağlıklı), #DC2626 (Hastalık), #F59E0B (Dikkat), #3B82F6 (Bilgi)
   ========================================================================== */

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

:root {
  --primary-green: #2E7D32;
  --primary-hover: #1B5E20;
  --primary-light: #E8F5E9;
  --sage: #A3B18A;
  --earth: #EAD7B7;
  --cream: #FAF9F6;
  
  --status-healthy: #16A34A;
  --status-healthy-bg: #DCFCE7;
  --status-danger: #DC2626;
  --status-danger-bg: #FEE2E2;
  --status-warning: #F59E0B;
  --status-warning-bg: #FEF3C7;
  --status-info: #3B82F6;
  --status-info-bg: #DBEAFE;

  --bg-page: #F4F7F4;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F9FBFA;
  
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  --border-color: #E2E8F0;
  --border-focus: #2E7D32;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(46, 125, 50, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --sidebar-width: 270px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-width);
  background: #1C3322;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-green);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.sidebar-logo-icon svg {
  width: 22px;
  height: 22px;
}

.sidebar-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.sidebar-brand p {
  font-size: 0.75rem;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8E9F91;
  padding: 12px 12px 6px 12px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #E2E8F0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: #A3B18A;
  transition: color 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-item:hover svg {
  color: #FFFFFF;
}

.nav-item.active {
  background: var(--primary-green);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
  font-weight: 600;
}

.nav-item.active svg {
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
}

.admin-user-info .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFFFFF;
}

.admin-user-info .role {
  font-size: 0.7rem;
  color: var(--sage);
}

.btn-logout {
  background: transparent;
  border: none;
  color: #CBD5E1;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-logout:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.15);
}

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

/* TOPBAR */
.admin-topbar {
  height: 70px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vds-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94A3B8;
}

.status-dot.online {
  background: var(--status-healthy);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
}

.status-dot.offline {
  background: var(--status-danger);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.status-dot.checking {
  background: var(--status-warning);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------- STATS GRID ------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper.green {
  background: var(--primary-light);
  color: var(--primary-green);
}

.stat-icon-wrapper.blue {
  background: var(--status-info-bg);
  color: var(--status-info);
}

.stat-icon-wrapper.amber {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.stat-icon-wrapper.red {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.stat-info .stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info .stat-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.stat-info .stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ------------------- CARDS & PANELS ------------------- */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-title-area h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-title-area p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-body {
  padding: 24px;
}

/* ------------------- BUTTONS ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font-body);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary-green);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: #CBD5E1;
}

.btn-danger {
  background: #FEE2E2;
  color: var(--status-danger);
  border-color: #FECACA;
}

.btn-danger:hover {
  background: var(--status-danger);
  color: #FFFFFF;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 7px;
  border-radius: var(--radius-sm);
}

/* ------------------- FORM CONTROLS ------------------- */
.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
}

.form-control {
  width: 100%;
  padding: 9px 14px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box .form-control {
  padding-left: 36px;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.form-select {
  padding: 9px 34px 9px 14px;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--text-primary);
  cursor: pointer;
}

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

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ------------------- DATA TABLES ------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #F8FAF9;
}

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

.table-price-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.table-change-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 700;
}

.table-change-badge.up {
  background: var(--status-healthy-bg);
  color: var(--status-healthy);
}

.table-change-badge.down {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.table-change-badge.neutral {
  background: #F1F5F9;
  color: #64748B;
}

/* BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.healthy {
  background: var(--status-healthy-bg);
  color: var(--status-healthy);
}

.status-badge.critical {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.status-badge.warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.status-badge.info {
  background: var(--status-info-bg);
  color: var(--status-info);
}

/* ------------------- MODAL ------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-alt);
}

/* ------------------- TOAST NOTIFICATIONS ------------------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #FFFFFF;
  border-left: 4px solid var(--primary-green);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 420px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.error {
  border-left-color: var(--status-danger);
}

.toast.warning {
  border-left-color: var(--status-warning);
}

.toast.success {
  border-left-color: var(--status-healthy);
}

/* ------------------- LOGIN PAGE ------------------- */
.login-body {
  background: linear-gradient(135deg, #1C3322 0%, #2E7D32 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

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

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--primary-green);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.login-logo svg {
  width: 32px;
  height: 32px;
}

.login-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.login-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.server-settings-toggle {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.8rem;
  text-align: center;
}

.server-settings-toggle a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

/* ------------------- RESPONSIVE ELEMENTS ------------------- */
.btn-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
  background: var(--bg-surface-alt);
  border-color: #CBD5E1;
  color: var(--primary-green);
}

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #EF4444;
}

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.sidebar-locked {
  overflow: hidden !important;
  touch-action: none;
}

.responsive-split-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ------------------- TABLET & DESKTOP SM (max-width: 1024px) ------------------- */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1100 !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0) !important;
    left: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 12px;
  }

  .nav-item {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 0.92rem;
    -webkit-tap-highlight-color: rgba(46, 125, 50, 0.2);
  }

  .sidebar-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    cursor: pointer;
    z-index: 1110;
  }

  .btn-sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    cursor: pointer;
    z-index: 92;
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
  }

  .admin-topbar {
    padding: 0 16px;
    height: 64px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }

  .responsive-split-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ------------------- MOBILE & SMALL TABLET (max-width: 768px) ------------------- */
@media (max-width: 768px) {
  .admin-topbar {
    height: 58px;
    padding: 0 14px;
  }

  .topbar-left {
    gap: 10px;
    min-width: 0;
  }

  .topbar-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }

  .topbar-right {
    gap: 8px;
  }

  .vds-status-pill {
    padding: 5px 10px;
    font-size: 0.72rem;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #btn-refresh-data {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

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

  /* Stats Kartları */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 14px 12px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-icon-wrapper {
    width: 38px;
    height: 38px;
  }

  .stat-icon-wrapper svg {
    width: 20px;
    height: 20px;
  }

  .stat-info .stat-label {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .stat-info .stat-value {
    font-size: 1.35rem;
  }

  .stat-info .stat-sub {
    font-size: 0.68rem;
  }

  /* Paneller ve Filtre Barları */
  .panel-card {
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .panel-header {
    padding: 14px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .panel-title-area h3 {
    font-size: 1.05rem;
  }

  .panel-title-area p {
    font-size: 0.78rem;
  }

  .panel-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .search-box {
    width: 100%;
    min-width: 100%;
  }

  .form-select {
    width: 100%;
  }

  .panel-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .panel-body {
    padding: 16px 14px;
  }

  /* Tablolar */
  .table-responsive {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .data-table td:last-child {
    white-space: nowrap;
  }

  /* Modallar */
  .modal-overlay {
    padding: 10px;
  }

  .modal-card {
    max-height: 92vh;
    border-radius: var(--radius-md);
    width: 100%;
  }

  .modal-header {
    padding: 14px 16px;
  }

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

  .modal-body {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-control,
  .form-select {
    font-size: 16px; /* iOS Safari otomatik zoom engeli */
  }

  /* Bildirim Toast */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 16px;
    width: auto;
  }

  .toast {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 0.8rem;
    padding: 12px 14px;
  }
}

/* ------------------- EKSTRA KÜÇÜK MOBİL (max-width: 480px) ------------------- */
@media (max-width: 480px) {
  .admin-topbar {
    height: 54px;
    padding: 0 10px;
  }

  .topbar-title {
    font-size: 0.95rem;
    max-width: 130px;
  }

  .vds-status-pill {
    padding: 4px 8px;
  }

  .vds-status-pill #vds-status-text {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    flex-direction: row;
    align-items: center;
    padding: 14px 14px;
    gap: 14px;
  }

  .login-body {
    padding: 14px;
  }

  .login-card {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
  }

  .login-header {
    margin-bottom: 20px;
  }

  .login-logo {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
  }

  .login-logo svg {
    width: 26px;
    height: 26px;
  }

  .login-header h1 {
    font-size: 1.25rem;
  }
}

/* ------------------- ROL VE YETKİ BADGELERİ ------------------- */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 0.725rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.role-badge.super-admin {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.role-badge.admin {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

