/* Reset y Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green-primary: #16a34a;
  --green-hover: #15803d;
  --bg-color: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --blue: #3b82f6;
  --purple: #8b5cf6;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  background: linear-gradient(135deg, #e3f2fd 0%, #c8e6c9 50%, #b2dfdb 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  animation: pulse 20s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
  padding: 3rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.login-logo .material-icons {
  font-size: 48px;
  color: white;
}

.login-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.login-header p {
  color: #6b7280;
  font-size: 0.9375rem;
  font-weight: 500;
}

.login-form .form-group {
  margin-bottom: 1.75rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #ffffff;
  color: #111827;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

.input-wrapper input::placeholder {
  color: #9ca3af;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.input-wrapper:focus-within .input-icon {
  color: #16a34a;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.login-footer p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.login-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #16a34a;
  text-decoration: underline;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Inter", sans-serif;
}

.btn .material-icons {
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-danger {
  background-color: var(--error);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===== ALERTS ===== */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.alert .material-icons {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.alert span:not(.material-icons) {
  flex: 1;
}

.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 2px solid #fecaca;
}

.alert-error .material-icons {
  color: #dc2626;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast-success::before {
  background-color: var(--success);
}

.toast-error::before {
  background-color: var(--error);
}

.toast .material-icons {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.toast-success .material-icons {
  color: var(--success);
}

.toast-error .material-icons {
  color: var(--error);
}

.toast-message {
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s;
  margin-left: 0.5rem;
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast-close .material-icons {
  font-size: 18px;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.hide {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== ADMIN LAYOUT ===== */
.admin-page {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.admin-sidebar {
  width: 250px;
  background-color: white;
  border-right: 1px solid var(--border-color);
  padding: 1.5rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  color: var(--green-primary);
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: background-color 0.2s;
}

.nav-item .material-icons {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: var(--bg-color);
}

.nav-item.active {
  background-color: #dcfce7;
  color: var(--green-primary);
  font-weight: 500;
}

.admin-main {
  margin-left: 250px;
  flex: 1;
  min-height: 100vh;
}

.admin-header {
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  flex: 1;
  overflow-x: hidden;
}

.admin-header-title-section {
  min-width: 0;
  flex: 1;
  overflow-x: hidden;
}

.admin-header-title-section h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.admin-header-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-user-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 20px;
}

.admin-user-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.admin-user-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.admin-user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.admin-user .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-user .btn .material-icons {
  font-size: 18px;
}

.admin-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: calc(100vw - 250px);
  box-sizing: border-box;
}

.admin-content {
  padding: 2rem;
  flex: 1;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== METRICS ===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon .material-icons {
  font-size: 32px;
  color: var(--text-primary);
}

.metric-icon.blue {
  background-color: #dbeafe;
}

.metric-icon.blue .material-icons {
  color: #2563eb;
}

.metric-icon.green {
  background-color: #d1fae5;
}

.metric-icon.green .material-icons {
  color: #059669;
}

.metric-icon.purple {
  background-color: #ede9fe;
}

.metric-icon.purple .material-icons {
  color: #7c3aed;
}

.metric-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-primary);
  line-height: 1;
}

.metric-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.metric-sublabel {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ===== SECTION ===== */
.section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  word-wrap: break-word;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
}

/* ===== TABLES ===== */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background-color: var(--bg-color);
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-weight: 600;
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background-color: var(--bg-color);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.badge .material-icons {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.empty-icon .material-icons {
  font-size: 4rem;
  color: var(--text-secondary);
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
}

/* ===== QR FORM ===== */
.qr-form {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  max-width: 100%;
  overflow-x: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.form-group.form-group-full {
  grid-column: 1 / -1;
}

.form-group.form-group-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.form-group input:focus {
  outline: none;
  border-color: var(--green-primary);
}

.form-group small {
  color: var(--text-secondary);
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* ===== QR GRID ===== */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.qr-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  word-wrap: break-word;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qr-card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.qr-card.inactive {
  opacity: 0.6;
}

.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.qr-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  flex: 1;
  margin: 0;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.qr-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.qr-body-content {
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  max-width: 100%;
  overflow-x: hidden;
  min-width: 0;
}

.qr-info {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  flex: 1;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  min-width: 0;
}

.info-item-url {
  margin-top: 0.375rem;
}

.info-item .info-label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.info-item > span:not(.info-icon):not(.info-label) {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.info-item code {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: inline-block;
}

.info-icon {
  font-size: 1.125rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.qr-slug {
  font-family: monospace;
  background-color: var(--bg-color);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  word-break: break-all;
  overflow-wrap: break-word;
  display: inline-block;
  max-width: 100%;
}

.qr-url {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.url-input {
  flex: 1;
  padding: 0.625rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-family: monospace;
  min-width: 0;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  background: white;
  color: var(--text-primary);
  line-height: 1.4;
  overflow: visible;
  white-space: normal;
  height: auto;
  min-height: 2.5rem;
}

.url-input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.qr-code-section {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
  min-width: 160px;
}

.qr-code-image-container {
  text-align: center;
  background: white;
  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qr-code-image {
  width: 130px;
  height: 130px;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  display: block;
  background: white;
}

.qr-code-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-qr-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 32px;
  height: 32px;
}

.btn-qr-action:hover {
  background: var(--bg-color);
  border-color: var(--green-primary);
  color: var(--green-primary);
  transform: translateY(-1px);
}

.btn-qr-action .material-icons {
  font-size: 18px;
}

.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.qr-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.qr-modal-content {
  position: relative;
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 1;
}

.qr-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-color);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.qr-modal-close:hover {
  background: #e5e7eb;
}

.qr-modal-close .material-icons {
  font-size: 20px;
  color: var(--text-primary);
}

.qr-modal-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.qr-modal-image {
  width: 250px;
  height: 250px;
  border: 4px solid var(--bg-color);
  border-radius: 0.5rem;
  margin: 0 auto 1.5rem;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-modal-url {
  font-size: 0.875rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: 0.5rem;
}

.qr-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.qr-modal-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.qr-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.qr-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.775rem;
  white-space: nowrap;
  min-width: 0;
}

.qr-actions .btn .material-icons {
  font-size: 18px;
  flex-shrink: 0;
}

.qr-actions form {
  display: contents;
}

/* ===== PUBLIC PAGES ===== */
.public-page {
  min-height: 100vh;
  max-height: 100vh;
  background: linear-gradient(135deg, #e3f2fd 0%, #c8e6c9 50%, #b2dfdb 100%);
  position: relative;
  overflow: hidden;
}

.public-page::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.08) 0%,
    transparent 70%
  );
  animation: pulse 25s ease-in-out infinite;
  pointer-events: none;
}

/* ===== LANDING MINIMALISTA ===== */
.landing-container-minimal {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.landing-content-minimal {
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.landing-logo-minimal {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.landing-logo-minimal .material-icons {
  font-size: 48px;
  color: white;
}

.landing-title-minimal {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.landing-subtitle-minimal {
  font-size: 1.125rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 2.5rem;
}

.landing-features-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.feature-minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  transition: transform 0.2s;
}

.feature-minimal:hover {
  transform: translateY(-2px);
}

.feature-minimal .material-icons {
  font-size: 28px;
  color: #3b82f6;
}

.feature-minimal span:not(.material-icons) {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.arrow {
  font-size: 1.5rem;
  color: #9ca3af;
  font-weight: 300;
}

.landing-admin-minimal {
  margin-top: 2rem;
}

.btn-admin-minimal {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.btn-admin-minimal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  color: white;
}

.btn-admin-minimal .material-icons {
  font-size: 20px;
}

.landing-container {
  min-height: 100vh;
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== HERO SECTION ===== */
.landing-hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.landing-logo-large {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.landing-logo-large .material-icons {
  font-size: 64px;
  color: white;
}

.landing-title {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.landing-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1.5rem;
}

.landing-description {
  font-size: 1.125rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== FEATURES SECTION ===== */
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.feature-icon.green {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.feature-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.feature-icon .material-icons {
  font-size: 36px;
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.landing-cta {
  margin-bottom: 4rem;
}

.cta-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 0 auto;
}

.cta-card .material-icons {
  font-size: 48px;
  color: #3b82f6;
  flex-shrink: 0;
}

.cta-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}

.cta-content p {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}

/* ===== ADMIN SECTION ===== */
.landing-admin {
  margin-top: 4rem;
}

.admin-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(249, 250, 251, 0.98) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.9);
  max-width: 900px;
  margin: 0 auto;
}

.admin-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.3);
}

.admin-icon .material-icons {
  font-size: 56px;
  color: white;
}

.admin-content {
  flex: 1;
}

.admin-content h3 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #16a34a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.admin-content p {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.btn-admin {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ===== ERROR PAGE ===== */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.error-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.error-card h1 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.error-slug {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.error-slug code {
  background-color: var(--bg-color);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

.error-card .btn {
  margin-top: 1.5rem;
  display: inline-block;
  position: relative;
  z-index: 1;
}

/* ===== SCANNER PAGE ===== */
.scanner-page {
  background-color: #000000;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh; /* Dynamic viewport height para móviles */
}

.scanner-page video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.scanner-overlay-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 1rem 1rem 3.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 60px;
  padding-top: env(safe-area-inset-top, 1rem);
}

.scanner-back-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
  z-index: 101;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.scanner-back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.scanner-back-btn .material-icons {
  font-size: 20px;
}

.scanner-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 0.5rem;
  order: 3;
}

.scanner-overlay-top h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
  order: 2;
  padding: 0 1rem;
}

.scanner-controls {
  position: fixed;
  bottom: max(2rem, env(safe-area-inset-bottom, 2rem));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capture-button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid white;
  background: rgba(255, 255, 255, 0.95);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.capture-button:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.85);
}

.capture-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.capture-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: scale(1);
}

.capture-button .material-icons {
  font-size: 32px;
  line-height: 1;
}

.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.result-modal.hidden {
  display: none;
}

.result-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.result-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.result-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.result-type {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.result-container {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
}

.container-amarillo {
  color: #f59e0b;
}

.container-azul {
  color: #3b82f6;
}

.container-verde {
  color: var(--green-primary);
}

.container-marrón {
  color: #92400e;
}

.container-gris {
  color: var(--text-secondary);
}

.container-especial {
  color: #f59e0b;
  font-weight: 600;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 2px solid #f59e0b;
  text-align: center;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.result-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== REUSE MODAL (OpenAI Sugerencias) ===== */
.reuse-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.reuse-icon {
  font-size: 32px;
  color: #f59e0b;
}

.reuse-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.reuse-content {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto;
}

.reuse-suggestions {
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.reuse-suggestions p {
  margin: 0.75rem 0;
}

.reuse-suggestions strong {
  color: var(--green-primary);
  font-weight: 600;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--text-secondary);
}

.loading-spinner .material-icons {
  font-size: 48px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.reuse-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--error);
  text-align: center;
}

.reuse-error .material-icons {
  font-size: 48px;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-color);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.modal-close-btn:hover {
  background: #e5e7eb;
}

.modal-close-btn .material-icons {
  font-size: 20px;
  color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .qr-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qr-body-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .qr-code-section {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 250px;
  }

  .admin-main {
    margin-left: 250px;
    max-width: calc(100vw - 250px);
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.875rem;
  }

  .qr-form {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .form-group {
    min-width: 0;
    width: 100%;
  }

  .form-group.form-group-full,
  .form-group.form-group-actions {
    grid-column: 1 / -1;
  }

  .form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }

  .form-group input {
    font-size: 16px; /* Evita zoom automático en iOS */
    padding: 0.625rem;
    width: 100%;
    box-sizing: border-box;
  }

  .form-group small {
    font-size: 0.75rem;
    margin-top: 0.25rem;
  }

  .form-group-actions {
    margin-top: 0.5rem;
  }

  .form-group-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .qr-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .qr-card {
    padding: 0.875rem;
  }

  .qr-card {
    padding: 1rem;
    gap: 0.875rem;
  }

  .qr-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
    align-items: center;
  }

  .qr-header h3 {
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    word-break: break-word;
    line-height: 1.3;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    flex-shrink: 0;
  }

  .qr-body {
    gap: 0.875rem;
  }

  .qr-body-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .qr-code-section {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    min-width: auto;
  }

  .qr-code-image-container {
    padding: 0.375rem;
  }

  .qr-code-image {
    width: 120px;
    height: 120px;
  }

  .qr-code-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  .btn-qr-action {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .qr-info {
    gap: 0.625rem;
    width: 100%;
  }

  .info-item {
    flex-wrap: nowrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
  }

  .info-item .info-label {
    min-width: 85px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .info-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 0.125rem;
  }

  .info-item > span:not(.info-icon):not(.info-label),
  .info-item code {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.8125rem;
  }

  .qr-url {
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    align-items: stretch;
  }

  .url-input {
    width: 100%;
    font-size: 0.6875rem;
    padding: 0.5rem;
    min-width: 0;
    flex: 1;
    word-break: break-all;
    overflow-wrap: break-word;
  }

  .qr-url .btn {
    flex-shrink: 0;
    width: auto;
    min-width: 40px;
    height: auto;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .qr-url .btn .material-icons {
    font-size: 18px;
  }

  .qr-slug {
    font-size: 0.75rem;
    word-break: break-all;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
  }

  .qr-actions {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-top: 0.875rem;
  }

  .qr-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.625rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .qr-actions .btn .material-icons {
    font-size: 18px;
  }

  .qr-actions form {
    width: 100%;
    display: block;
  }

  .qr-modal {
    padding: 0.5rem;
  }

  .qr-modal-content {
    max-width: calc(100vw - 1rem);
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .qr-modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
  }

  .qr-modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .qr-modal-image {
    width: 200px;
    height: 200px;
  }

  .qr-modal-url {
    font-size: 0.75rem;
    padding: 0.5rem;
    word-break: break-all;
  }

  .qr-modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .qr-modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: none;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    flex-wrap: nowrap;
  }

  .admin-header-left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
    overflow-x: hidden;
  }

  .admin-mobile-menu-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-right: 0;
  }

  .admin-header-title-section {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
  }

  .admin-header-title-section h1 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-header-subtitle {
    display: none; /* Ocultar subtítulo en móviles para ahorrar espacio */
  }

  .admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
  }

  .admin-user-info {
    display: none; /* Ocultar info de usuario en móviles para ahorrar espacio */
  }

  .admin-user-details {
    display: none;
  }

  .admin-user .btn {
    font-size: 0.8125rem;
    padding: 0.5rem;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .admin-user .btn .material-icons {
    font-size: 20px;
    margin: 0;
  }

  .admin-user .btn span:not(.material-icons) {
    display: none; /* Ocultar texto del botón en móviles, solo mostrar ícono */
  }

  .admin-content {
    padding: 1rem 1.25rem;
  }

  .section {
    margin-bottom: 1.5rem;
  }

  .section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .landing-title {
    font-size: 2.5rem;
  }

  .landing-tagline {
    font-size: 1.25rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .admin-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .admin-content h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .landing-title-minimal {
    font-size: 2.25rem;
  }

  .landing-subtitle-minimal {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .landing-features-minimal {
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .feature-minimal {
    padding: 0.75rem 1rem;
    min-width: 80px;
  }

  .feature-minimal .material-icons {
    font-size: 24px;
  }

  .feature-minimal span:not(.material-icons) {
    font-size: 0.75rem;
  }

  .arrow {
    font-size: 1.25rem;
  }
}


/* Botón hamburguesa para móvil - Oculto por defecto en desktop */
.admin-mobile-menu-toggle {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.admin-mobile-menu-toggle:hover {
  background: #e5e7eb;
  border-color: var(--green-primary);
}

.admin-mobile-menu-toggle .material-icons {
  font-size: 24px;
  color: var(--text-primary);
}

/* Estilos responsive para modal de edición */
@media (max-width: 640px) {
  #edit-qr-modal {
    padding: 0.5rem;
  }

  #edit-qr-modal .qr-modal-content {
    max-width: calc(100vw - 1rem) !important;
    padding: 1.25rem !important;
    max-height: 90vh !important;
    margin: 0 !important;
    border-radius: 0.75rem;
  }

  #edit-qr-modal .qr-modal-close {
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 32px !important;
    height: 32px !important;
  }

  #edit-qr-modal h3 {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
  }

  #edit-qr-modal > .qr-modal-content > p {
    font-size: 0.75rem !important;
    margin-bottom: 1rem !important;
  }

  #edit-qr-modal h4 {
    font-size: 0.8125rem !important;
    margin-bottom: 0.625rem !important;
  }

  #edit-qr-modal h4 .material-icons {
    font-size: 16px !important;
  }

  #edit-qr-modal .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #edit-qr-modal .form-group {
    width: 100% !important;
    flex: 1 !important;
  }

  #edit-qr-modal .form-group label {
    font-size: 0.8125rem !important;
    margin-bottom: 0.375rem !important;
  }

  #edit-qr-modal .form-group input {
    font-size: 16px !important; /* Evita zoom en iOS */
    padding: 0.625rem !important;
    width: 100% !important;
  }

  #edit-qr-modal .form-group small {
    font-size: 0.6875rem !important;
    margin-top: 0.25rem !important;
  }

  #edit-qr-modal .edit-modal-checkboxes {
    grid-template-columns: 1fr !important;
    gap: 0.625rem !important;
  }

  #edit-qr-modal .edit-modal-checkboxes label {
    padding: 0.625rem !important;
    font-size: 0.8125rem !important;
  }

  #edit-qr-modal .edit-modal-checkboxes label > div > div:first-child {
    font-size: 0.8125rem !important;
  }

  #edit-qr-modal .edit-modal-checkboxes label > div > div:last-child {
    font-size: 0.6875rem !important;
  }

  #edit-qr-modal > .qr-modal-content > form > div:last-child {
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding-top: 1rem !important;
  }

  #edit-qr-modal .btn {
    font-size: 0.875rem !important;
    padding: 0.625rem 1rem !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #edit-qr-modal .btn .material-icons {
    font-size: 18px !important;
  }

  #edit-qr-modal > .qr-modal-content > form > div {
    margin-bottom: 1.25rem !important;
  }

  .scanner-overlay-top {
    padding: 0.875rem 1rem 0.875rem 3rem;
    min-height: 56px;
  }

  .scanner-overlay-top h2 {
    font-size: 1rem;
  }

  .scanner-back-btn {
    width: 32px;
    height: 32px;
    left: 0.75rem;
  }

  .scanner-back-btn .material-icons {
    font-size: 18px;
  }

  .scanner-controls {
    bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  }

  .capture-button {
    width: 64px;
    height: 64px;
    border-width: 3px;
  }

  .capture-button .material-icons {
    font-size: 28px;
  }

  .result-modal {
    padding: 1rem;
  }

  .result-card {
    padding: 1.5rem;
  }

  .result-icon {
    font-size: 4rem;
  }

  .result-card h2 {
    font-size: 1.25rem;
  }

  .result-container {
    font-size: 1.5rem;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 1000;
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    max-width: 100%;
  }

  /* Mostrar en móviles */
  .admin-mobile-menu-toggle {
    display: flex !important;
  }

  /* Overlay para cerrar sidebar en móvil */
  .admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .admin-sidebar-overlay.mobile-open {
    display: block;
    opacity: 1;
  }

  /* Mejoras para móviles muy pequeños */
  @media (max-width: 480px) {
    .admin-header {
      padding: 0.75rem 0.875rem;
      gap: 0.5rem;
    }

    .admin-header-left {
      gap: 0.5rem;
    }

    .admin-mobile-menu-toggle {
      width: 32px;
      height: 32px;
    }

    .admin-mobile-menu-toggle .material-icons {
      font-size: 20px;
    }

    .admin-header-title-section h1 {
      font-size: 0.9375rem;
    }

    .admin-user .btn {
      width: 32px;
      height: 32px;
      padding: 0.375rem;
    }

    .admin-user .btn .material-icons {
      font-size: 18px;
    }

    .admin-content {
      padding: 0.75rem 1rem;
    }

    .section {
      margin-bottom: 1.25rem;
    }

    .section h2 {
      font-size: 1.125rem;
      margin-bottom: 0.875rem;
    }

    .qr-form {
      padding: 0.875rem;
    }

    .qr-card {
      padding: 0.875rem;
      gap: 0.75rem;
    }

    .qr-header {
      padding-bottom: 0.5rem;
    }

    .qr-header h3 {
      font-size: 0.9375rem;
    }

    .badge {
      font-size: 0.6875rem;
      padding: 0.25rem 0.5rem;
    }

    .qr-code-image {
      width: 100px;
      height: 100px;
    }

    .qr-code-section {
      padding: 0.75rem;
    }

    .info-item .info-label {
      min-width: 75px;
      font-size: 0.6875rem;
    }

    .info-item {
      font-size: 0.75rem;
    }

    .url-input {
      font-size: 0.625rem;
      padding: 0.375rem;
    }

    .info-item {
      font-size: 0.8125rem;
    }

    .info-item .info-label {
      min-width: 55px;
      font-size: 0.75rem;
    }

    .qr-modal-content {
      padding: 1.25rem;
      max-height: 95vh;
    }

    .qr-modal-image {
      width: 180px;
      height: 180px;
    }

    #edit-qr-modal .qr-modal-content {
      padding: 1rem !important;
      max-height: 95vh !important;
    }
  }

  .landing-container-minimal {
    padding: 1rem;
  }

  .landing-logo-minimal {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }

  .landing-logo-minimal .material-icons {
    font-size: 36px;
  }

  .landing-title-minimal {
    font-size: 1.75rem;
  }

  .landing-subtitle-minimal {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
  }

  .landing-features-minimal {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .feature-minimal {
    padding: 0.625rem 0.75rem;
    min-width: 70px;
  }

  .feature-minimal .material-icons {
    font-size: 20px;
  }

  .feature-minimal span:not(.material-icons) {
    font-size: 0.6875rem;
  }

  .arrow {
    font-size: 1rem;
    display: none;
  }

  .btn-admin-minimal {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .landing-container {
    padding: 2rem 1rem;
  }

  .landing-title {
    font-size: 2rem;
  }

  .landing-tagline {
    font-size: 1.125rem;
  }

  .landing-description {
    font-size: 1rem;
  }

  .landing-logo-large {
    width: 100px;
    height: 100px;
  }

  .landing-logo-large .material-icons {
    font-size: 56px;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .cta-card {
    padding: 1.5rem;
  }

  .cta-card .material-icons {
    font-size: 40px;
  }

  .admin-card {
    padding: 1.5rem;
  }

  .admin-icon {
    width: 80px;
    height: 80px;
  }

  .admin-icon .material-icons {
    font-size: 48px;
  }

  .admin-content h3 {
    font-size: 1.25rem;
  }

  .admin-content p {
    font-size: 1rem;
  }
}

/* ===== ADMIN FOOTER ===== */
.admin-footer {
  background-color: white;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  width: 100%;
}

.admin-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.admin-footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.admin-footer-brand h3 {
  font-size: 1.25rem;
  color: var(--green-primary);
  margin: 0;
}

.admin-footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.admin-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-footer-links a,
.admin-footer-links li {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.admin-footer-links a:hover {
  color: var(--green-primary);
}

.admin-footer-links .material-icons {
  font-size: 18px;
  color: #9cb3a8;
}

.admin-footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.admin-footer-version {
  opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .admin-footer-content {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .admin-footer-section:first-child {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .admin-footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .admin-footer {
    padding: 2rem 0 1.5rem;
  }

  .admin-footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }

  .admin-footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.5rem 0;
    margin-top: 2rem;
  }
}
