/* Flowers Cart Admin Dashboard Styles */
:root {
  --fc-primary: #d9534f;
  --fc-primary-hover: #c9302c;
  --fc-gold: #c29958;
  --fc-gold-hover: #b08542;
  --fc-dark: #22252a;
  --fc-light: #f8f9fa;
  --fc-bg: #f5f6fa;
  --fc-card-bg: #ffffff;
  --fc-border: #e9ecef;
  --fc-text: #2d3436;
  --fc-muted: #636e72;
  --fc-success: #28a745;
  --fc-warning: #ffc107;
  --fc-danger: #dc3545;
  --fc-radius: 12px;
  --fc-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--fc-bg);
  color: var(--fc-text);
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
}

/* Navbar */
.admin-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--fc-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--fc-dark);
  text-decoration: none;
}

.brand-badge img {
  height: 38px;
  width: auto;
}

.brand-badge span.portal-tag {
  font-size: 0.75rem;
  background: #fff0f0;
  color: var(--fc-primary);
  border: 1px solid #ffd1d1;
  border-radius: 20px;
  padding: 2px 10px;
  font-weight: 700;
}

/* User & Actions in Nav */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pill {
  background: #f1f3f5;
  border-radius: 30px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fc-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-pill i {
  color: var(--fc-gold);
}

/* Main Container */
.admin-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Tab Navigation */
.admin-tabs {
  background: #ffffff;
  border-radius: var(--fc-radius);
  padding: 0.5rem;
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  box-shadow: var(--fc-shadow);
  border: 1px solid var(--fc-border);
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fc-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: #f8f9fa;
  color: var(--fc-dark);
}

.tab-btn.active {
  background: var(--fc-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 83, 79, 0.25);
}

/* Admin Cards */
.admin-card {
  background: #ffffff;
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
  box-shadow: var(--fc-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--fc-border);
}

.card-header-flex h4 {
  margin: 0;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn-fc-primary {
  background: var(--fc-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-fc-primary:hover {
  background: var(--fc-primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 83, 79, 0.2);
}

.btn-fc-gold {
  background: var(--fc-gold);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-fc-gold:hover {
  background: var(--fc-gold-hover);
  color: #ffffff;
}

.btn-fc-outline {
  background: transparent;
  color: var(--fc-dark);
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-fc-outline:hover {
  background: #f1f3f5;
  color: var(--fc-dark);
}

/* Filters & Search */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-input-wrap i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-muted);
}

.search-input-wrap input {
  padding-right: 40px;
}

/* Table */
.fc-table-responsive {
  overflow-x: auto;
}

.fc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.fc-table th {
  background: #f8f9fa;
  color: var(--fc-muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 14px;
  border-bottom: 2px solid var(--fc-border);
  white-space: nowrap;
}

.fc-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--fc-border);
  font-size: 0.9rem;
}

.fc-table tr:hover td {
  background: #fdfaf6;
}

/* Product thumbnail */
.product-admin-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Badges */
.badge-custom {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

.badge-new {
  background: #e6fcf5;
  color: #0ca678;
  border: 1px solid #c3fae8;
}

.badge-discount {
  background: #fff5f5;
  color: #fa5252;
  border: 1px solid #ffe3e3;
}

.badge-status-active {
  background: #ebfbee;
  color: #2f9e44;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.badge-status-inactive {
  background: #f1f3f5;
  color: #868e96;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* Switch toggle */
.form-check-input {
  cursor: pointer;
  width: 2.4em;
  height: 1.25em;
}

/* Category & Hero Preview Cards */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.preview-card {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.preview-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8fafc;
}

.preview-card-body {
  padding: 1.1rem;
}

.preview-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.preview-card-sub {
  color: var(--fc-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.preview-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Image Upload Widget */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
}

.upload-dropzone:hover {
  border-color: var(--fc-primary);
  background: #fff5f5;
}

.upload-preview-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.upload-preview-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--fc-border);
}

.upload-status {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Login Page Styling */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--fc-border);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  max-height: 52px;
}

.login-title {
  font-weight: 800;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 0.25rem;
  color: var(--fc-dark);
}

.login-desc {
  font-size: 0.9rem;
  color: var(--fc-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #d2d6dc;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-control:focus, .form-select:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}

/* Modals */
.modal-content {
  border-radius: var(--fc-radius);
  border: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid var(--fc-border);
  padding: 1.25rem 1.5rem;
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--fc-border);
  padding: 1rem 1.5rem;
}

/* Stats Counter */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f5;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ============================================================ */
/* Responsive Styles (All Screens: Mobile, Tablets, Desktops)  */
/* ============================================================ */

/* Smooth scrollbar styling */
.admin-tabs::-webkit-scrollbar,
.fc-table-responsive::-webkit-scrollbar {
  height: 5px;
}
.admin-tabs::-webkit-scrollbar-thumb,
.fc-table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.admin-tabs::-webkit-scrollbar-track,
.fc-table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

/* Touch Friendly Buttons */
.btn-edit-product,
.btn-delete-product,
.btn-edit-slide,
.btn-delete-slide {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-scroll-hint {
  font-size: 0.8rem;
  background: #eff6ff;
  border: 1px dashed #bfdbfe;
  color: #1e40af;
  padding: 6px 12px;
  border-radius: 8px;
}

/* Medium Devices (Tablets & Desktops up to 991px) */
@media (max-width: 991.98px) {
  .admin-navbar {
    padding: 0.75rem 1rem;
  }

  .admin-container {
    padding: 1.1rem;
  }

  .tab-btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
  }

  .admin-card {
    padding: 1.25rem;
  }

  .preview-card-img {
    height: 160px;
  }
}

/* Small Devices (Landscape Phones & Small Tablets up to 767px) */
@media (max-width: 767.98px) {
  .admin-container {
    padding: 0.85rem 0.65rem;
  }

  /* Prevent auto-zoom on iOS inputs */
  .form-control,
  .form-select {
    font-size: 16px;
  }

  .card-header-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .card-header-flex > div:last-child {
    width: 100%;
  }

  .card-header-flex > div:last-child .btn {
    width: 100%;
    justify-content: center;
  }

  .filter-bar {
    flex-direction: column;
    gap: 8px;
  }

  .filter-bar > div {
    width: 100% !important;
  }

  .admin-tabs {
    padding: 0.4rem;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header,
  .modal-footer {
    padding: 0.85rem 1rem;
  }

  .fc-table th,
  .fc-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .product-admin-thumb {
    width: 44px;
    height: 44px;
  }
}

/* Extra Small Devices (Phones up to 480px) */
@media (max-width: 479.98px) {
  .admin-navbar {
    padding: 0.65rem 0.75rem;
  }

  .brand-badge img {
    height: 32px;
  }

  .brand-badge {
    font-size: 1.05rem;
  }

  .login-wrapper {
    padding: 0.75rem;
  }

  .login-card {
    padding: 1.5rem 1.25rem;
    border-radius: 12px;
  }

  .login-title {
    font-size: 1.25rem;
  }

  .upload-preview-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .upload-preview-img {
    width: 100%;
    height: 120px;
  }

  .upload-preview-container > div {
    width: 100%;
  }
}

/* Large Screens (1440px and above) */
@media (min-width: 1440px) {
  .admin-container {
    max-width: 1400px;
    padding: 2rem 1.5rem;
  }

  .preview-card-img {
    height: 200px;
  }
}


