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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --dark: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 14px;
}

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

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}
.navbar .logo { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.navbar .logo span { color: var(--primary-light); }
.navbar nav ul { display: flex; gap: 28px; align-items: center; }
.navbar nav a { color: #cbd5e1; font-weight: 500; font-size: 15px; }
.navbar nav a:hover { color: #fff; }
.btn-nav { background: var(--primary); color: #fff !important; padding: 9px 20px; border-radius: 8px; font-weight: 600 !important; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 100%);
  color: #fff;
  padding: 80px 24px 100px;
  text-align: center;
}
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(90deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: #cbd5e1; max-width: 560px; margin: 0 auto 36px; }

.shortener-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
}
.shortener-box input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}
.shortener-box input:focus { outline: none; border-color: var(--primary); }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; text-align: center; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* SECTIONS */
.section { padding: 70px 24px; width: 100%; }
.section-title { text-align: center; font-size: 32px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; font-size: 16px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.feature-icon { width: 46px; height: 46px; border-radius: 10px; background: rgba(99,102,241,0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; color: var(--dark); }
.feature-card p { font-size: 14px; color: var(--muted); }

/* AUTH */
.auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(15,23,42,0.08);
  border: 1px solid var(--border);
}
.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; color: var(--dark); }
.auth-card p.sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--primary); }

.auth-footer { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

.alert { padding: 12px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* DASHBOARD LAYOUT */
.dash-layout {
  display: flex;
  min-height: calc(100vh - 68px);
  width: 100%;
}

.sidebar {
  width: 230px;
  background: var(--dark);
  flex-shrink: 0;
  padding: 24px 0;
}
.sidebar a {
  display: block;
  padding: 12px 26px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-left: 3px solid var(--primary-light);
}

.dash-main {
  flex: 1;
  padding: 32px;
  background: var(--bg);
  min-width: 0; /* IMPORTANT: prevents blowout of flex content */
  overflow: hidden;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-header h1 { font-size: 24px; color: var(--dark); font-weight: 800; }

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.stat-card .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-card .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
  overflow: hidden;
}

/* BADGES */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-free { background: #f1f5f9; color: #64748b; }
.badge-pro { background: linear-gradient(90deg, var(--primary), var(--accent)); color: #fff; }

/* PREVIEW THUMBNAILS - STRICT SIZE CONSTRAINTS */
.og-thumb {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 8px;
  object-fit: cover;
  background: var(--border);
  display: block;
}

/* TABLE WRAPPER AND TABLE STYLES */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.desktop-only-table {
  display: block;
}
.mobile-only-cards {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 650px;
}

table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  background: #fafafa;
  white-space: nowrap;
}

table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover { background: #f8fafc; }

/* Set precise column widths on desktop */
table th:nth-child(1), table td:nth-child(1) { width: 75px; } /* Preview */
table th:nth-child(2), table td:nth-child(2) { width: 230px; } /* Short URL */
table th:nth-child(3), table td:nth-child(3) { width: auto; } /* Destination (takes remaining width) */
table th:nth-child(4), table td:nth-child(4) { width: 85px; text-align: center; } /* Clicks */
table th:nth-child(5), table td:nth-child(5) { width: 120px; } /* Created */
table th:nth-child(6), table td:nth-child(6) { width: 210px; text-align: right; } /* Action Buttons */

/* Mobile headers hidden on Desktop */
.mobile-row-header,
.mobile-label {
  display: none;
}

.short-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.short-link-row code {
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--primary-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.copy-btn {
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.2s;
}
.copy-btn:hover {
  background: #f1f5f9;
}

/* ANALYTICS CHARTS GRID */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.chart-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
}
.chart-wrapper-large {
  position: relative;
  width: 100%;
  height: 320px;
}
.chart-wrapper canvas,
.chart-wrapper-large canvas {
  width: 100% !important;
  height: 100% !important;
}

/* SEARCH BAR STYLES */
.search-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}
.search-input-field {
  width: 100%;
  padding: 10px 38px 10px 40px !important;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #ffffff;
}
.search-input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  display: none;
  padding: 2px 6px;
  border-radius: 50%;
}
.search-clear-btn:hover {
  background: #e2e8f0;
  color: var(--dark);
}
.search-count-badge {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
}

/* DATE BREAKDOWN TABLE STYLES */
.progress-bar-bg {
  background: #e2e8f0;
  border-radius: 6px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  display: inline-block;
  margin-top: 4px;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}


/* CALENDAR WIDGET STYLES */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.calendar-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.current-month-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
  min-width: 120px;
  text-align: center;
}
.date-picker-inline {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--dark);
  background: #fff;
}
.date-picker-inline:focus {
  outline: none;
  border-color: var(--primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-day-name {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  background: #f1f5f9;
  border-radius: 6px;
}
.cal-cell {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cal-cell:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.cal-cell.selected-cal-day {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
}
.cal-empty {
  background: transparent;
  border: none;
  cursor: default;
}
.cal-empty:hover {
  transform: none;
  box-shadow: none;
}
.cal-today {
  border-color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.03);
}
.cal-today .cal-day-num {
  color: var(--primary);
  font-weight: 800;
}
.cal-day-num {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
}
.cal-click-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}
.cal-no-clicks {
  font-size: 11px;
  color: #cbd5e1;
  text-align: right;
}
.cal-cell.cal-has-clicks {
  border-color: rgba(99, 102, 241, 0.35);
}
.selected-date-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 16px;
}
.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .calendar-grid {
    gap: 4px;
  }
  .cal-cell {
    padding: 6px 4px;
    min-height: 56px;
  }
  .cal-day-num {
    font-size: 12px;
  }
  .cal-click-badge {
    font-size: 9.5px;
    padding: 2px 3px;
  }
}

.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 780px; margin: 0 auto; }
.price-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.price-card.highlight { border-color: var(--primary); box-shadow: 0 12px 40px rgba(99,102,241,0.15); position: relative; }
.price-card.highlight::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}
.price-card h3 { font-size: 18px; margin-bottom: 8px; }
.price-card .amount { font-size: 42px; font-weight: 800; color: var(--dark); margin: 12px 0; }
.price-card .amount span { font-size: 15px; color: var(--muted); font-weight: 500; }
.price-card ul { text-align: left; margin: 24px 0; }
.price-card ul li { padding: 8px 0; font-size: 14px; color: var(--text); border-bottom: 1px solid #f1f5f9; }

.plan-duration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.coupon-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }

/* PAYMENT OPTIONS */
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.pay-tab {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}
.pay-tab.active { border-color: var(--primary); background: rgba(99,102,241,0.05); }
.qr-box { text-align: center; padding: 24px; }
#qrcode-canvas { margin: 0 auto; max-width: 100%; }
#qrcode-canvas img,
#qrcode-canvas canvas { max-width: 100%; height: auto; }

/* STYLISH UPI MOBILE BUTTON */
.btn-upi-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.btn-upi-mobile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
}

.btn-upi-mobile:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-upi-mobile svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-upi-mobile:hover svg {
  transform: scale(1.1);
}

.btn-upi-mobile small {
  font-size: 12px;
  opacity: 0.95;
  font-weight: 500;
}

.btn-upi-mobile * {
  pointer-events: none;
}

/* FLOATING WHATSAPP BUTTON */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  border-radius: 50px;
  padding: 10px 18px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  color: #ffffff !important;
}

.whatsapp-float svg {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

@media (max-width: 600px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px;
  }
  .whatsapp-text {
    font-size: 13px;
  }
}

/* FOOTER */
footer { background: var(--dark); color: #94a3b8; padding: 32px 24px; text-align: center; font-size: 14px; }

/* ════════════════════════════════════════
   RESPONSIVE DESIGN (max-width: 1024px)
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  .container { padding: 0 16px; }
  .navbar { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .navbar nav ul { gap: 14px; flex-wrap: wrap; }
  .navbar nav a { font-size: 13px; }
  .btn-nav { padding: 7px 14px; font-size: 13px; }

  .hero { padding: 50px 16px 60px; }
  .hero h1 { font-size: 28px; line-height: 1.3; }
  .hero p { font-size: 15px; }
  .shortener-box { padding: 18px; }

  .section { padding: 44px 16px; }
  .section-title { font-size: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pay-options { grid-template-columns: 1fr; }

  /* Dashboard mobile view: sidebar becomes horizontal premium menu */
  .dash-layout {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  
  .sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px;
    gap: 8px;
    background: var(--dark);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  
  .sidebar a {
    color: #cbd5e1;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    border-left: none;
    border-bottom: none;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .sidebar a:hover,
  .sidebar a.active {
    color: #ffffff;
    background: var(--primary);
    border-left: none;
    border-bottom: none;
  }

  .dash-main {
    padding: 20px 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .dash-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    gap: 12px;
  }
  .dash-header h1 { font-size: 20px; }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 14px;
    min-width: 0;
  }
  .stat-card .label { font-size: 12px; }
  .stat-card .value {
    font-size: 18px;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .card {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .analytics-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .hero { padding: 40px 16px 50px; }
  .hero h1 { font-size: 24px; line-height: 1.3; }
  .hero p { font-size: 14px; margin-bottom: 24px; }
  .shortener-box { padding: 16px; }

  .section { padding: 40px 16px; }
  .section-title { font-size: 22px; }
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .pay-options { grid-template-columns: 1fr; gap: 12px; }
  .coupon-form-grid { grid-template-columns: 1fr; gap: 12px; }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dash-header h1 { font-size: 19px; }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 14px;
    padding: 10px 12px;
  }

  .short-link-row {
    max-width: 100%;
    overflow: hidden;
  }
  .short-link-row code {
    max-width: 140px;
    font-size: 11.5px;
  }

  /* Mobile 5-Row Cards Layout Matching Diagram */
  .desktop-only-table {
    display: none !important;
  }
  .mobile-only-cards {
    display: block !important;
  }

  .m-link-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
  }
  .m-link-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
  }

  .m-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
  }

  .m-row:last-child {
    border-bottom: none;
  }

  .m-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
  }

  .m-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .m-val {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
  }

  .m-dest-val {
    word-break: break-all;
    font-size: 13.5px;
    color: var(--text);
  }

  .m-row-analytics {
    background: #fafafa;
    text-align: center;
    padding: 14px 16px;
  }

  .m-action-btns {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .btn-m-edit {
    display: inline-block;
    flex: 1;
    text-align: center;
    background: #ffffff;
    border: 1.5px solid var(--border);
    color: var(--text) !important;
    padding: 10px 12px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .btn-m-edit:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
  }
  .btn-m-analytics {
    display: inline-block;
    flex: 1.2;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff !important;
    padding: 10px 12px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    transition: all 0.2s ease;
    box-sizing: border-box;
  }
  .btn-m-analytics:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 12px 10px;
  }
  .stat-card .label { font-size: 11px; }
  .stat-card .value { font-size: 16px; }

  .plan-duration-grid { grid-template-columns: 1fr; }

  .btn {
    padding: 11px 18px;
    font-size: 14px;
  }
  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
  .btn-upi-mobile {
    width: 100%;
    padding: 13px 16px;
    font-size: 14px;
  }
}
