/* TischReservierung Pro Theme - S. YILDIRIM */
#tisch-reservierung-app, #tisch-reservierung-admin-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #292524;
  max-width: 1100px;
  margin: 10px auto;
  box-sizing: border-box;
}

#tisch-reservierung-app *, #tisch-reservierung-admin-app * {
  box-sizing: border-box;
}

/* Statistics KPI Cards */
.tr-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.tr-stat-card {
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.tr-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.tr-stat-val { font-size: 1.4rem; font-weight: 800; color: #1c1917; line-height: 1; }
.tr-stat-lbl { font-size: 0.75rem; font-weight: 700; color: #78716c; margin-top: 4px; text-transform: uppercase; }

/* Filter Bar */
.tr-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* Banner */
.tr-banner {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Cards */
.tr-card {
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}

.tr-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.tr-subtitle { font-size: 0.8rem; color: #78716c; margin-bottom: 20px; }

/* Section Title inside Settings */
.tr-section-divider {
  font-size: 1rem;
  font-weight: 800;
  color: #1c1917;
  border-bottom: 2px solid #f5f5f4;
  padding-bottom: 6px;
  margin-top: 25px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grid Layouts */
.tr-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tr-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tr-group { margin-bottom: 14px; width: 100%; }
.tr-group label { display: block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: #57534e; margin-bottom: 6px; }

/* Form Controls & Dropdown Arrow */
.tr-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #d6d3d1 !important;
  border-radius: 8px !important;
  background: #fafaf9 !important;
  font-size: 0.9rem !important;
  box-sizing: border-box !important;
  outline: none !important;
  height: 44px !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

select.tr-control {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2378716c%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.6%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 10px auto !important;
  padding-right: 30px !important;
  cursor: pointer;
}

input[type="date"].tr-control {
  position: relative !important;
  line-height: 22px !important;
}

textarea.tr-control {
  height: auto !important;
}

.tr-btn-submit {
  width: 100%;
  color: #fff !important;
  border: none !important;
  padding: 14px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: opacity 0.2s !important;
}

.tr-btn-submit:hover { opacity: 0.9 !important; }

/* Kroki / Sitzplan Box */
.tr-sketch-box {
  width: 100%;
  max-width: 350px;
  height: 200px;
  margin: 15px auto 0 auto;
  border: 2px dashed #d6d3d1;
  border-radius: 12px;
  background: #fafaf9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #78716c;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.tr-sketch-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Admin Nav & Subtabs */
.admin-nav { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #e7e5e4; padding-bottom: 10px; flex-wrap: wrap; }
.admin-tab { padding: 8px 16px; font-weight: 700; border-radius: 8px; border: none; background: #e7e5e4; cursor: pointer; color: #444; }
.admin-tab.active { color: #fff; }

.settings-subnav { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; background: #f5f5f4; padding: 8px; border-radius: 10px; }
.settings-subtab { padding: 6px 12px; font-weight: 600; font-size: 0.85rem; border-radius: 6px; border: none; background: transparent; cursor: pointer; color: #57534e; }
.settings-subtab.active { background: #fff; color: #1c1917; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Bulk Action Panel */
.tr-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f4;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* Tag Helper Box */
.tr-tag-helper {
  background: #fdf8f6;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 0.8rem;
  line-height: 1.6;
}
.tr-tag-helper code {
  background: #ffedd5;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: #c2410c;
  cursor: pointer;
  display: inline-block;
  margin: 2px;
}
.tr-tag-helper code:hover { background: #fed7aa; }

/* Badges & Buttons */
.badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 800; display: inline-block; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

.btn-sm { padding: 6px 10px; border-radius: 6px; border: none; font-weight: 700; cursor: pointer; font-size: 0.75rem; margin-right: 4px; margin-bottom: 4px; }
.btn-approve { background: #22c55e; color: #fff; }
.btn-reject { background: #f59e0b; color: #fff; }
.btn-delete { background: #ef4444; color: #fff; }
.btn-print { background: #0284c7; color: #fff; }

.user-email-link {
  color: #0284c7;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}
.user-email-link:hover { color: #0369a1; }

/* Modal Pop-up */
.tr-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.tr-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hours-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f4; flex-wrap: wrap; }
.hours-day { width: 120px; font-weight: bold; font-size: 0.85rem; }

/* Responsive Improvements */
@media(max-width: 900px) {
  .tr-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media(max-width: 600px) {
  .tr-stats-grid { grid-template-columns: 1fr; }
  .tr-grid-3, .tr-grid-2 { grid-template-columns: 1fr; }
  .tr-bulk-bar, .tr-filter-bar { flex-direction: column; align-items: stretch; }
  .tr-bulk-bar select, .tr-bulk-bar button, .tr-filter-bar input, .tr-filter-bar button { width: 100% !important; }
}

/* Print CSS Styles (Mutfak / Garson Çıktısı) */
@media print {
  #adminmenumain, #wpadminbar, #wpfooter, .admin-nav, .tr-bulk-bar, .tr-filter-bar, .tr-stats-grid, .tr-no-print, .btn-sm, th:first-child, td:first-child, th:last-child, td:last-child {
    display: none !important;
  }
  #wpcontent, #wpbody-content { margin-left: 0 !important; padding: 0 !important; }
  .tr-card { border: none !important; box-shadow: none !important; padding: 0 !important; }
  table { width: 100% !important; border: 1px solid #000 !important; }
  th, td { border: 1px solid #ccc !important; padding: 8px !important; color: #000 !important; }
}