/* =============================================
   CORE VARIABLES AND IMPORTS
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

:root {
  /* Color Palette */
  --primary: #4361ee;
  --primary-light: #4895ef;
  --primary-dark: #3f37c9;
  --accent: #f72585;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #f94144;
  --info: #90e0ef;
  --dark: #212529;
  --gray: #6c757d;
  --light: #f8f9fa;
  --white: #ffffff;
  
  /* Typography */
  --font-main: 'Poppins', sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  
  /* Borders */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.1);
  --shadow-inner: inset 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);

/* =============================================
   QUICK ACTIONS HOVER EFFECTS
============================================= */
a[href*="admin-add-"]:hover, 
a[href*="payment-reminders"]:hover,
a[href*="students"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2) !important;
}
  
  /* Animation */
  --transition-fast: 0.15s ease;
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-toast: 1050;
  --z-tooltip: 1060;
  --z-popover: 1070;
}

/* =============================================
   GLOBAL RESET
============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--dark);
  background: linear-gradient(135deg, #f6f9fc 0%, #eef1f5 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
}

/* =============================================
   ANIMATIONS
============================================= */
@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes fadeBg {
  0% { background-color: rgba(67, 97, 238, 0.05); }
  50% { background-color: rgba(67, 97, 238, 0.1); }
  100% { background-color: rgba(67, 97, 238, 0.05); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* =============================================
   LAYOUT & CONTAINERS
============================================= */
.container {
  width: 100%;
  max-width: 1400px; /* Increased from 1200px for better laptop/desktop experience */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  animation: floatUp 0.6s ease-out;
}

header.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--white);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-xl);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 10px; /* Add gap between elements */
}

main.container {
  animation-delay: 0.1s;
}

section {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: floatUp 0.8s ease-out forwards;
  opacity: 0;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

section:nth-child(2) {
  animation-delay: 0.2s;
}

section:nth-child(3) {
  animation-delay: 0.3s;
}

section:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

section:hover:before {
  transform: scaleX(1);
}

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--dark);
}

h3 {
  font-size: var(--font-size-xl);
  position: relative;
  display: inline-block;
  margin-bottom: var(--spacing-lg);
}

h3:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}

section:hover h3:after {
  width: 100px;
}

p {
  margin-bottom: var(--spacing-md);
}

/* =============================================
   NAVIGATION & LOGO
============================================= */
.logo-area {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-area img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  animation: pulse 2s infinite;
}

.logo-area h1 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  margin: 0;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: var(--font-weight-medium);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

nav a:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: translateX(-100%);
  transition: transform var(--transition);
}

nav a:hover {
  color: var(--primary);
}

nav a:hover:before {
  transform: translateX(0);
}

nav button {
  background: linear-gradient(to right, var(--danger), var(--accent));
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

nav button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

nav button:active {
  transform: translateY(1px);
}

nav button:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease-out;
}

nav button:hover:before {
  transform: translate(-50%, -50%) scale(1);
}

/* =============================================
   FORMS & INPUTS
============================================= */
.form-group {
  margin-bottom: var(--spacing-lg);
  position: relative;
  animation: floatUp 0.6s ease-out forwards;
  opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  color: var(--gray);
  transition: color var(--transition);
}

.form-group:hover label {
  color: var(--primary);
}

input, select, textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  transition: all var(--transition);
  background-color: var(--white);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

input::placeholder {
  color: #bbb;
}

/* Special styling for OTP input */
input[type="text"]#otp {
  letter-spacing: 0.5em;
  text-align: center;
  font-size: 1.5em;
  font-weight: var(--font-weight-bold);
  color: var(--primary);
  background-color: #f7f9fc;
  border: 2px dashed #cfd8dc;
  padding: var(--spacing-lg);
  transition: all var(--transition);
}

input[type="text"]#otp:focus {
  border: 2px solid var(--primary);
  background-color: rgba(67, 97, 238, 0.05);
  animation: fadeBg 2s infinite;
}

/* Password validation feedback */
.password-feedback {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
  transition: all var(--transition);
}

.password-feedback.valid {
  color: var(--success);
  animation: floatUp 0.3s ease-out;
}

.password-feedback.invalid {
  color: var(--danger);
  animation: floatUp 0.3s ease-out;
}

.password-feedback div {
  margin-top: 4px;
  position: relative;
  padding-left: 20px;
}

.password-feedback div:before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
}

/* Payment method styling */
.payment-method-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-sm);
  margin: 15px 0;
}

/* Fallback for older browsers */
@supports not (display: grid) {
  .payment-method-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

.radio-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  transition: all var(--transition);
  background: white;
  position: relative;
  overflow: hidden;
}

.radio-label:hover {
  background-color: rgba(67, 97, 238, 0.05);
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.radio-label input[type="radio"] {
  margin-right: var(--spacing-md);
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

/* Fallback for :has() selector */
.radio-label.checked {
  background-color: rgba(67, 97, 238, 0.1);
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2);
}

.radio-text {
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  z-index: 1;
}

/* Enhanced Button Styles */
button {
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

button:not(:disabled):hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

button:not(:disabled):active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease-out;
}

button:not(:disabled):hover:before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #7209b7 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gray) 0%, #495057 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
  transform: translateY(-1px);
}

.btn-disabled,
button:disabled {
  background: #e9ecef !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  transform: none !important;
  box-shadow: none !important;
}

.btn-upi {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border: none;
  padding: 18px 35px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 15px 0;
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-upi:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(67, 97, 238, 0.4);
  background: linear-gradient(135deg, var(--primary-dark) 0%, #e91e63 100%);
}

/* =============================================
   TABLES
============================================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
  animation: floatUp 0.8s ease-out forwards;
  opacity: 0;
  table-layout: auto; /* Allow columns to size dynamically */
}

thead {
  background: linear-gradient(to right, var(--primary-light), var(--primary));
  color: white;
}

th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: var(--font-weight-medium);
  position: relative;
  white-space: nowrap; /* Prevent header text wrapping */
}

th:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

td {
  padding: var(--spacing-md);
  border-bottom: 1px solid #eee;
  transition: all var(--transition);
  word-wrap: break-word; /* Allow long text to wrap */
  max-width: 300px; /* Prevent extremely wide cells */
}

tbody tr {
  transition: all var(--transition-fast);
}

tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
  transform: scale(1.01);
}

/* Table loader styling */
.loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-style: italic;
  color: var(--gray);
  position: relative;
}

.loading-indicator:before {
  content: "";
  width: 40px;
  height: 40px;
  border: 3px solid rgba(67, 97, 238, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

/* =============================================
   MODALS & OVERLAYS (CONSOLIDATED)
============================================= */
.modal {
  display: none;
  position: fixed;
  z-index: var(--z-modal, 1040);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* Safari support */
  animation: fadeIn 0.3s ease;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  position: relative;
  margin: 20px;
}


.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: var(--spacing-lg);
}

.close-btn {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--gray);
  transition: all var(--transition);
}

.close-btn:hover {
  color: var(--danger);
  transform: rotate(90deg);
}
@media (min-width: 769px) {
  .modal {
    padding: 40px 20px;
    align-items: center;
    justify-content: center;
  }
  
  .modal-content {
    width: 90%;
    max-width: 600px;
    margin: 0;
    position: relative;
    transform: none;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
  }
}
@media (max-width: 768px) {
  .modal {
    padding: 10px;
    align-items: flex-end;
    justify-content: center;
  }
  
  .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 12px 12px 0 0;
    max-height: 95vh;
    position: relative;
    bottom: 0;
  }
  
  .modal.active .modal-content {
    animation: slideUpMobile 0.3s ease;
  }
}
@media (max-width: 480px) {
  .modal {
    padding: 5px;
  }
  
  .modal-content {
    width: 100%;
    border-radius: 8px 8px 0 0;
    max-height: 98vh;
  }
  
  .modal-header {
    padding: 15px 20px;
    text-align: center;
    position: relative;
  }
  
  .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
  }
  
  .close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none;
    cursor: pointer;
  }
  
  .modal-body {
    padding: 0 20px 20px;
    max-height: 70vh;
    overflow-y: auto;
  }
}
/* Fixed animation keyframes */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUpMobile {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Fix for payment method radio buttons - this might be line 1454 issue */
.payment-method-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
}

/* Remove problematic selectors that might cause CSS parsing errors */
.radio-label {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  position: relative;
  overflow: hidden;
}

.radio-label:hover {
  border-color: #4361ee;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  accent-color: #4361ee;
  cursor: pointer;
}

/* Use class-based approach instead of :has() for better browser support */
.radio-label.checked {
  border-color: #4361ee;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(67, 97, 238, 0.05) 100%);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2);
}

.radio-text {
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  z-index: 1;
}

/* Ensure modal overlay works correctly */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
/* =============================================
   UPI PAYMENT STYLES
============================================= */
.amount-breakdown {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
  border: 1px solid #dee2e6;
}

.amount-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.amount-line:last-child {
  border-bottom: none;
}

.amount-line.total-line {
  border-top: 2px solid var(--primary);
  margin-top: 15px;
  padding-top: 15px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.upi-payment-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 25px;
  margin: 20px 0;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.upi-info h4 {
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
}

.zero-amount-notice {
  text-align: center;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
  animation: bounceIn 0.6s ease;
}

.zero-amount-notice .success-icon {
  font-size: 50px;
  margin-bottom: 15px;
  display: block;
  animation: pulse 2s infinite;
}

.upi-account-details {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  border: 2px solid #e9ecef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upi-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.upi-detail-item:hover {
  background-color: #f8f9fa;
  border-radius: 6px;
  margin: 0 -10px;
  padding: 12px 10px;
}

.upi-detail-item:last-child {
  border-bottom: none;
}

.upi-label {
  font-weight: 600;
  color: #495057;
  min-width: 100px;
  font-size: 14px;
}

.upi-value {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #212529;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  flex: 1;
  margin: 0 15px;
  text-align: center;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.copy-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.copy-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.upi-action-section {
  text-align: center;
  padding: 25px;
  margin: 20px 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(247, 37, 133, 0.1) 100%);
  border: 2px solid rgba(67, 97, 238, 0.2);
}

.device-instruction {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 25px 0;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#qrcode {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  border: 3px solid var(--primary);
}

#qrcode canvas, #qrcode img {
  border-radius: 8px;
}

.qr-instruction {
  font-size: 14px;
  color: #6c757d;
  font-style: italic;
  text-align: center;
  margin-top: 10px;
}

.upi-confirmation {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid #e9ecef;
}

.upi-confirmation h5 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

/* =============================================
   SPECIALTY PAGES
============================================= */
.box {
  max-width: 450px;
  margin: 40px auto;
  padding: var(--spacing-xl);
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: floatUp 0.8s ease-out;
}

.box:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.box h2 {
  margin-bottom: var(--spacing-lg);
  color: var(--primary-dark);
}

/* Status Messages */
.status-message, .message {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-medium);
  animation: floatUp 0.4s ease-out;
}

.status-message.success, .message.success {
  background-color: rgba(76, 201, 240, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.status-message.error, .message.error {
  background-color: rgba(249, 65, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

/* Cash Note Styling */
.cash-note {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #ffeaa7;
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
  text-align: center;
}

.cash-note p {
  margin: 0;
  font-size: 14px;
  color: #856404;
  font-weight: 500;
  line-height: 1.5;
}

/* File Input Styling */
.file-input {
  border: 2px dashed #dee2e6;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  border-radius: 10px;
  background: #f8f9fa;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.file-input:hover {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.05);
}

/* Coupon Container */
.coupon-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.coupon-container input {
  flex: 1;
  border-radius: 8px 0 0 8px;
}

.coupon-container button {
  border-radius: 0 8px 8px 0;
  min-width: 100px;
}

/* =============================================
   CHECKBOXES & FORM ELEMENTS
============================================= */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  margin: 15px 0;
  position: relative;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-text {
  font-weight: 500;
  color: #555;
}

.checkbox-container:hover .checkbox-text {
  color: var(--primary);
}

/* OTP Container */
.otp-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.otp-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.otp-timer {
  margin-top: 5px;
  font-size: 0.85rem;
  color: var(--gray);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  padding: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-link:disabled {
  color: var(--gray);
  cursor: not-allowed;
  text-decoration: none;
}

/* Input with button containers */
.input-with-button {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =============================================
   MOBILE NAVIGATION
============================================= */
.mobile-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1000;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* =============================================
   RESPONSIVE TABLE
============================================= */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--spacing-md);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* Fallback for older browsers */
@supports not (display: grid) {
  .info-grid {
    display: block;
  }
  
  .info-item {
    margin-bottom: 10px;
  }
}

.info-item {
  padding: 5px 0;
}

.info-label {
  font-weight: var(--font-weight-medium);
  color: var(--gray);
  margin-right: 10px;
}

/* Feature cards and hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.hero-content {
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.hero-image {
  width: 100%;
  max-width: 400px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.feature-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

/* =============================================
   NOTIFICATION STYLES
============================================= */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: var(--z-toast);
  max-width: 350px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease;
}

.notification.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.notification.error {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.notification.info {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

/* =============================================
   UTILITIES
============================================= */
.alt-action {
  text-align: center;
  margin-top: var(--spacing-lg);
  font-size: var(--font-size-sm);
}

.alt-action a {
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition);
}

.alt-action a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.hidden {
  display: none;
}

.animate {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.fadeIn { animation-name: fadeIn; }
.fadeInUp { animation-name: floatUp; }
.pulse { animation-name: pulse; animation-iteration-count: infinite; animation-duration: 2s; }

.highlight-text {
  font-weight: 600;
  color: var(--primary);
  font-size: 16px;
}

.highlight-box {
  background: rgba(67, 97, 238, 0.1);
  border-left: 4px solid var(--primary);
  padding: 15px;
  border-radius: 0 8px 8px 0;
  margin: 15px 0;
}

footer {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--gray);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xl);
}

/* Override inline style to always show logout button */
#logoutBtn {
  display: block !important;
}

/* ScrollBar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* =============================================
   AOS (Animate on Scroll) Functionality
============================================= */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE BREAKPOINTS
============================================= */
@media (min-width: 500px) {
  .input-with-button,
  .otp-container {
    flex-direction: row;
  }
  
  .input-with-button input,
  .otp-container input {
    flex: 1;
  }
  
  .input-with-button button,
  .otp-container button {
    white-space: nowrap;
  }
  
  .coupon-container {
    flex-direction: row;
  }
  
  .coupon-container input,
  .coupon-container button {
    border-radius: 8px;
    width: auto;
  }
  
  .coupon-container input {
    border-radius: 8px 0 0 8px;
  }
  
  .coupon-container button {
    border-radius: 0 8px 8px 0;
  }
}

@media (min-width: 768px) {
  header.container {
    padding: var(--spacing-md) var(--spacing-xl);
    flex-wrap: nowrap; /* Don't wrap on larger screens */
  }
  
  section {
    padding: var(--spacing-xl) var(--spacing-xl);
  }
  
  .logo-area h1 {
    font-size: 1.8rem;
  }
  
  .hero {
    flex-direction: row;
    text-align: left;
    gap: 40px;
  }
  
  .hero-buttons {
    flex-direction: row;
  }
  
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
    max-height: 95vh;
  }
  
  .upi-payment-section {
    padding: 20px;
    margin: 15px 0;
  }
  
  .amount-breakdown {
    padding: 15px;
  }
  
  .amount-line {
    font-size: 13px;
  }
  
  .upi-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 15px 0;
  }
  
  .upi-value {
    width: 100%;
    margin: 0;
    text-align: center;
  }
  
  .copy-btn {
    align-self: center;
    width: 100px;
  }
  
  .payment-method-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .radio-label {
    padding: 15px;
  }
  
  .btn-upi {
    width: 100%;
    padding: 20px;
    font-size: 16px;
  }
  
  .device-instruction {
    font-size: 16px;
  }
  
  .zero-amount-notice {
    padding: 25px 20px;
  }
  
  .zero-amount-notice .success-icon {
    font-size: 40px;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a, .nav-links button {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }
  
  header.container {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }
  
  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  table {
    display: block;
    overflow-x: auto;
    min-width: 600px;
  }
  
  th, td {
    min-width: 120px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
  }
  
  .info-label {
    font-weight: var(--font-weight-medium);
    color: var(--gray);
  }
}

/* Mobile Portrait Optimization */
@media (max-width: 480px) {
  body {
    font-size: 14px;
    line-height: 1.4;
  }
  
  header.container {
    flex-direction: column;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .logo-area {
    margin-bottom: 10px;
    justify-content: center;
  }
  
  .logo-area h1 {
    font-size: 1.2rem;
  }
  
  .logo-area img {
    width: 30px;
    height: 30px;
  }
  
  .mobile-nav {
    width: 100%;
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001;
  }
  
  .nav-toggle span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a, .nav-links button {
    margin: 15px 0;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  
  .container {
    padding: 0 10px;
    margin: 0 auto 15px;
  }
  
  section {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
  }
  
  section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .info-grid {
    display: block;
  }
  
  .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    min-height: 50px;
  }
  
  .info-item:last-child {
    border-bottom: none;
  }
  
  .info-label {
    font-weight: 600;
    font-size: 13px;
    color: #666;
    flex: 1;
  }
  
  .info-value {
    font-weight: 500;
    text-align: right;
    flex: 1;
    word-break: break-word;
    margin-left: 10px;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
  }
  
  table {
    min-width: 100%;
    font-size: 13px;
    border-collapse: collapse;
  }
  
  th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    min-width: 100px;
    white-space: nowrap;
  }
  
  th:first-child, td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }
  
  .modal {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    max-height: 90vh;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transition: transform 0.3s ease;
  }
  
  .modal.active .modal-content {
    transform: translateY(0);
  }
  
  .modal-header {
    padding: 20px;
    position: relative;
    text-align: center;
  }
  
  .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
  }
  
  .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  
  .modal-body {
    padding: 0 20px 20px;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
  }
  
  input, select, textarea {
    width: 100%;
    padding: 15px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    min-height: 50px;
    box-sizing: border-box;
  }
  
  input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  }
  
  .payment-method-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .radio-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    min-height: 50px;
    transition: all 0.2s ease;
  }
  
  .radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin-right: 15px;
    cursor: pointer;
  }
  
  .radio-text {
    font-size: 16px;
    font-weight: 500;
  }
  
  button, .btn-primary, .btn-secondary {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    min-height: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
  }
  
  .btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
  }
  
  .btn-secondary {
    background: var(--gray);
    color: white;
  }
  
  .btn-danger {
    background: var(--danger);
    color: white;
  }
  
  .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }
  
  .file-input {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    background: #f8f9fa;
  }
  
  .file-input:hover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
  }
  
  .coupon-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .coupon-container input {
    flex: 1;
  }
  
  .coupon-container button {
    width: 100%;
  }
  
  .highlight-text {
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
  }
  
  .highlight-box {
    background: rgba(67, 97, 238, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin: 15px 0;
  }
  
  .notification {
    position: fixed !important;
    top: 20px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 10000;
    padding: 15px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  
  .checkbox-container {
    padding: 10px 0;
    min-height: 44px;
  }
  
  .checkmark {
    height: 24px;
    width: 24px;
    margin-right: 15px;
  }
  
  .checkmark:after {
    left: 8px;
    top: 3px;
    width: 7px;
    height: 12px;
  }
  
  .checkbox-text {
    font-size: 16px;
  }
  
  .modal-content {
    width: 98%;
    margin: 5px;
    border-radius: 8px;
  }
  
  .upi-info h4 {
    font-size: 18px;
  }
  
  .btn-upi {
    padding: 18px;
    font-size: 15px;
  }
  
  .amount-line.total-line {
    font-size: 16px;
  }
  
  .upi-confirmation h5 {
    font-size: 16px;
  }
  
  #qrcode {
    padding: 15px;
  }
  
  .qr-code-container {
    padding: 15px;
  }
}

/* Show mobile table on very small screens */
@media (max-width: 400px) {
  .table-responsive {
    display: none;
  }
  
  .mobile-table {
    display: block;
  }
  
  .container {
    padding: 0 8px;
  }
  
  section {
    padding: 12px;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .info-value {
    text-align: left;
    margin-left: 0;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .nav-links {
    padding: 60px 20px 20px;
  }
  
  .modal-content {
    max-height: 85vh;
  }
  
  section {
    padding: 12px;
  }
}
/* =============================================
   RESPONSIVE TABLE DISPLAY CONTROL
============================================= */

/* Desktop: Show regular table, hide mobile table */
@media (min-width: 769px) {
  .table-responsive {
    display: block !important;
  }
  
  .mobile-table {
    display: none !important;
  }
}

/* Mobile: Hide regular table, show mobile table */
@media (max-width: 768px) {
  .table-responsive {
    display: none !important;
  }
  
  .mobile-table {
    display: block !important;
  }
}

/* Mobile table styles */
.mobile-table {
  display: none; /* Hidden by default */
}

.month-card {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
}

.month-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.month-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
}

.month-status {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #666;
}

.month-status.paid {
  background: #d4edda;
  color: #155724;
}

.month-status.pending {
  background: #fff3cd;
  color: #856404;
}

.month-status.unpaid {
  background: #f8d7da;
  color: #721c24;
}

.month-action {
  text-align: center;
}

.month-action button {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}
/* Payment Reminders Page Styles */
.reminder-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    min-width: 200px;
}

.action-section {
    display: flex;
    gap: 10px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #007bff;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.students-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: none;
}

.students-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.students-table tbody tr:hover {
    background-color: #f8f9fa;
}

.student-checkbox {
    cursor: pointer;
}

.student-info {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.student-email {
    font-size: 12px;
    color: #666;
}

.class-info {
    display: flex;
    flex-direction: column;
}

.class-name {
    font-weight: 500;
    color: #333;
}

.board-name {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.payment-status {
    display: flex;
    flex-direction: column;
}

.last-payment {
    color: #333;
    font-weight: 500;
}

.payment-date {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.pending-months {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.total-due {
    font-weight: 600;
    color: #e74c3c;
    font-size: 16px;
}

.btn-remind {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-remind:hover {
    background: #138496;
    transform: translateY(-1px);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner i {
    font-size: 24px;
    margin-bottom: 10px;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.no-data h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Email Preview Modal */
.email-preview {
    max-height: 500px;
    overflow-y: auto;
}

.email-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.email-body {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reminder-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section,
    .action-section {
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .students-table {
        font-size: 14px;
    }
    
    .students-table th,
    .students-table td {
        padding: 10px 8px;
    }
}

/* Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

/* Success/Error Message Styles */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Enhanced navbar styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255,255,255,0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }
    
    .bar {
        width: 25px;
        height: 3px;
        background: white;
        margin: 3px 0;
        transition: 0.3s;
    }
}
/* =============================================
   RESPONSIVE TABLE - MOBILE SCROLLING
============================================= */

/* Remove the mobile-table display logic and keep table scrollable */
@media (max-width: 768px) {
  /* Keep the table visible, just make it scrollable */
  .table-responsive {
    display: block !important; /* Ensure it's not hidden */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    margin: 0 -15px;
    padding: 0 15px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  }
  
  /* Hide mobile-table completely to avoid conflicts */
  .mobile-table {
    display: none !important;
  }
  
  /* Make table scrollable with minimum width */
  .responsive-table {
    min-width: 700px;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  
  /* Optimize table cells for mobile */
  .responsive-table th,
  .responsive-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
  }
  
  /* Make first column sticky for better UX */
  .responsive-table th:first-child,
  .responsive-table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
  }
  
  .responsive-table thead th:first-child {
    background: var(--primary);
    color: white;
  }
  
  /* Compress action buttons */
  .btn-edit {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  /* Add scroll indicator */
  .table-responsive::after {
    content: "← Swipe to see more columns →";
    display: block;
    text-align: center;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .table-responsive {
    margin: 0 -10px;
    padding: 0 10px;
  }
  
  .responsive-table {
    min-width: 600px;
    font-size: 13px;
  }
  
  .responsive-table th,
  .responsive-table td {
    padding: 6px 8px;
  }
}
/* Add to your styles.css */
.mobile-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.country-code-select {
  width: 120px;
  padding: 12px 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}

.mobile-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.mobile-hint {
  color: #666;
  font-size: 0.85rem;
  margin-top: 5px;
}

@media (max-width: 768px) {
  .mobile-input-container {
    flex-direction: column;
    gap: 5px;
  }
  
  .country-code-select {
    width: 100%;
  }
}
/* Mobile input styling with specific width ratios */
.mobile-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.country-code-select {
    width: 25%; /* Country code takes 25% of container */
    max-width: 90px; /* But never more than 90px */
    min-width: 70px; /* And never less than 70px */
    padding: 8px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    flex-shrink: 0;
}

.mobile-input {
    width: 75%; /* Mobile input takes 75% of container */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex-grow: 1;
}

.mobile-hint {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .country-code-select {
        width: 30%;
        max-width: 80px;
        min-width: 60px;
    }
    
    .mobile-input {
        width: 70%;
    }
}
/* Mobile input styling */
.mobile-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mobile-input-container select {
    width: 25%;
    max-width: 90px;
    padding: 8px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mobile-input-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .mobile-input-container {
        flex-direction: column;
        gap: 5px;
    }
    
    .mobile-input-container select {
        width: 100%;
        max-width: none;
    }
}
/* Add to your main CSS file */
.mobile-upi-options {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.upi-option-buttons {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.upi-option-buttons button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.qr-code-section {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 2px dashed #007bff;
  text-align: center;
}

.qr-placeholder {
  display: inline-block;
  padding: 10px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#qrCanvas {
  border: 1px solid #ccc;
  border-radius: 4px;
}

.upi-info {
  background: #e9ecef;
  padding: 10px;
  border-radius: 6px;
  margin: 10px 0;
}

.upi-instructions {
  margin-top: 15px;
}

.upi-instructions ol {
  text-align: left;
  padding-left: 20px;
}

.upi-instructions li {
  margin: 5px 0;
  line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .upi-option-buttons {
    flex-direction: column;
  }
  
  .upi-option-buttons button {
    width: 100%;
    margin: 5px 0;
  }
}
/* Mobile UPI Buttons */
.mobile-upi-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.btn-upi-qr {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-upi-qr:hover {
  background: linear-gradient(135deg, #45a049, #4caf50);
  transform: translateY(-2px);
}

/* Mobile QR Container */
.mobile-qr-container {
  margin-top: 20px;
  animation: slideDown 0.3s ease-out;
}

.mobile-qr-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px dashed #4caf50;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mobile-qr-content h5 {
  color: #2e7d32;
  margin-bottom: 15px;
}

.qr-code-container {
  margin: 15px 0;
}

#qrCanvas {
  border: 2px solid #ddd;
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

.qr-instruction {
  margin: 10px 0;
  font-size: 14px;
  color: #666;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   PDF RECEIPTS SECTION STYLES
============================================= */
.receipts-section {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow);
  border: 1px solid #e9ecef;
}

.receipts-section h3 {
  color: var(--primary);
  margin-bottom: var(--spacing-lg);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
}

.receipts-container {
  min-height: 150px;
}

.receipt-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.receipt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.receipt-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.receipt-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--dark);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.receipt-badge {
  background: linear-gradient(135deg, var(--success) 0%, #4cc9f0 100%);
  color: var(--white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-xl);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.receipt-detail {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.detail-label {
  color: var(--gray);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: var(--dark);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
}

.amount-highlight {
  color: var(--primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.receipt-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
}

.download-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.receipt-notes {
  background: rgba(76, 201, 240, 0.1);
  border-left: 3px solid var(--info);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-top: var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--dark);
  font-style: italic;
}

.no-receipts {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--gray);
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border: 2px dashed #dee2e6;
}

.no-receipts-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.loading-message {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--gray);
  font-style: italic;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .mobile-qr-content {
    padding: 15px;
  }
  
  #qrCanvas {
    max-width: 200px;
  }

  .receipt-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .receipt-details {
    grid-template-columns: 1fr;
  }

  .receipt-actions {
    width: 100%;
    justify-content: center;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

