/* VeroPoint Brand Colors */
:root {
  --primary: #7ed957;
  --primary-light: #a8e88a;
  --primary-medium: #6bc947;
  --primary-dark: #4fa832;
  --accent-purple: #8b5cf6;
  --accent-magenta: #c026d3;
  --bg-light: #fafafa;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;
}

/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-medium) 50%, var(--primary-dark) 100%);
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.header-logo {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.header p {
  font-size: 1.1rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Logo in titles */
.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.title-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Access Cards */
.access-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.access-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.access-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-purple));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.access-card:hover::before {
  transform: scaleX(1);
}

.access-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(126, 217, 87, 0.2);
  border-color: var(--primary);
}

.card-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.access-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.access-card p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-medium));
  color: white;
  box-shadow: 0 4px 15px rgba(126, 217, 87, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(126, 217, 87, 0.4);
  background: linear-gradient(135deg, var(--primary-medium), var(--primary-dark));
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  width: auto;
}

/* Form Styles */
.form-container {
  max-width: 450px;
  margin: 0 auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-light);
  font-family: inherit;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(126, 217, 87, 0.1);
}

/* Dashboard Styles */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-header {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  font-size: 0.9rem;
  color: #718096;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.dashboard-card {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-card h3 {
  margin-bottom: 0.75rem;
  color: #2d3748;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Enhanced card info display */
.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.card-details {
  flex: 1;
}

.card-details div {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Menu Items */
.menu-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex: 1;
}

.menu-item {
  background: #f7fafc;
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 0.85rem;
}

.menu-item:hover {
  background: #edf2f7;
  border-color: #667eea;
}

.menu-item.selected {
  background: #667eea;
  color: white;
}

/* Bonus buttons styles */
.bonus-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.bonus-btn {
  background: #ed8936;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.bonus-btn:hover {
  background: #dd6b20;
  transform: translateY(-1px);
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-small {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-warning {
  background: #ed8936;
  color: white;
}

.btn-danger {
  background: #f56565;
  color: white;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  width: auto;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  color: #2d3748;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #2d3748;
}

.modal-body {
  padding: 1.5rem;
}

/* Settings sections styling */
.settings-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.settings-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #4a5568;
}

/* Items list styling for menu items, bonus items, and users */
.items-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8f9fa;
}

.menu-item-setting,
.bonus-item,
.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

.menu-item-setting:hover,
.bonus-item:hover,
.user-item:hover {
  background: #f7fafc;
}

.menu-item-setting:last-child,
.bonus-item:last-child,
.user-item:last-child {
  border-bottom: none;
}

.menu-item-setting span,
.bonus-item span,
.user-item span {
  flex: 1;
  font-size: 0.95rem;
  color: #2d3748;
}

.user-item span {
  font-size: 0.9rem;
}

/* Enhanced button styling for delete actions */
.btn-danger {
  background: #f56565;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #e53e3e;
  transform: translateY(-1px);
}

/* Enhanced form styling for settings */
.form-section .form-group {
  margin-bottom: 1rem;
}

.form-section .form-group input,
.form-section .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #f7fafc;
}

.form-section .form-group input:focus,
.form-section .form-group select:focus {
  outline: none;
  border-color: #7ed957;
  background: white;
  box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.1);
}

.form-section .form-group input[type="color"] {
  height: 45px;
  cursor: pointer;
}

.form-section button[type="submit"] {
  margin-top: 1rem;
}

/* Warning text styling for user deletion */
.settings-section p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.settings-section p[style*="color: #666"] {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  padding: 1rem;
  color: #c53030 !important;
}

/* Bonus management styles */
.bonus-list {
  max-height: 200px;
  overflow-y: auto;
}

.bonus-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.bonus-item:last-child {
  border-bottom: none;
}

.bonus-item span {
  flex: 1;
  font-size: 0.9rem;
}

/* Customer history styles */
.customer-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.customer-header {
  text-align: center;
  margin-bottom: 2rem;
  color: white;
}

.customer-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.search-section {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-info-section {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.points-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transactions-list {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info {
  flex: 1;
}

.transaction-description {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #2d3748;
}

.transaction-date {
  font-size: 0.8rem;
  color: #718096;
}

.transaction-points {
  text-align: right;
  font-weight: 600;
  font-size: 1.1rem;
}

.transaction-points.positive {
  color: #48bb78;
}

.transaction-points.negative {
  color: #f56565;
}

.points-after {
  font-size: 0.8rem;
  color: #718096;
}

.no-transactions {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 2rem;
}

.navigation-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.navigation-buttons .btn-secondary {
  width: auto;
  padding: 12px 24px;
}

/* Integrated history display */
.history-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8f9fa;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.history-item:last-child {
  border-bottom: none;
}

.history-info {
  flex: 1;
}

.history-description {
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.history-date {
  font-size: 0.8rem;
  color: #718096;
}

.history-points {
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
}

.history-points.positive {
  color: #48bb78;
}

.history-points.negative {
  color: #f56565;
}

.no-history {
  text-align: center;
  color: #718096;
  padding: 1rem;
  font-size: 0.9rem;
}

.history-container-small {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 0.8rem;
}

.history-item-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.history-item-small:last-child {
  border-bottom: none;
}

.history-info-small {
  flex: 1;
}

.history-description-small {
  font-weight: 500;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.history-date-small {
  font-size: 0.7rem;
  color: #718096;
}

.history-points-small {
  text-align: right;
  font-weight: 600;
  font-size: 0.75rem;
}

.history-points-small.positive {
  color: #48bb78;
}

.history-points-small.negative {
  color: #f56565;
}

.no-history-small {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 0.75rem;
  font-size: 0.75rem;
}

.history-more {
  text-align: center;
  color: #667eea;
  font-style: italic;
  padding: 0.5rem;
  font-size: 0.7rem;
  border-top: 1px solid #e2e8f0;
}

/* Loading */
.loading-state {
  text-align: center;
  padding: 3rem;
  color: #7ed957;
  font-size: 1.1rem;
}

.loading-state::after {
  content: "...";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

.error {
  background: #fed7d7;
  color: #c53030;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.success {
  background: #c6f6d5;
  color: #2f855a;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Points Display */
.points-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.points-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.points-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

.points-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .access-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard {
    padding: 10px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .menu-items {
    grid-template-columns: 1fr 1fr;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .card-info {
    flex-direction: column;
    gap: 1rem;
  }

  .points-summary {
    flex-direction: column;
    gap: 1rem;
  }

  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .navigation-buttons {
    flex-direction: column;
  }

  .history-container {
    max-height: 200px;
    font-size: 0.85rem;
  }

  .history-item {
    padding: 0.5rem;
  }

  .history-description {
    font-size: 0.8rem;
  }

  .history-date {
    font-size: 0.7rem;
  }

  .history-points {
    font-size: 0.8rem;
  }

  .no-history {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .history-container-small {
    max-height: 100px;
    font-size: 0.7rem;
  }

  .history-item-small {
    padding: 0.4rem;
  }

  .history-description-small {
    font-size: 0.7rem;
  }

  .history-date-small {
    font-size: 0.6rem;
  }

  .history-points-small {
    font-size: 0.7rem;
  }

  .no-history-small {
    padding: 0.5rem;
    font-size: 0.7rem;
  }

  .history-more {
    padding: 0.4rem;
    font-size: 0.6rem;
  }

  .customer-card-check {
    margin: 1rem;
    padding: 1.5rem;
  }

  .card-header h1 {
    font-size: 1.8rem;
  }

  .card-header p {
    font-size: 1rem;
  }

  .input-group input {
    padding: 0.875rem;
    font-size: 1rem;
  }

  .points-display {
    flex-direction: column;
    gap: 0.5rem;
  }

  .points-value {
    font-size: 2rem;
  }

  .history-list {
    max-height: 250px;
  }

  .history-item {
    padding: 0.75rem;
  }

  .transaction-description {
    font-size: 0.9rem;
  }

  .transaction-date {
    font-size: 0.8rem;
  }

  .transaction-points {
    font-size: 1rem;
  }
}

/* Touch-friendly */
@media (pointer: coarse) {
  .btn-primary,
  .btn-secondary,
  .menu-item {
    min-height: 48px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 48px;
  }
}

/* Simplified customer card check homepage */
.customer-card-check {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.card-header {
  margin-bottom: 2rem;
}

.card-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.75rem;
  color: #2d3748;
  text-shadow: none;
}

.card-header p {
  font-size: 1.1rem;
  color: #718096;
  margin-bottom: 0;
}

.card-form {
  margin-bottom: 2rem;
}

.input-group {
  text-align: left;
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #4f46e5;
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.card-result {
  text-align: left;
  border-top: 2px solid #e2e8f0;
  padding-top: 2rem;
  margin-top: 2rem;
}

.customer-info {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.customer-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.history-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
}

.history-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
}

/* Customer Dashboard Container */
.customer-dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Dashboard Header with Total Points */
.dashboard-header {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2d3748;
}

.total-points-card {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  display: inline-block;
  min-width: 200px;
}

.total-label {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.total-value {
  font-size: 3rem;
  font-weight: 700;
}

/* Dashboard Layout: Vertical Tabs + Content */
.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Vertical Tabs */
.vertical-tabs {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  height: fit-content;
  max-height: 600px;
  overflow-y: auto;
}

.activity-tab {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.activity-tab:hover {
  background: #edf2f7;
  transform: translateX(5px);
}

.activity-tab.active {
  background: linear-gradient(135deg, #667eea22, #764ba222);
  border-left-width: 4px;
}

.tab-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.tab-info {
  flex: 1;
}

.tab-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.tab-points {
  font-size: 0.9rem;
  color: #718096;
}

.no-activities {
  text-align: center;
  color: #718096;
  padding: 2rem;
  font-style: italic;
}

/* Activity Content */
.activity-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-height: 500px;
}

.empty-state {
  text-align: center;
  color: #718096;
  padding: 4rem 2rem;
  font-size: 1.1rem;
}

/* Activity Detail */
.activity-detail {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-header {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.activity-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.activity-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2d3748;
}

.activity-points-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Card Code Display */
.card-code-display {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.card-code-display .label {
  font-size: 0.9rem;
  color: #718096;
  margin-right: 0.5rem;
}

.card-code-display .code {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  font-family: monospace;
}

/* Bonuses Section */
.bonuses-section {
  margin-bottom: 2rem;
}

.bonuses-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.bonuses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.bonus-card {
  background: #f7fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.bonus-card.available {
  border-color: #48bb78;
  background: #f0fff4;
}

.bonus-card.locked {
  opacity: 0.6;
}

.bonus-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bonus-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.bonus-cost {
  font-size: 1.3rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.bonus-desc {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 1rem;
}

.bonus-status {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.status-available {
  color: #48bb78;
  font-weight: 600;
}

.status-locked {
  color: #f56565;
  font-size: 0.9rem;
}

.no-bonuses {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 2rem;
}

/* Activity History */
.activity-history {
  margin-top: 2rem;
}

.activity-history h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f7fafc;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.history-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.history-icon.add {
  background: #c6f6d5;
  color: #2f855a;
}

.history-icon.subtract {
  background: #fed7d7;
  color: #c53030;
}

.history-icon.reset {
  background: #e2e8f0;
  color: #4a5568;
}

.history-details {
  flex: 1;
}

.history-desc {
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.history-date {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 0.75rem;
}

.history-points {
  font-size: 1.2rem;
  font-weight: 700;
}

.history-points.add {
  color: #48bb78;
}

.history-points.subtract {
  color: #f56565;
}

.history-points.reset {
  color: #718096;
}

.no-history {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 2rem;
}

/* Logout Button */
.btn-logout {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #f56565;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #e53e3e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 101, 101, 0.4);
}

/* Mobile Responsive for Customer Dashboard */
@media (max-width: 768px) {
  .customer-dashboard-container {
    padding: 10px;
  }

  .dashboard-header {
    padding: 1.5rem;
  }

  .dashboard-header h1 {
    font-size: 1.5rem;
  }

  .total-value {
    font-size: 2.5rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .vertical-tabs {
    max-height: 300px;
  }

  .activity-content {
    padding: 1.5rem;
  }

  .activity-header {
    padding: 1.5rem;
  }

  .activity-header h2 {
    font-size: 1.5rem;
  }

  .bonuses-grid {
    grid-template-columns: 1fr;
  }
}

/* Added print styles to hide print button and ensure barcode visibility */
@media print {
  /* Hide print button during print */
  .barcode-card button,
  button {
    display: none !important;
  }

  /* Ensure barcode is visible */
  #barcode-display,
  #barcode-display svg {
    display: block !important;
    visibility: visible !important;
  }

  /* Hide navigation and other UI elements */
  .dashboard-header,
  .modal,
  #message {
    display: none !important;
  }

  /* Optimize barcode card for printing */
  .barcode-card {
    page-break-inside: avoid;
    border: 2px solid #000;
    padding: 20px;
    margin: 0;
  }

  /* Ensure proper sizing */
  body {
    margin: 0;
    padding: 20px;
  }
}

/* Added comprehensive super admin dashboard styles */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}

.admin-sidebar {
  width: 280px;
  background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.sidebar-header p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: white;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: white;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: white;
  font-weight: 600;
}

.nav-item span {
  font-size: 1.2rem;
}

.btn-logout-sidebar {
  margin: 1.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-logout-sidebar:hover {
  background: rgba(255, 255, 255, 0.3);
}

.admin-main {
  margin-left: 280px;
  flex: 1;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #64748b;
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.stat-content p {
  color: #64748b;
  font-size: 0.9rem;
}

.dashboard-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.dashboard-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.admin-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-form .form-group {
  margin-bottom: 0;
}

.admin-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
}

.admin-form .form-group input,
.admin-form .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #f7fafc;
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus {
  outline: none;
  border-color: #7ed957;
  background: white;
  box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.1);
}

.admin-form .form-group input[type="color"] {
  height: 45px;
  cursor: pointer;
}

.admin-form button[type="submit"] {
  margin-top: 1rem;
}

/* Added restaurant grid styles for customer dashboard */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.restaurant-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(126, 217, 87, 0.15);
  border-color: var(--primary);
}

.restaurant-card-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--border);
}

.restaurant-card-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.restaurant-card-content {
  width: 100%;
}

.restaurant-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.restaurant-card-points {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.restaurant-card-code {
  font-size: 0.85rem;
  color: var(--text-gray);
  font-family: monospace;
  background: var(--bg-light);
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.search-container {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Added points limits management styles */
.limits-section {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 2px solid var(--border);
}

.limits-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.limit-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.limit-item label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.limit-item input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.limit-item input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.1);
}

.limit-item .max-value {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin-top: 0.25rem;
  font-weight: 600;
}

.global-limits-card {
  background: linear-gradient(135deg, #7ed957 0%, #5cb835 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(126, 217, 87, 0.3);
}

.global-limits-card h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.limit-item {
  display: flex;
  flex-direction: column;
}

.limit-item label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
  opacity: 0.95;
}

.limit-item input {
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.limit-item input:focus {
  outline: none;
  border-color: white;
  background: white;
}

.max-value {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile responsive for restaurant grid */
@media (max-width: 768px) {
  .restaurants-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .restaurant-card {
    padding: 1.25rem;
  }

  .restaurant-card-logo,
  .restaurant-card-logo-placeholder {
    width: 60px;
    height: 60px;
  }

  .limits-grid {
    grid-template-columns: 1fr;
  }
}

/* Ticket Status Indicator Styles */
.ticket-status {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.ticket-status.open {
  background: #c6f6d5;
  color: #2f855a;
}

.ticket-status.pending,
.ticket-status.in_progress {
  background: #fef3c7;
  color: #92400e;
}

.ticket-status.closed {
  background: #e2e8f0;
  color: #718096;
}

/* Aggiunto stili per announcements grid e cards */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.announcement-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #7ed957;
  transition: all 0.3s ease;
}

.announcement-card.inactive {
  border-left-color: #cbd5e0;
  opacity: 0.7;
}

.announcement-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.announcement-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #2d3748;
  flex: 1;
}

.announcement-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.announcement-message {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.announcement-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
}

.announcement-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}

.announcement-status.status-active {
  background: #c6f6d5;
  color: #2f855a;
}

.announcement-status.status-inactive {
  background: #e2e8f0;
  color: #718096;
}

.announcement-date {
  color: #a0aec0;
}

/* Migliorato stile tabelle per larghezza 100% */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-container table,
.tickets-table {
  width: 100%;
  border-collapse: collapse;
}

.table-container th,
.tickets-table th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.table-container td,
.tickets-table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.table-container tr:hover,
.tickets-table tr:hover {
  background: #f8fafc;
}

.table-container tr:last-child td,
.tickets-table tr:last-child td {
  border-bottom: none;
}

/* Aggiunta stili per configurazione punti personalizzata */
.tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.tier-row input {
  padding: 0.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
}

.tier-row input:focus {
  outline: none;
  border-color: #7ed957;
  box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.1);
}

.config-option {
  padding: 1rem;
  background: #f7fafc;
  border-radius: 8px;
  margin-top: 1rem;
}

.form-group label input[type="radio"],
.form-group label input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #718096;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small.btn-secondary {
  background: #4a5568;
  color: white;
}

.btn-small.btn-secondary:hover {
  background: #2d3748;
}

.btn-small.btn-danger {
  background: #f56565;
  color: white;
}

.btn-small.btn-danger:hover {
  background: #e53e3e;
}

#preview-calculation {
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #7ed957;
  font-weight: 500;
  color: #2d3748;
}
/* Link "Hai già una tessera? / Non hai una tessera?" dentro il box bianco */
.auth-card a,
.card a,
.form-card a,
.login-card a,
.register-card a {
  color: #374151 !important;          /* grigio scuro */
  text-decoration: none !important;
  font-weight: 600;
}

.auth-card a:hover,
.card a:hover,
.form-card a:hover,
.login-card a:hover,
.register-card a:hover {
  text-decoration: underline !important;
}

/* Evita che visited diventi viola/blu e crei caos */
.auth-card a:visited,
.card a:visited,
.form-card a:visited,
.login-card a:visited,
.register-card a:visited {
  color: #374151 !important;
}
/* Fallback totale: tutti i link dentro i box bianchi */
div[style*="background"] a,
.modal-content a {
  color: #374151 !important;
}
.form-container a[style*="color: white"]{
  color:#374151 !important;
}
/* ==========================
   UI FIX PACK (incolla in fondo)
   - sblocca scroll pagina
   - evita clipping delle card
   - rende visibili liste e select multipli nelle impostazioni
   ========================== */

/* 1) Stop dashboard “bloccata” a 100vh (taglia contenuti) */
.dashboard{
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important; /* prima era hidden */
}

/* La grid non deve essere forzata a “stare nel viewport” */
.dashboard-grid{
  flex: initial !important;     /* prima flex:1 */
  min-height: auto !important;  /* prima min-height:0 */
  align-content: start;
}

/* 2) Le card non devono clippare il contenuto */
.dashboard-card{
  overflow: visible !important; /* prima overflow:hidden */
  min-width: 0;
}

/* 3) Aggiungi Punti: griglia stabile + scroll SOLO se serve */
.menu-items{
  flex: initial !important; /* prima flex:1 = prende altezza e poi clippa */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  align-content: start;
  grid-auto-rows: minmax(72px, auto);
  max-height: 340px;     /* aumenta/diminuisci se vuoi */
  overflow: auto;
  padding-right: 6px;    /* spazio scrollbar */
}

.menu-item{
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  white-space: normal;
  word-break: break-word;
}

/* Bonus: ok lo scroll interno, ma rendilo più “pulito” */
.bonus-buttons{
  max-height: 240px; /* un filo più alto */
  overflow: auto;
}

/* 4) Modal: su schermi bassi non deve tagliare sotto */
.modal{
  align-items: flex-start !important;  /* prima center */
  padding: 24px 12px !important;
  overflow-y: auto !important;
}
.modal-content{
  max-height: calc(100vh - 48px) !important; /* invece di 85vh fisso */
}

/* 5) Impostazioni: se “Elementi esistenti” / “Bonus esistenti” sono <select multiple> */
.settings-section select[multiple],
.settings-section select[size],
.modal-body select[multiple],
.modal-body select[size]{
  min-height: 220px;
  height: auto;
  padding: 10px;
  line-height: 1.35;
}

/* Se invece sono liste <div class="items-list">, almeno non sembrano “vuote” */
.items-list{
  min-height: 180px;
}
.items-list:empty::before{
  content: "Nessun elemento da mostrare (lista vuota o non caricata).";
  display: block;
  padding: 14px;
  color: #6b7280;
}

/* 6) Scrollbar (Chrome/Edge) più discreta */
.menu-items::-webkit-scrollbar,
.bonus-buttons::-webkit-scrollbar,
.items-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar{
  width: 10px;
}
.menu-items::-webkit-scrollbar-thumb,
.bonus-buttons::-webkit-scrollbar-thumb,
.items-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb{
  background: rgba(17,24,39,0.18);
  border-radius: 999px;
}
/* ===== FIX LAYOUT SUPER ADMIN (sidebar fixed senza bug) ===== */

/* evita bande/scroll orizzontale strani */
html, body { overflow-x: hidden; }

/* la sidebar è fixed: quindi NON usare margin-left sul main */
.admin-main{
  margin-left: 0 !important;
  width: 100%;
  padding: 2rem;
  padding-left: calc(280px + 2rem) !important; /* spazio per la sidebar */
}

/* opzionale: rende la tabella scrollabile senza rompere layout */
.table-container{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* responsive */
@media (max-width: 980px){
  .admin-sidebar{ width: 240px; }
  .admin-main{ padding-left: calc(240px + 1.25rem) !important; padding: 1.25rem; }
}

@media (max-width: 720px){
  /* su schermi piccoli: sidebar torna normale sopra */
  .admin-sidebar{ position: static; width: 100%; height: auto; }
  .admin-main{ padding-left: 1.25rem !important; }
}
