/* ==============================================================================
   Greenta Owner Dashboard - Modern Pitch Owner Theme
   ============================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #0a0f0d;
  --bg-card: rgba(18, 26, 22, 0.85);
  --bg-card-hover: rgba(24, 36, 30, 0.95);
  --bg-input: #111a15;
  --border-color: rgba(46, 204, 113, 0.18);
  --border-focus: #2ecc71;
  
  --primary: #27ae60;
  --primary-light: #2ecc71;
  --primary-glow: rgba(46, 204, 113, 0.35);
  --accent: #f39c12;
  --accent-glow: rgba(243, 156, 18, 0.3);
  
  --danger: #e74c3c;
  --danger-glow: rgba(231, 76, 60, 0.3);
  --warning: #f1c40f;
  --info: #3498db;
  --info-glow: rgba(52, 152, 219, 0.3);
  
  --text-main: #f5f6fa;
  --text-muted: #95a5a6;
  --text-dim: #7f8c8d;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(39, 174, 96, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(46, 204, 113, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #070b09 0%, #0c1410 100%);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
}

/* Glassmorphism helpers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Header & Navigation */
.owner-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #27ae60, #1b5e20);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
  font-size: 1.5rem;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(46, 204, 113, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1abc9c, #16a085);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-logout {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #ff6b6b;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 15px var(--danger-glow);
}

/* Main Container */
.main-wrapper {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 3rem;
}

/* Quick Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-light);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.7);
  border-color: rgba(46, 204, 113, 0.35);
}

.stat-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.stat-info h3 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(46, 204, 113, 0.12);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Section Header & Filters */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.section-title .badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary-light);
  font-weight: 700;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-warning {
  background: rgba(243, 156, 18, 0.15);
  border: 1px solid rgba(243, 156, 18, 0.4);
  color: #f39c12;
}

.btn-warning:hover {
  background: #f39c12;
  color: #fff;
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.btn-danger:hover {
  background: #e74c3c;
  color: #fff;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px var(--primary-glow);
}

select.form-control option {
  background: #111a15;
  color: #fff;
}

/* Pitches Grid */
.pitches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.pitch-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.pitch-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 204, 113, 0.35);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

.pitch-thumb {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #16241c, #0c1510);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pitch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pitch-card:hover .pitch-thumb img {
  transform: scale(1.05);
}

.pitch-thumb .placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.4;
}

.pitch-status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.pitch-status-pill.active {
  background: rgba(39, 174, 96, 0.85);
  color: #fff;
}

.pitch-status-pill.maintenance {
  background: rgba(243, 156, 18, 0.85);
  color: #fff;
}

.pitch-price-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.pitch-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pitch-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}

.pitch-region {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.pitch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-muted);
}

.pitch-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.pitch-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.pitch-actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* Schedule & Slots Grid */
.schedule-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.date-selector-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
}

.date-btn:hover, .date-btn.active {
  background: var(--primary);
  border-color: var(--primary-light);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* ==============================================================================
   Day Accordion Styles (تجميع الحصص حسب الأيام قابلة للطي والفتح)
   ============================================================================== */
.days-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.day-accordion-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.day-accordion-card:hover {
  border-color: rgba(46, 204, 113, 0.35);
}

.day-accordion-card.is-today {
  border-color: rgba(46, 204, 113, 0.45);
}

.day-accordion-header {
  padding: 1.1rem 1.4rem;
  background: linear-gradient(90deg, rgba(20, 30, 24, 0.8) 0%, rgba(15, 22, 18, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.day-accordion-card.open .day-accordion-header {
  background: linear-gradient(90deg, rgba(39, 174, 96, 0.15) 0%, rgba(20, 30, 24, 0.95) 100%);
  border-bottom: 1px solid var(--border-color);
}

.day-accordion-header:hover {
  background: rgba(30, 44, 36, 0.95);
}

.day-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.day-toggle-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--primary-light);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-accordion-card.open .day-toggle-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}

.day-badge-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.day-badge-pill.today {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.day-badge-pill.tomorrow {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border-color: rgba(52, 152, 219, 0.4);
}

.day-date-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.day-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.day-summary-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sum-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sum-pill.vacant {
  background: rgba(46, 204, 113, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(46, 204, 113, 0.25);
}

.sum-pill.booked {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.25);
}

.sum-pill.maintenance {
  background: rgba(243, 156, 18, 0.12);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.25);
}

.sum-pill.revenue {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.25);
}

/* أيام الأرشيف (منقضية - للعرض فقط) */
.day-accordion-card.is-archived .day-date-title {
  color: var(--text-muted);
}

.day-badge-pill.archived {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.day-accordion-body {
  display: none;
  padding: 1.35rem 1.4rem;
  animation: fadeIn 0.3s ease;
}

.day-accordion-card.open .day-accordion-body {
  display: block;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

.slot-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  background: rgba(18, 26, 22, 0.9);
}

.slot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.slot-card.vacant {
  border-color: rgba(46, 204, 113, 0.3);
}

.slot-card.vacant::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.slot-card.booked {
  border-color: rgba(231, 76, 60, 0.35);
  background: rgba(30, 20, 22, 0.9);
}

.slot-card.booked::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #c0392b, #e74c3c);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.slot-card.maintenance {
  border-color: rgba(243, 156, 18, 0.3);
  background: rgba(30, 26, 18, 0.9);
}

.slot-card.maintenance::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #d35400, #f39c12);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

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

.slot-time {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.slot-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.slot-badge.vacant {
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.slot-badge.booked {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.slot-badge.maintenance {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.slot-details {
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.slot-booker-info {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

.booker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.slot-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.slot-actions .btn {
  flex: 1;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
}

/* Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: var(--transition);
}

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

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2980b9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.stars {
  color: #f1c40f;
  font-size: 1rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #111a15;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px var(--primary-glow);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.btn-close-modal:hover {
  color: #fff;
  transform: scale(1.1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #1a2620;
  border: 1px solid var(--border-color);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInLeft 0.3s ease;
  min-width: 280px;
}

.toast.success {
  border-color: var(--primary-light);
  box-shadow: 0 0 15px var(--primary-glow);
}

.toast.error {
  border-color: var(--danger);
  box-shadow: 0 0 15px var(--danger-glow);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================================
   Subscriptions & Recurring Bookings Styles (الاشتراكات الأسبوعية)
   ============================================================================== */
.subscriptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.subscription-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.subscription-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(46, 204, 113, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 20px rgba(46, 204, 113, 0.15);
}

.subscription-card.cancelled {
  opacity: 0.7;
  border-color: rgba(231, 76, 60, 0.25);
  background: rgba(20, 15, 15, 0.6);
}

.sub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sub-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sub-subscriber-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sub-subscriber-phone {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sub-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sub-badge.month {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.35);
}

.sub-badge.continuous {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.sub-badge.cancelled {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.sub-timing-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.88rem;
}

.sub-timing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sub-pitch-name {
  color: var(--primary-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sub-day-time {
  color: #f1c40f;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sub-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.sub-metric-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-metric-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.sub-metric-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.sub-financial-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
  font-size: 0.82rem;
}

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

.sub-actions .btn {
  flex: 1;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  justify-content: center;
}

/* Radio Cards in Subscription Modal */
.subscription-type-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.subscription-type-card:hover {
  background: rgba(46, 204, 113, 0.05);
  border-color: rgba(46, 204, 113, 0.4);
}

.subscription-type-card input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.subscription-type-card.selected {
  background: rgba(46, 204, 113, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.st-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.st-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.sub-matches-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.sub-matches-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Subscriptions Weekly View Toggle & Legend */
.sub-view-toggle-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  gap: 3px;
}

.sub-view-toggle-group .btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 6px;
  color: var(--text-muted);
}

.sub-view-toggle-group .btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.sub-legend-bar .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.continuous { background: #2ecc71; box-shadow: 0 0 8px rgba(46, 204, 113, 0.6); }
.legend-dot.month { background: #3498db; box-shadow: 0 0 8px rgba(52, 152, 219, 0.6); }
.legend-dot.partial { background: #f39c12; box-shadow: 0 0 8px rgba(243, 156, 18, 0.6); }
.legend-dot.subscribed { background: #9b59b6; box-shadow: 0 0 8px rgba(155, 89, 182, 0.6); }

/* Weekly Slots Grid */
.weekly-slot-card {
  background: rgba(18, 26, 22, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: var(--transition);
}

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

.weekly-slot-card.state-available-continuous {
  border-color: rgba(46, 204, 113, 0.35);
  background: linear-gradient(145deg, rgba(46, 204, 113, 0.05) 0%, rgba(18, 26, 22, 0.8) 100%);
}

.weekly-slot-card.state-available-month {
  border-color: rgba(52, 152, 219, 0.35);
  background: linear-gradient(145deg, rgba(52, 152, 219, 0.05) 0%, rgba(18, 26, 22, 0.8) 100%);
}

.weekly-slot-card.state-partially-booked {
  border-color: rgba(243, 156, 18, 0.35);
  background: linear-gradient(145deg, rgba(243, 156, 18, 0.05) 0%, rgba(18, 26, 22, 0.8) 100%);
}

.weekly-slot-card.state-subscribed {
  border-color: rgba(155, 89, 182, 0.45);
  background: linear-gradient(145deg, rgba(155, 89, 182, 0.08) 0%, rgba(18, 26, 22, 0.85) 100%);
}

.slot-state-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.slot-state-badge.state-available-continuous {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.slot-state-badge.state-available-month {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.slot-state-badge.state-partially-booked {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.slot-state-badge.state-subscribed {
  background: rgba(155, 89, 182, 0.18);
  color: #c39bd3;
  border: 1px solid rgba(155, 89, 182, 0.4);
}

/* ==============================================================================
   Mobile Bottom Bar (الشريط السفلي للموبايل)
   ============================================================================== */
.mobile-bottom-bar {
  display: none;
}

/* ==============================================================================
   Responsive & Mobile-First Optimization
   ============================================================================== */
@media (max-width: 900px) {
  .header-container {
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  /* ──────────────────────────────────────────────
     1. الهيدر العلوي — مريح وغير مزدحم
     ────────────────────────────────────────────── */
  .owner-header {
    padding: 0.5rem 0.75rem;
  }

  .header-container {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .nav-links {
    display: none !important;
  }

  .brand-logo-badge {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
  }

  .brand-text h1 {
    font-size: 0.95rem;
    letter-spacing: -0.3px;
  }

  .brand-text span {
    display: none;
  }

  .header-user {
    gap: 0.45rem;
  }

  .user-badge {
    padding: 0.25rem 0.55rem;
    gap: 0.4rem;
    border-radius: 20px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .user-info {
    display: none; /* إخفاء اسم المستخدم بالكامل على الموبايل لتقليل الازدحام */
  }

  .btn-logout {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    border-radius: 6px;
  }

  /* ──────────────────────────────────────────────
     2. الحاوية الرئيسية — مسافة سفلية للشريط
     ────────────────────────────────────────────── */
  .main-wrapper {
    margin: 0.65rem auto;
    padding: 0 0.6rem 80px;
  }

  /* ──────────────────────────────────────────────
     3. الشريط السفلي للموبايل (Bottom Nav)
     ────────────────────────────────────────────── */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(10, 15, 13, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.65);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 0;
    border-radius: var(--radius-sm);
    position: relative;
  }

  .mobile-nav-item .m-nav-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
  }

  .mobile-nav-item.active {
    color: var(--primary-light);
  }

  .mobile-nav-item.active::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--primary-light);
    border-radius: 2px;
  }

  .mobile-nav-item.active .m-nav-icon {
    transform: scale(1.1);
  }

  /* ──────────────────────────────────────────────
     4. بطاقات الإحصائيات — مضغوطة ومقروءة
     ────────────────────────────────────────────── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 0.85rem !important;
  }

  .stat-card {
    padding: 0.55rem 0.65rem !important;
    border-radius: var(--radius-sm) !important;
    min-height: auto !important;
    flex-direction: row-reverse !important;
    gap: 0.4rem;
  }

  .stat-card::after {
    width: 3px;
  }

  .stat-card:nth-child(5) {
    grid-column: 1 / -1 !important;
  }

  .stat-info {
    flex: 1;
    min-width: 0;
  }

  .stat-info span {
    font-size: 0.65rem !important;
    margin-bottom: 0.1rem !important;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .stat-info h3 {
    font-size: 1.15rem !important;
    line-height: 1.2;
  }

  .stat-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    flex-shrink: 0;
  }

  /* ──────────────────────────────────────────────
     5. شريط التحكم — مرتب عمودياً بوضوح
     ────────────────────────────────────────────── */
  .schedule-controls-bar {
    padding: 0.75rem !important;
    margin-bottom: 0.85rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
  }

  .schedule-controls-bar > div:first-child {
    min-width: unset !important;
    width: 100% !important;
  }

  .schedule-controls-bar > div:first-child label {
    font-size: 0.78rem !important;
  }

  .schedule-controls-bar select {
    font-size: 0.82rem !important;
    padding: 0.5rem 0.65rem !important;
  }

  /* الأزرار في التحكم — شبكة مرتبة */
  .schedule-controls-bar > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .schedule-controls-bar .btn {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }

  .schedule-controls-bar .btn-primary {
    flex: 1 1 100% !important;
    order: -1;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.85rem !important;
  }

  /* مجموعة تبديل العرض (جدول/قائمة) */
  .sub-view-toggle-group {
    flex: 1 1 100% !important;
    display: flex !important;
    width: 100% !important;
  }

  .sub-view-toggle-group .btn {
    flex: 1 !important;
    padding: 0.45rem 0.4rem !important;
    font-size: 0.75rem !important;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
  }

  #btnExtendMonth {
    width: 100% !important;
    font-size: 0.85rem !important;
    padding: 0.65rem 0.85rem !important;
  }

  /* ──────────────────────────────────────────────
     6. Legend دليل الحالات — عمودي مرتب
     ────────────────────────────────────────────── */
  .sub-legend-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
    padding: 0.6rem 0.85rem !important;
    margin-bottom: 0.85rem !important;
    font-size: 0.75rem !important;
  }

  .sub-legend-bar .legend-item {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  /* ──────────────────────────────────────────────
     7. قائمة الأيام — أنيقة ومضغوطة
     ────────────────────────────────────────────── */
  .days-accordion-container {
    gap: 0.6rem !important;
  }

  .day-accordion-header {
    padding: 0.65rem 0.75rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem !important;
  }

  .day-header-right {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  .day-toggle-arrow {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.7rem !important;
  }

  .day-date-title {
    font-size: 0.9rem !important;
  }

  .day-header-left {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .day-summary-pills {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
  }

  .sum-pill {
    font-size: 0.65rem !important;
    padding: 2px 5px !important;
  }

  .day-badge-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .day-accordion-body {
    padding: 0.65rem 0.5rem !important;
  }

  /* ──────────────────────────────────────────────
     8. بطاقات الحصص الزمنية — مضغوطة ومريحة
     ────────────────────────────────────────────── */
  .slots-grid {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .slot-card {
    padding: 0.65rem 0.75rem !important;
    border-radius: 10px !important;
  }

  .slot-header {
    margin-bottom: 0.45rem !important;
  }

  .slot-time {
    font-size: 0.95rem !important;
  }

  .slot-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .slot-details {
    margin-bottom: 0.5rem !important;
    font-size: 0.78rem !important;
  }

  .slot-booker-info {
    padding: 0.5rem 0.65rem !important;
    margin-top: 0.35rem !important;
    font-size: 0.78rem;
  }

  .slot-actions {
    gap: 0.35rem !important;
    margin-top: 0.5rem !important;
  }

  .slot-actions .btn {
    padding: 0.4rem 0.45rem !important;
    font-size: 0.75rem !important;
  }

  /* بطاقات الحصص الأسبوعية */
  .weekly-slot-card {
    padding: 0.65rem 0.75rem !important;
    gap: 0.45rem !important;
  }

  .slot-state-badge {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  /* ──────────────────────────────────────────────
     9. شبكة الملاعب على الموبايل
     ────────────────────────────────────────────── */
  .pitches-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .pitch-thumb {
    height: 150px !important;
  }

  .pitch-body {
    padding: 0.85rem !important;
  }

  .pitch-name {
    font-size: 1rem;
  }

  .pitch-actions .btn {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.78rem !important;
  }

  /* ──────────────────────────────────────────────
     10. شبكة الاشتراكات على الموبايل
     ────────────────────────────────────────────── */
  .subscriptions-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .subscription-card {
    padding: 0.85rem !important;
    gap: 0.65rem !important;
  }

  .sub-subscriber-name {
    font-size: 1rem;
  }

  .sub-timing-box {
    padding: 0.55rem 0.7rem !important;
    font-size: 0.8rem !important;
  }

  .sub-metrics-row {
    gap: 0.35rem !important;
  }

  .sub-metric-pill {
    padding: 0.35rem 0.3rem !important;
  }

  .sub-metric-label {
    font-size: 0.62rem !important;
  }

  .sub-metric-val {
    font-size: 0.8rem !important;
  }

  .sub-financial-bar {
    font-size: 0.75rem !important;
    padding-top: 0.5rem !important;
  }

  .sub-actions .btn {
    padding: 0.4rem 0.45rem !important;
    font-size: 0.75rem !important;
  }

  /* ──────────────────────────────────────────────
     11. شريط أدوات الأقسام على الموبايل
     ────────────────────────────────────────────── */
  .section-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    padding: 0.75rem 0.85rem !important;
  }

  .toolbar-actions {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
  }

  .toolbar-actions select,
  .toolbar-actions .btn {
    width: 100% !important;
  }

  /* ──────────────────────────────────────────────
     12. النوافذ المنبثقة (Modals) — ملء الشاشة
     ────────────────────────────────────────────── */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .modal-header {
    padding: 0.85rem 1rem !important;
    position: sticky;
    top: 0;
    background: #111a15;
    z-index: 10;
  }

  .modal-title {
    font-size: 1rem !important;
  }

  .modal-body {
    padding: 1rem !important;
  }

  .modal-footer {
    padding: 0.75rem 1rem !important;
    position: sticky;
    bottom: 0;
    background: #111a15;
    z-index: 10;
  }

  /* ──────────────────────────────────────────────
     13. التوست على الموبايل
     ────────────────────────────────────────────── */
  .toast-container {
    bottom: 70px !important;
    left: 12px !important;
    right: 12px !important;
  }

  .toast {
    min-width: unset !important;
    width: 100%;
    font-size: 0.82rem;
    padding: 0.65rem 0.85rem;
  }

  /* ──────────────────────────────────────────────
     14. زر تمديد الشهر على الموبايل
     ────────────────────────────────────────────── */
  #extendMonthSection {
    padding: 0.85rem !important;
    margin-top: 1rem !important;
  }

  #extendMonthSection p {
    font-size: 0.72rem !important;
    line-height: 1.5;
  }
}

/* ──────────────────────────────────────────────
   شاشات صغيرة جداً (≤ 400px)
   ────────────────────────────────────────────── */
@media (max-width: 400px) {
  .brand-text h1 {
    font-size: 0.85rem;
  }

  .brand-logo-badge {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }

  .main-wrapper {
    padding: 0 0.45rem 80px;
  }

  .stats-grid {
    gap: 0.4rem !important;
  }

  .stat-card {
    padding: 0.45rem 0.55rem !important;
  }

  .stat-info span {
    font-size: 0.6rem !important;
  }

  .stat-info h3 {
    font-size: 1rem !important;
  }

  .stat-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.85rem !important;
    border-radius: 7px !important;
  }

  .schedule-controls-bar {
    padding: 0.6rem !important;
  }

  .day-accordion-header {
    padding: 0.55rem 0.6rem !important;
  }

  .day-date-title {
    font-size: 0.82rem !important;
  }

  .slot-card {
    padding: 0.55rem 0.6rem !important;
  }

  .slot-time {
    font-size: 0.88rem !important;
  }

  .subscription-card {
    padding: 0.7rem !important;
  }

  .mobile-nav-item {
    font-size: 0.62rem;
  }

  .mobile-nav-item .m-nav-icon {
    font-size: 1.1rem;
  }
}

/* ──────────────────────────────────────────────
   Animation for mobile modal slide-up
   ────────────────────────────────────────────── */
@keyframes slideUpModal {
  from { transform: translateY(100%); opacity: 0.8; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==============================================================================
   الإعدادات (Settings View)
   ============================================================================== */
button.user-badge {
  font-family: inherit;
  color: inherit;
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
}

button.user-badge:hover,
button.user-badge.active {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.1);
}

body.settings-active .stats-strip {
  display: none;
}

#settingsView {
  max-width: 760px;
  margin-inline: auto;
}

.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.settings-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.settings-profile-info {
  flex: 1;
  min-width: 0;
}

.settings-profile-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.settings-profile-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-status-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  border: 1px solid transparent;
}

.settings-status-pill.ok,
.wallet-tag.ok {
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary-light);
  border-color: rgba(46, 204, 113, 0.3);
}

.settings-status-pill.warn,
.wallet-tag.warn {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent);
  border-color: rgba(243, 156, 18, 0.3);
}

.settings-status-pill.bad,
.wallet-tag.bad {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
  border-color: rgba(231, 76, 60, 0.3);
}

.settings-menu {
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.95rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
}

.settings-item + .settings-item {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-item:hover {
  background: rgba(46, 204, 113, 0.07);
}

.settings-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.settings-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-item-text b {
  font-size: 0.95rem;
  font-weight: 800;
}

.settings-item-text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-item-arrow {
  font-size: 1.4rem;
  color: var(--text-dim);
}

.settings-item.danger b {
  color: var(--danger);
}

.settings-item.danger .settings-item-icon {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.25);
}

.settings-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1.25rem 0;
}

.settings-subtitle {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.settings-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.settings-info-row span {
  color: var(--text-muted);
}

.settings-info-row b {
  color: #fff;
}

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

.wallet-card {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.wallet-card span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.wallet-card b {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.wallet-card.highlight b { color: var(--primary-light); }
.wallet-card.danger b { color: var(--danger); }

.wallet-due-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.wallet-due-row a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 700;
}

.wallet-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.contact-option:hover {
  border-color: var(--primary-light);
  background: rgba(46, 204, 113, 0.07);
}

.contact-option b {
  display: block;
  font-size: 0.92rem;
}

.contact-option small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .settings-profile-card {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .settings-item {
    padding: 0.85rem 0.75rem;
  }
}

/* ==============================================================================
   النوافذ المنبثقة: تحسينات عامة + الورقة السفلية على الموبايل
   ============================================================================== */
body.modal-open {
  overflow: hidden;
}

.modal-dialog {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 204, 113, 0.35) transparent;
}

.modal-dialog::-webkit-scrollbar {
  width: 6px;
}

.modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(46, 204, 113, 0.35);
  border-radius: 3px;
}

.btn-close-modal {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: -0.4rem;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.06);
}

input[type="file"].form-control::file-selector-button {
  font-family: inherit;
  font-weight: 700;
  color: #fff;
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  margin-inline-end: 0.75rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .modal-overlay {
    height: 100vh;
    height: 100dvh;
  }

  .modal-dialog {
    max-height: 92vh !important;
    max-height: 92dvh !important;
    border-bottom: none !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6) !important;
  }

  /* مقبض السحب أعلى الورقة */
  .modal-header {
    padding-top: 1.35rem !important;
  }

  .modal-header::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
  }

  /* هدف لمس مريح لزر الإغلاق (44px) */
  .btn-close-modal {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.4rem !important;
  }

  /* 16px على الأقل حتى لا يكبّر iPhone الصفحة تلقائياً عند الكتابة */
  .modal-dialog .form-control,
  .modal-dialog input,
  .modal-dialog select,
  .modal-dialog textarea {
    font-size: 16px !important;
    min-height: 46px;
  }

  /* الحقول المزدوجة في صف واحد تُرتب عمودياً على الموبايل */
  .modal-body [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .modal-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
  }

  .modal-footer .btn {
    flex: 1;
    min-height: 48px;
    font-size: 0.9rem;
    line-height: 1.3;
  }

  /* الزر الرئيسي يأخذ المساحة الأكبر، والإلغاء أصغر */
  .modal-footer .btn-primary,
  .modal-footer .btn-danger {
    flex: 2;
  }
}

/* شريط أعلى الأرشيف: مدة الحذف التلقائي + زر الإفراغ */
.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.archive-toolbar .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .archive-toolbar .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* نافذة التأكيد */
.confirm-dialog {
  max-width: 420px;
}

.confirm-dialog .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

.confirm-body {
  text-align: center;
  padding-top: 0 !important;
}

.confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.confirm-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  white-space: pre-line;
}

/* ==============================================================================
   شعار قرينتا
   ============================================================================== */
.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.auth-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 auto 1rem;
}

/* ==============================================================================
   شريط الإحصائيات: دوائر صغيرة بدل البطاقات
   ============================================================================== */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.9rem 0.75rem;
  margin-bottom: 1.25rem;
  max-width: 760px;
  margin-inline: auto;
}

.stat-dot {
  --dot-color: var(--primary-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.stat-dot.booked { --dot-color: #e74c3c; }
.stat-dot.vacant { --dot-color: #3498db; }
.stat-dot.revenue { --dot-color: #2ecc71; }
.stat-dot.rating { --dot-color: #f1c40f; }

.stat-dot-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  min-height: 2.6em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stat-dot-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: color-mix(in srgb, var(--dot-color) 14%, transparent);
  border: 2px solid color-mix(in srgb, var(--dot-color) 60%, transparent);
}

.stat-dot-circle[data-len="lg"] { font-size: 0.95rem; }
.stat-dot-circle[data-len="xl"] { font-size: 0.78rem; }

@media (max-width: 768px) {
  .stats-strip {
    padding: 0.75rem 0.4rem;
    gap: 0.25rem;
    margin-bottom: 0.85rem;
  }

  .stat-dot-label {
    font-size: 0.66rem;
  }

  .stat-dot-circle {
    width: 50px;
    height: 50px;
    font-size: 1.05rem;
  }

  .stat-dot-circle[data-len="lg"] { font-size: 0.85rem; }
  .stat-dot-circle[data-len="xl"] { font-size: 0.7rem; }
}

/* ==============================================================================
   اختيار الملعب أعلى الشاشة + أزرار الجدول المصغرة
   ============================================================================== */
.header-pitch-select {
  max-width: 200px;
  height: 38px;
  padding: 0 0.75rem 0 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.header-pitch-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.header-pitch-select option {
  background: #111a15;
}

.schedule-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-chip:hover {
  color: #fff;
  border-color: rgba(46, 204, 113, 0.45);
}

.archive-dialog {
  max-width: 720px;
}

@media (max-width: 768px) {
  .header-pitch-select {
    max-width: 150px;
    height: 36px;
    font-size: 16px; /* أقل من 16px يجعل iPhone يكبّر الصفحة عند الفتح */
    padding: 0 0.5rem 0 1.6rem;
  }

  .schedule-toolbar {
    margin-bottom: 0.6rem;
  }
}

/* شاشات الكمبيوتر المتوسطة: الصورة الرمزية فقط في بطاقة الحساب لتتسع قائمة الملاعب دون التفاف عناوين التبويبات */
@media (min-width: 769px) and (max-width: 1500px) {
  .user-badge .user-info {
    display: none;
  }

  .user-badge {
    padding: 0.3rem;
  }

  .header-pitch-select {
    max-width: 180px;
  }
}

/* ==============================================================================
   اختيار الملعب أعلى الشاشة: اسم كامل بخط متكيّف + قائمة أصلية شفافة فوقه
   ============================================================================== */
.header-pitch-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 200px;
  height: 40px;
  padding: 0 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  cursor: pointer;
  transition: var(--transition);
}

.header-pitch-picker:hover,
.header-pitch-picker:focus-within {
  border-color: var(--border-focus);
}

.header-pitch-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.header-pitch-name.two-lines {
  white-space: normal;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.header-pitch-chevron {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.header-pitch-picker .header-pitch-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}

@media (min-width: 769px) and (max-width: 1500px) {
  .header-pitch-picker {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .header-pitch-picker {
    width: 150px;
    height: 38px;
    padding: 0 0.55rem;
  }
}

/* سطر الاسم بارتفاع يكفي حروف خط Cairo العالية دون قص */
.header-pitch-name {
  line-height: 1.6;
}

.header-pitch-name.two-lines {
  line-height: 1.3;
}

/* الموبايل: مربع الملعب يأخذ كل المساحة المتاحة بين الشعار والصورة الشخصية */
@media (max-width: 768px) {
  .header-user {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
  }

  .header-pitch-picker {
    flex: 1;
    width: auto;
    min-width: 0;
    max-width: 260px;
  }
}

/* الموبايل: الشعار نفسه يحمل اسم greenta، فنخفي النص بجانبه لنعطي اسم الملعب مساحة أكبر */
@media (max-width: 768px) {
  .brand-text {
    display: none;
  }

  .header-pitch-picker {
    max-width: none;
  }
}

/* هامش رأسي يكفي حروف Cairo العالية والنقاط دون قص */
.header-pitch-name {
  line-height: 1.8;
}

.header-pitch-name.two-lines {
  line-height: 1.45;
}

/* ==============================================================================
   بطاقة اليوم المبسطة: التاريخ يميناً، الأعداد والسهم يساراً
   ============================================================================== */
.day-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 56px;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  text-align: right;
  cursor: pointer;
}

.day-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.day-row:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

.day-when {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  margin-left: auto; /* يدفع الأعداد والسهم إلى اليسار */
}

.day-name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.day-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.day-tag.today { color: var(--primary-light); }
.day-tag.closed { color: var(--accent); }

.day-counts {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.day-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.day-count i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.day-count.vacant { color: var(--primary-light); }
.day-count.booked { color: #e8685a; }
.day-count.closed { color: var(--accent); }
.day-count.revenue { color: #5dade2; }
.day-count.muted { color: var(--accent); }

.day-chevron {
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.day-card.open .day-chevron {
  transform: rotate(180deg);
  color: var(--primary-light);
}

/* اليوم الجاري: خط أخضر خفيف بدل الشارة المضيئة */
.day-card.is-today {
  border-color: rgba(46, 204, 113, 0.45);
}

.day-card.is-closed .day-row {
  opacity: 0.6;
}

.day-card.is-closed {
  border-style: dashed;
}

.day-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.day-action-btn {
  min-height: 36px;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
}

.day-action-btn.close {
  color: #e8685a;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.day-action-btn.close:hover {
  background: rgba(231, 76, 60, 0.1);
}

.day-action-btn.reopen {
  color: var(--primary-light);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.day-action-btn.reopen:hover {
  background: rgba(46, 204, 113, 0.1);
}

@media (max-width: 768px) {
  .day-row {
    flex-wrap: wrap;
    row-gap: 0.3rem;
    padding: 0.7rem 0.8rem;
    min-height: 52px;
  }

  .day-name {
    font-size: 0.95rem;
  }

  .day-counts {
    gap: 0.6rem;
    font-size: 0.75rem;
  }

  .day-action-btn {
    min-height: 44px;
    width: 100%;
  }
}

.day-chevron,
.header-pitch-chevron {
  display: inline-flex;
  align-items: center;
}

/* أسماء طويلة بلا مسافات لا تُوسّع نافذة التأكيد */
.confirm-message {
  overflow-wrap: anywhere;
}

.confirm-icon.positive {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.35);
}

/* ==============================================================================
   شريط الاشتراكات: صف واحد بنفس أسلوب أزرار الجدول المصغرة
   ============================================================================== */
.sub-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.sub-toolbar-spacer {
  flex: 1;
}

.btn-chip.primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-chip.primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-chip.icon {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.btn-chip:focus-visible,
.chip-toggle button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.chip-toggle {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
}

.chip-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 30px;
  padding: 0.2rem 0.75rem;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.chip-toggle button.active {
  background: rgba(46, 204, 113, 0.16);
  color: var(--primary-light);
}

.chip-count {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .sub-toolbar {
    gap: 0.3rem;
    margin-bottom: 0.6rem;
  }

  .sub-toolbar .btn-chip,
  .chip-toggle button {
    font-size: 0.74rem;
  }

  .sub-toolbar .btn-chip.primary {
    padding: 0.3rem 0.6rem;
  }

  .chip-toggle button {
    padding: 0.2rem 0.6rem;
  }
}

/* حالات حصص الاشتراك الأسبوعي في رأس اليوم */
.day-count.month { color: #5dade2; }
.day-count.subscribed { color: #c39bd3; }
.day-count.partial { color: var(--accent); }

/* ==============================================================================
   المرحلة B: إيقاف الإدارة، تنبيه الاشتراك، رسالة الدخول
   ============================================================================== */
.pitch-status-pill.suspended {
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
}

.pitch-admin-note {
  margin: 0.35rem 0 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #f1a097;
  font-size: 0.8rem;
  line-height: 1.6;
}

.sub-expiry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.35);
  color: #f5c06b;
  font-size: 0.85rem;
  font-weight: 700;
}

/* شاشة «قيد المراجعة»: تغطي اللوحة كاملة (تحت النوافذ والإشعارات) */
.pending-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: var(--bg-main);
}

body.pending-locked { overflow: hidden; }

.pending-gate-card {
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.pending-gate-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 0.6rem; }
.pending-gate-card h2 { font-size: 1.35rem; color: #fff; margin-bottom: 0.6rem; }
.pending-gate-text { color: var(--text-muted); font-size: 0.92rem; line-height: 1.9; }
.pending-gate-text strong { color: #fff; }

.pending-gate-docs {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color);
  text-align: start;
}

.pending-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.pending-gate-actions .btn { flex: 1; min-width: 130px; }

/* سبب الإغلاق: حقل في نافذة التأكيد + سطر على اليوم المغلق */
.confirm-reason { margin-top: 0.9rem; text-align: start; }
.day-close-reason {
  display: inline-block;
  margin-inline-start: 0.6rem;
  font-size: 0.82rem;
  color: #f5c06b;
  overflow-wrap: anywhere;
}

/* موقع الملعب على الخريطة (نافذة الملعب + تنبيه البطاقة) */
.pitch-location-map {
  height: 300px;
  margin-top: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.pitch-location-status {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pitch-location-status.is-set { color: #2fd08a; }

.pitch-location-missing {
  display: block;
  width: 100%;
  margin: 0.45rem 0;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 210, 122, 0.5);
  background: rgba(255, 210, 122, 0.08);
  color: #ffd27a;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: start;
  cursor: pointer;
}

.pitch-location-missing:hover { background: rgba(255, 210, 122, 0.14); }

@media (max-width: 768px) {
  .pitch-location-map { height: 260px; }
}

/* إعادة إرسال رمز التحقق مع العدّاد */
.otp-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.otp-resend .btn { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.otp-resend .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ------------------------------------------------------------------------------
   شحن المحفظة: مبلغ بارز كرقم لوحة النتائج + قائمة طرق الدفع بشعاراتها
   ------------------------------------------------------------------------------ */
/* رصيد المالك لدى المنصة: البند الأول في المحفظة */
.wallet-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #0b130f;
}

.wallet-balance > div { flex: 1; min-width: 180px; }
.wallet-balance-label { display: block; font-size: 0.82rem; color: var(--text-muted); }
.wallet-balance-value { display: block; font-size: 2rem; font-weight: 900; line-height: 1.3; color: #fff; font-variant-numeric: tabular-nums; }
.wallet-balance-note { display: block; font-size: 0.76rem; line-height: 1.6; color: var(--text-dim); }

.wallet-tx { margin-top: 0.6rem; font-size: 0.86rem; }
.wallet-tx summary { padding: 0.4rem 0; color: var(--primary-light); font-weight: 700; cursor: pointer; }
.wallet-tx-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.wallet-tx-row b { display: block; color: #fff; }
.wallet-tx-row span { color: var(--text-muted); font-size: 0.78rem; }
.wallet-tx-amount { font-weight: 800; font-size: 0.92rem !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-tx-amount.in { color: var(--primary-light) !important; }
.wallet-tx-amount.out { color: #f5b7b1 !important; }

.topup-dialog { max-width: 460px; }

.topup-amount-field {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #0b130f;
}

.topup-amount-field:focus-within { border-color: var(--border-focus); }

.topup-amount-field input {
  width: 6.5ch;
  min-width: 0;
  border: none;
  background: none;
  color: #fff;
  font-family: inherit;
  /* قاعدة الموبايل تفرض 16px على حقول النوافذ (لمنع تكبير iOS)؛ هذا الرقم أكبر منها أصلاً */
  font-size: 2.6rem !important;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.topup-amount-field input::-webkit-outer-spin-button,
.topup-amount-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.topup-amount-field span { font-size: 1rem; font-weight: 700; color: var(--text-muted); }

.topup-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.6rem; }

.topup-chip {
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.topup-chip:hover { border-color: var(--primary-light); }
.topup-chip.is-on { background: rgba(46, 204, 113, 0.14); border-color: var(--primary-light); color: var(--primary-light); }

.topup-methods { margin: 1.25rem 0 1rem; padding: 0; border: none; min-width: 0; }
.topup-methods legend { padding: 0; }
#topupMethods { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.35rem; }

.topup-method {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 60px;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #0b130f;
  cursor: pointer;
}

.topup-method input { position: absolute; opacity: 0; pointer-events: none; }
.topup-method:hover { border-color: rgba(46, 204, 113, 0.45); }
.topup-method:has(input:checked) { border-color: var(--primary-light); background: rgba(46, 204, 113, 0.08); }
.topup-method:has(input:focus-visible) { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.topup-method-logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.topup-method-logo.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 900;
}

.topup-method-name { flex: 1; min-width: 0; font-weight: 700; color: #fff; overflow-wrap: anywhere; }

/* علامة الاختيار: دائرة تمتلئ عند التحديد */
.topup-method-check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
}

.topup-method:has(input:checked) .topup-method-check {
  border-color: var(--primary-light);
  background: radial-gradient(circle, var(--primary-light) 0 45%, transparent 50%);
}

.topup-method.is-off { opacity: 0.5; cursor: not-allowed; }
.topup-method-name small { display: block; font-size: 0.74rem; font-weight: 500; color: var(--text-muted); }

.topup-summary { margin-bottom: 1rem; font-size: 0.92rem; line-height: 1.8; color: var(--text-main); }
.topup-code { text-align: center; font-size: 1.6rem !important; font-weight: 800; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; }

/* النتيجة: دائرة منتصف الملعب بعلامة صح */
.topup-done-mark {
  width: 64px;
  height: 64px;
  margin: 0.4rem auto 0.9rem;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  background: no-repeat center / 30px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232ecc71' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.topup-done-title { text-align: center; font-size: 1.15rem; font-weight: 900; color: #fff; }
.topup-done-balance { margin: 0.35rem 0 1rem; text-align: center; color: var(--text-muted); }
.topup-done-balance b { color: var(--primary-light); font-variant-numeric: tabular-nums; }
.topup-done-list { list-style: none; margin-bottom: 1rem; font-size: 0.88rem; color: var(--text-main); }
.topup-done-list:empty { display: none; }
.topup-done-list li { padding: 0.45rem 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }

.topup-empty { padding: 1.1rem; border-radius: var(--radius-md); border: 1px dashed var(--border-color); text-align: center; }
.topup-empty p { margin-bottom: 0.4rem; color: var(--text-main); }
.topup-empty .btn { margin-top: 0.5rem; }

.topup-notice {
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(243, 156, 18, 0.35);
  background: rgba(243, 156, 18, 0.1);
  color: #f5c06b;
  font-size: 0.86rem;
  line-height: 1.7;
}

/* إعلانات إدارة قرينتا */
.announcements-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.announcement-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.35);
  color: #cfe6f7;
  font-size: 0.85rem;
  line-height: 1.7;
}

.announcement-bar.warning {
  background: rgba(243, 156, 18, 0.12);
  border-color: rgba(243, 156, 18, 0.35);
  color: #f5c06b;
}

.announcement-bar strong { display: block; color: #fff; }
.announcement-bar p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.announcement-bar .btn-chip { flex-shrink: 0; }

.auth-notice {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #f5b7b1;
  font-size: 0.88rem;
  line-height: 1.7;
}

.auth-notice strong {
  display: block;
  color: #fff;
  margin-bottom: 0.25rem;
}

.auth-notice-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.auth-notice-links a {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.hidden { display: none !important; }

/* منع تكبير/تصغير الصفحة باللمس (القرص والنقر المزدوج)؛ التمرير يبقى، والخرائط تدير إيماءاتها بنفسها */
html, body { touch-action: pan-x pan-y; }
