/* AngryDeals - Main Stylesheet | angrydeals.in */
/* Modern White & Orange Theme | Mobile First */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --primary: #FF6B00;
  --primary-dark: #E55A00;
  --primary-light: #FF8C38;
  --primary-ultra-light: #FFF4EC;
  --accent: #FF3D00;
  --dark: #1A1A2E;
  --dark-2: #2D2D44;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;
  --white: #FFFFFF;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --sidebar-w: 260px;
  --header-h: 64px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --shadow-orange: 0 4px 20px rgba(255,107,0,.25);
  --transition: all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ─── LAYOUT ─── */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex; flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-family: 'Outfit', sans-serif;
  font-weight: 800; color: white;
}
.sidebar-logo .logo-text { color: white; font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.1rem; }
.sidebar-logo .logo-text span { color: var(--primary); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-group-label {
  padding: 14px 20px 6px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.35);
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,.65);
  font-size: .875rem; font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active {
  color: white;
  background: rgba(255,107,0,.18);
  border-right: 3px solid var(--primary);
}
.nav-item.active .nav-icon { color: var(--primary); }
.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white; font-size: .65rem;
  padding: 2px 7px; border-radius: 20px; font-weight: 700;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: .85rem;
}
.sidebar-user .user-info .name { color: white; font-size: .85rem; font-weight: 600; }
.sidebar-user .user-info .role { color: rgba(255,255,255,.4); font-size: .7rem; text-transform: capitalize; }

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Top Header */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  gap: 16px;
}
.topbar-menu-btn {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 6px;
  color: var(--gray-700); font-size: 1.3rem;
}
.topbar-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--gray-900); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--gray-200, #e5e7eb);
  background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  color: var(--gray-700); font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn .badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%;
  border: 2px solid white;
}

.page-content { flex: 1; padding: 24px; }

/* ─── CARDS ─── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.card-header {
  padding: 18px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ─── STAT CARDS ─── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.stat-card.orange { background: var(--primary); border-color: var(--primary); }
.stat-card.orange .stat-value,
.stat-card.orange .stat-label { color: white; }
.stat-card.orange .stat-icon { background: rgba(255,255,255,.2); color: white; }
.stat-icon {
  width: 40px; height: 40px;
  background: var(--primary-ultra-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--primary);
  margin-bottom: 12px;
}
.stat-value { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
.stat-label { font-size: .75rem; color: var(--gray-500); font-weight: 500; margin-top: 2px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .875rem; font-weight: 600;
  transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: var(--shadow-orange); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; color: white; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #16a34a; color: white; }
.btn-light { background: var(--gray-100); color: var(--gray-700); }
.btn-light:hover:not(:disabled) { background: var(--gray-200, #e5e7eb); }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label span.required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: .875rem;
  color: var(--gray-900); background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,0,.12); }
.form-control::placeholder { color: var(--gray-500); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .75rem; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* File Upload */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 28px 20px; text-align: center;
  cursor: pointer; transition: var(--transition);
  background: var(--gray-50);
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-ultra-light);
}
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .upload-icon { font-size: 2.2rem; color: var(--primary); margin-bottom: 8px; }
.upload-zone p { font-size: .85rem; color: var(--gray-500); }
.upload-zone strong { color: var(--primary); }
.upload-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; background: white;
  border: 1.5px solid var(--gray-200, #e5e7eb);
  border-radius: 10px; margin-top: 10px;
}
.upload-preview img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.upload-preview .preview-info { flex: 1; font-size: .8rem; }
.upload-preview .preview-name { font-weight: 600; color: var(--gray-900); }
.upload-preview .preview-size { color: var(--gray-500); }

/* ─── TABLE ─── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead tr { border-bottom: 2px solid var(--gray-100); }
thead th { padding: 12px 16px; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); font-weight: 700; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--gray-100); transition: var(--transition); }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 14px 16px; color: var(--gray-700); vertical-align: middle; }
tbody td:last-child { text-align: right; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.badge-success { background: #DCFCE7; color: #15803D; }
.badge-warning { background: #FEF9C3; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #B91C1C; }
.badge-info    { background: #DBEAFE; color: #1D4ED8; }
.badge-secondary { background: var(--gray-100); color: var(--gray-700); }
.badge-orange  { background: var(--primary-ultra-light); color: var(--primary); }

/* ─── ALERTS ─── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .875rem;
  margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-danger  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ─── POINTS DISPLAY ─── */
.points-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-ultra-light);
  color: var(--primary);
  padding: 6px 14px; border-radius: 30px;
  font-weight: 800; font-family: 'Outfit', sans-serif;
  font-size: .95rem;
}
.points-big {
  font-family: 'Outfit', sans-serif; font-size: 2.5rem;
  font-weight: 900; color: var(--primary);
  line-height: 1;
}

/* ─── PRODUCT CARDS ─── */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card {
  background: white; border-radius: var(--radius);
  border: 1.5px solid var(--gray-100);
  overflow: hidden; transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); transform: translateY(-2px); }
.product-card .product-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block;
  background: var(--gray-100);
}
.product-card .product-body { padding: 12px; }
.product-card .product-name { font-size: .85rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; line-height: 1.3; }
.product-card .product-points {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  color: var(--primary); font-size: .95rem;
}
.product-card .product-actions { display: flex; gap: 6px; margin-top: 10px; }
.product-card .product-actions .btn { flex: 1; font-size: .75rem; padding: 8px 6px; }

/* ─── CLAIM CARD ─── */
.claim-card {
  background: white; border: 1.5px solid var(--gray-100);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; transition: var(--transition);
}
.claim-card.pending { border-left: 4px solid var(--warning); }
.claim-card.approved { border-left: 4px solid var(--success); }
.claim-card.rejected { border-left: 4px solid var(--danger); }

/* ─── LEDGER ─── */
.ledger-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.ledger-item:last-child { border-bottom: none; }
.ledger-dot {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.ledger-dot.credit { background: #F0FDF4; color: var(--success); }
.ledger-dot.debit  { background: #FEF2F2; color: var(--danger); }
.ledger-info { flex: 1; }
.ledger-desc { font-size: .85rem; font-weight: 600; color: var(--gray-900); }
.ledger-date { font-size: .73rem; color: var(--gray-500); }
.ledger-pts  { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1rem; }
.ledger-pts.credit { color: var(--success); }
.ledger-pts.debit  { color: var(--danger); }

/* ─── MODAL ─── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-overlay.active { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: white; width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .3s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.modal-header {
  padding: 20px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-100); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-500);
}
.modal-body { padding: 20px; }
.modal-footer { padding: 0 20px 20px; display: flex; gap: 10px; }

/* ─── TABS ─── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-100); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 12px 18px; cursor: pointer;
  font-size: .875rem; font-weight: 600;
  color: var(--gray-500); border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap;
  transition: var(--transition);
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .4; }
.empty-state h4 { font-size: .95rem; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: .82rem; }

/* ─── AVATAR ─── */
.avatar-circle {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: white;
  background: var(--primary);
}

/* ─── LOADER ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,107,0,.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

/* ─── PAGE HEADER ─── */
.page-header { margin-bottom: 22px; }
.page-header h2 { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); }
.page-header p { font-size: .85rem; color: var(--gray-500); margin-top: 3px; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }

/* ─── POINTS TYPE CARD ─── */
.pts-type-card {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1.5px solid var(--gray-100);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 10px;
}
.pts-type-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.pts-type-info { flex: 1; }
.pts-type-name { font-weight: 700; font-size: .9rem; color: var(--gray-900); }
.pts-type-pts { font-size: .8rem; color: var(--gray-500); }
.pts-type-actions { display: flex; gap: 6px; }

/* ─── LOGIN ─── */
.login-page {
  min-height: 100vh; background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: white; border-radius: var(--radius-lg);
  padding: 36px 28px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo .logo-box {
  width: 60px; height: 60px; background: var(--primary);
  border-radius: 16px; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 12px;
  font-size: 28px; font-family: 'Outfit', sans-serif;
  font-weight: 900; color: white;
}
.login-logo h1 { font-size: 1.5rem; color: var(--gray-900); }
.login-logo h1 span { color: var(--primary); }
.login-logo p { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }

/* ─── RESPONSIVE ─── */
@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .page-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity:0; } to { transform: translateY(0); opacity:1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.fade-in { animation: fadeIn .4s ease; }
.slide-up { animation: slideUp .4s ease; }

/* ─── UTILS ─── */
.text-orange { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-muted   { color: var(--gray-500) !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.divider { border: none; border-top: 1px solid var(--gray-100); margin: 16px 0; }
.section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); margin-bottom: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
