/* ===================================================================
   Şahinkaya KurumiPort — Yönetici (Admin) Paneli CSS
   Kullanıcı & Google Workspace Grup Yetkilendirme Stilleri
   =================================================================== */

.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: adminFadeIn 0.2s ease-out;
}

@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-modal-container {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 1180px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  animation: adminScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminScaleUp {
  from { transform: scale(0.96) translateY(10px); }
  to { transform: scale(1) translateY(0); }
}

/* Modal Header */
.admin-modal-header {
  background: linear-gradient(135deg, #22143b 0%, #3b1864 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-header-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header-subtitle {
  font-size: 12px;
  color: #d8b4fe;
  margin-top: 2px;
}

.admin-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
}

.admin-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.9);
}

/* KPI Banner Strip */
.admin-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.admin-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.admin-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.admin-kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.admin-kpi-lbl {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

/* Navigation Tabs */
.admin-tabs-nav {
  display: flex;
  gap: 6px;
  padding: 12px 24px 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  color: #5c2494;
}

.admin-tab-btn.active {
  color: #5c2494;
  border-bottom-color: #5c2494;
}

.admin-tab-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.admin-tab-btn.active .admin-tab-badge {
  background: #ede9fe;
  color: #6d28d9;
}

/* Tab Content Area */
.admin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

/* Action Toolbar (Search, Filter, New Button) */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  width: 280px;
}

.admin-search-wrapper input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  width: 100%;
  color: #0f172a;
}

.admin-filter-select {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.admin-primary-btn {
  background: linear-gradient(135deg, #5c2494 0%, #451b6f 100%);
  color: #ffffff;
  border: none;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(92, 36, 148, 0.25);
}

.admin-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(92, 36, 148, 0.35);
}

/* Data Table */
.admin-table-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #fbfbfe;
}

/* User cell */
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #5c2494;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-name {
  font-weight: 600;
  color: #0f172a;
}

.admin-user-email {
  font-size: 11px;
  color: #64748b;
}

/* Role & Status Badges */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-role-admin { background: #fee2e2; color: #b91c1c; }
.badge-role-yonetici { background: #fef3c7; color: #b45309; }
.badge-role-ogretmen { background: #e0e7ff; color: #3730a3; }
.badge-role-personel { background: #f1f5f9; color: #475569; }

.badge-status-active { background: #dcfce7; color: #15803d; }
.badge-status-inactive { background: #f1f5f9; color: #94a3b8; }

.admin-perm-pill {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  margin: 1px 2px;
  font-weight: 500;
}

.admin-action-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11.5px;
  color: #475569;
  transition: all 0.15s;
}

.admin-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-action-btn.btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Inner Form Modal */
.admin-inner-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3500;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-inner-modal {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 580px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-form-group {
  margin-bottom: 14px;
}

.admin-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.admin-form-input, .admin-form-select, .admin-form-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
}

.admin-form-input:focus, .admin-form-select:focus, .admin-form-textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.admin-perm-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.admin-perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.admin-perm-item input {
  accent-color: #5c2494;
}

/* ===================================================================
   GOOGLE WORKSPACE TARZI AYRICALIKLAR VE YETKİ AĞACI (PRIVILEGES TREE)
   =================================================================== */

.gw-privileges-tree-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.gw-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}

.gw-tree-toolbar-title {
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gw-tree-toolbar-actions {
  display: flex;
  gap: 8px;
}

.gw-btn-link {
  background: none;
  border: none;
  color: #5c2494;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.gw-btn-link:hover {
  background: #ede9fe;
  text-decoration: underline;
}

/* Category Row (Parent Item) */
.gw-tree-category {
  border-bottom: 1px solid #e5e7eb;
}

.gw-tree-category:last-child {
  border-bottom: none;
}

.gw-cat-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
  position: relative;
}

.gw-cat-header:hover {
  background: #f8fafc;
}

.gw-cat-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  color: #64748b;
  font-size: 11px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 4px;
}

.gw-cat-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.gw-tree-category.expanded .gw-cat-toggle {
  transform: rotate(90deg);
}

.gw-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.gw-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  border: 1.5px solid #94a3b8;
  accent-color: #2563eb;
  cursor: pointer;
}

.gw-cat-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.gw-cat-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gw-cat-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
}

/* Children Sub-Privileges Container */
.gw-cat-children {
  display: none;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.gw-tree-category.expanded .gw-cat-children {
  display: block;
}

.gw-sub-item {
  display: flex;
  align-items: center;
  padding: 10px 16px 10px 48px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
  color: #334155;
  transition: background-color 0.1s;
  cursor: pointer;
}

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

.gw-sub-item:hover {
  background: #f8fafc;
}

.gw-sub-label {
  margin-left: 10px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

/* Role Management Grid & Cards */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.role-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.role-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.role-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.role-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.role-slug-badge {
  font-size: 10.5px;
  font-family: monospace;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
}

.role-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.role-privileges-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.role-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
  color: #64748b;
}

.role-actions {
  display: flex;
  gap: 6px;
}

/* Mobile Responsiveness for Admin Panel */
@media (max-width: 992px) {
  .admin-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .admin-modal-container {
    max-height: 96vh;
    border-radius: 12px;
  }
  .admin-modal-header {
    padding: 14px 16px;
  }
  .admin-kpi-strip {
    grid-template-columns: 1fr !important;
    padding: 12px 16px;
  }
  .admin-modal-body,
  .admin-page-body {
    padding: 14px 16px;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-search-wrapper {
    width: 100%;
  }
  .admin-perm-checkboxes {
    grid-template-columns: 1fr;
  }
  .gw-sub-item {
    padding-left: 36px;
  }
}

/* ===================================================================
   STANDALONE ADMIN PAGE STYLES (admin.html)
   =================================================================== */
.admin-page-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-page-header-card {
  background: linear-gradient(135deg, #22143b 0%, #3b1864 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(34, 20, 59, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(34, 20, 59, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-page-body {
  padding: 24px;
  flex: 1;
  min-height: 480px;
}

/* ===================================================================
   SLIDER YÖNETİMİ & YEMEK LİSTESİ STİLLERİ
   =================================================================== */

/* Slayt Kartları Grid & Liste */
.admin-slides-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-slide-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.admin-slide-card:hover {
  box-shadow: 0 6px 18px rgba(34, 20, 59, 0.08);
  border-color: #cbd5e1;
}

.admin-slide-preview-box {
  padding: 22px 28px;
  color: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.admin-slide-preview-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  width: fit-content;
}

.admin-slide-preview-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.admin-slide-preview-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 650px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.admin-slide-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-slide-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-slide-status-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-slide-status-pill.active {
  background: #dcfce7;
  color: #15803d;
}

.admin-slide-status-pill.passive {
  background: #f1f5f9;
  color: #64748b;
}

/* Yemek Listesi Yükleme Dropzone & Şablon Butonları */
.admin-yemek-header-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-yemek-template-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.admin-sample-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-sample-dl-btn.csv-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.admin-sample-dl-btn.csv-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.admin-sample-dl-btn.excel-btn {
  background: #107c41;
  color: #ffffff;
  border: 1px solid #0b6a36;
}

.admin-sample-dl-btn.excel-btn:hover {
  background: #0b6a36;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.25);
  transform: translateY(-1px);
}

.admin-upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #fafafa;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-upload-dropzone:hover,
.admin-upload-dropzone.drag-over {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.admin-upload-dropzone.has-file {
  border-color: #10b981;
  background: #f0fdf4;
}

.admin-upload-icon {
  font-size: 42px;
  color: #7c3aed;
  margin-bottom: 4px;
}

.admin-days-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.admin-day-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.admin-day-header {
  padding: 12px 18px;
  background: #f8fafc;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.admin-day-content {
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  border-top: 1px solid #f1f5f9;
}

.admin-dish-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}


