/* 
  RiFresh Odisha Vendor Hub Stylesheet
  Premium Modern Organic Design System
*/

:root {
  --primary-color: #1b5e20; /* Deep Organic Jungle Green */
  --primary-glow: rgba(27, 94, 32, 0.3);
  --accent-color: #2ecc71; /* Fresh Emerald Green */
  --bg-color: #0f171a; /* Sleek Dark Charcoal */
  --card-bg: rgba(22, 34, 38, 0.7);
  --border-color: rgba(30, 45, 50, 0.5);
  --text-primary: #e8f3eb;
  --text-secondary: rgba(232, 243, 235, 0.6);
  --white: #ffffff;
  
  --red: #e74c3c;
  --red-light: rgba(231, 76, 60, 0.15);
  --green: #2ecc71;
  --green-light: rgba(46, 204, 113, 0.15);
  --blue: #3498db;
  --blue-light: rgba(52, 152, 219, 0.15);
  --orange: #e67e22;
  --orange-light: rgba(230, 126, 34, 0.15);
  --purple: #9b59b6;
  --purple-light: rgba(155, 89, 182, 0.15);

  --font-main: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(27, 94, 32, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(46, 204, 113, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Glassmorphic Card Abstraction */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glassmorphic {
  background: rgba(22, 34, 38, 0.55);
}

/* Screen Management */
.screen {
  display: none;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.screen.active {
  display: flex;
}

.screen.full-layout {
  display: none;
  min-height: 100vh;
  align-items: stretch;
  padding: 0;
}

.screen.full-layout.active {
  display: flex;
}

/* 1. Landing Screen Card */
.landing-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.logo-container {
  margin-bottom: 32px;
}

.app-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px var(--accent-color));
  animation: float 4s ease-in-out infinite;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #e8f3eb, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1rem;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Buttons */
.btn {
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #27ae60);
  color: var(--white);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 94, 32, 0.5);
  filter: brightness(1.1);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: var(--transition);
  opacity: 0;
}

.btn-glow:hover::after {
  left: 130%;
  opacity: 1;
  transition: 1s ease;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(46, 204, 113, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.w-100 { width: 100%; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-danger { color: var(--red) !important; }
.text-center { text-align: center; }
.col-span-2 { grid-column: span 2; }
.max-w-600 { max-width: 600px; width: 100%; }

/* Form Controls */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  transition: var(--transition);
  font-family: var(--font-main);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.input-with-icon input {
  padding-left: 44px;
}

/* OTP Flow */
.otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.otp-box {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 12px;
}

/* Modal Back Button */
.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--accent-color);
  transform: translateX(-4px);
}

/* 2. Registration Step Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .col-span-2 {
    grid-column: span 1;
  }
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 16px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

/* File Upload styling */
.file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-upload input[type="file"] {
  display: none;
}

.file-label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-bottom: 0;
}

.file-label:hover {
  border-color: var(--accent-color);
  background: rgba(46, 204, 113, 0.05);
}

/* Authed dashboard layout */
.sidebar {
  width: 280px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.badge-success {
  background: var(--green-light);
  color: var(--green);
}

.badge-danger {
  background: var(--red-light);
  color: var(--red);
}

.badge-warning {
  background: var(--orange-light);
  color: var(--orange);
}

.badge-info {
  background: var(--blue-light);
  color: var(--blue);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition);
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(46, 204, 113, 0.1);
}

.nav-item.active {
  border-left: 3px solid var(--accent-color);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.15) 0%, transparent 100%);
  font-weight: 600;
}

.content-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  min-height: 80px;
}

.top-nav h1 {
  font-size: 1.5rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.user-name {
  font-weight: 500;
}

/* Switch styling for shop status */
.shop-status-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-status-switch span {
  font-size: 0.9rem;
  font-weight: 600;
}

.status-open { color: var(--green); }
.status-closed { color: var(--red); }

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--white);
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Dashboard Tab contents */
.tab-content-container {
  padding: 32px;
  flex-grow: 1;
}

.tab-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-view.active {
  display: block;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i {
  width: 26px;
  height: 26px;
}

.stat-details h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Custom background helper colors */
.bg-green-light { background: var(--green-light); }
.text-green { color: var(--green); }
.bg-blue-light { background: var(--blue-light); }
.text-blue { color: var(--blue); }
.bg-orange-light { background: var(--orange-light); }
.text-orange { color: var(--orange); }
.bg-purple-light { background: var(--purple-light); }
.text-purple { color: var(--purple); }

/* Table Section */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.data-table td {
  font-size: 0.9rem;
}

/* Actions in lists */
.action-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 6px;
  border-radius: 6px;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.action-icon-btn.edit:hover { color: var(--blue); }
.action-icon-btn.delete:hover { color: var(--red); }
.action-icon-btn.approve:hover { color: var(--green); }

/* Product Tab Styling */
.tab-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-box {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.search-box input {
  padding-left: 36px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.product-img-container {
  height: 160px;
  position: relative;
  background-color: rgba(0, 0, 0, 0.2);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-actions-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}

.product-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.product-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.price-box .selling-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
}

.price-box .mrp-price {
  font-size: 0.85rem;
  text-decoration: line-through;
  color: var(--text-secondary);
  margin-left: 6px;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 650px;
  width: 100%;
  position: relative;
  animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 16px;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--accent-color);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Order List Tab Styling */
.filter-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  gap: 6px;
  overflow-x: auto;
}

.filter-btn {
  background: none;
  border: none;
  font-family: var(--font-main);
  padding: 8px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent-color);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-card {
  border-left: 4px solid var(--blue);
}

.order-card.status-pending { border-left-color: var(--orange); }
.order-card.status-accepted { border-left-color: var(--blue); }
.order-card.status-packed { border-left-color: var(--purple); }
.order-card.status-out_for_delivery { border-left-color: var(--orange); }
.order-card.status-delivered { border-left-color: var(--green); }
.order-card.status-cancelled { border-left-color: var(--red); }

.order-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.order-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.order-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.order-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-body-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .order-body-grid {
    grid-template-columns: 1fr;
  }
}

.customer-details h4, .order-items-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 10px;
}

.customer-details p {
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ordered-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.order-actions-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

@media (max-width: 800px) {
  .order-actions-box {
    align-items: flex-start;
  }
}

/* Delivery partner info strip inside order card */
.delivery-partner-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--blue-light);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 600;
  border: 1px solid rgba(52, 152, 219, 0.25);
}

/* Ready for pickup status color */
.order-card.status-ready_for_pickup { border-left-color: #3498db; }

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Hover utils */
.hover-scale {
  transition: var(--transition);
}

.hover-scale:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.hidden { display: none !important; }
