:root {
  --primary-color: #ff8c21;
  --primary-600: #f97316;
  --primary-700: #ea580c;
  --secondary-color: #6d28d9;
  --secondary-400: #8b5cf6;
  --accent: #ff8c21;
  --danger-color: #ef4444;
  --success-color: #22c55e;
  --warning-color: #facc15;
  --info-color: #0ea5e9;
  --background: #f8fafc;
  --card-background: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-200: #e2e8f0;
  --gray-50: #f8fafc;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(180deg, #ffb340 0%, #ff7a1a 100%);
  --gradient-secondary: linear-gradient(135deg, #ff8c21 0%, #6d28d9 100%);
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #ffa137;
  --primary-600: #f97316;
  --primary-700: #ea580c;
  --secondary-color: #8b5cf6;
  --secondary-400: #a78bfa;
  --accent: #ffa137;
  --danger-color: #f87171;
  --success-color: #4ade80;
  --warning-color: #fcd34d;
  --info-color: #38bdf8;
  --background: #0b0f19;
  --card-background: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-200: #334155;
  --gray-50: #1e293b;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.8);
  --gradient-primary: linear-gradient(180deg, #ffb340 0%, #ff7a1a 100%);
  --gradient-secondary: linear-gradient(135deg, #ff8c21 0%, #6d28d9 100%);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card-background);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Screens */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 60px;
}

.app-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.5;
  padding-bottom: 14px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.screen-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

/* Buttons */
.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.btn-back:hover {
  background: var(--background);
  transform: translateX(-4px);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #0051d5;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--background);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--card-background);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #d70015;
}

.btn-large {
  width: 100%;
  padding: 16px 32px;
  font-size: 1.1rem;
  margin-top: 20px;
}

/* Cards */
.card {
  background: var(--card-background);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.action-card {
  cursor: pointer;
  text-align: center;
  padding: 40px 24px;
}

.action-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.action-card h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.action-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Creator Layout */
.creator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 1024px) {
  .creator-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: sticky;
    top: 20px;
  }
}

.editor-panel .card {
  margin-bottom: 20px;
}

.editor-panel .card h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--card-background);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

input[type="color"] {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}

input[type="file"] {
  padding: 8px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}

input[type="file"]:hover {
  border-color: var(--primary-color);
}

.image-preview {
  margin-top: 12px;
  display: none;
}

.image-preview.active {
  display: block;
}

.image-preview img {
  max-width: 200px;
  max-height: 100px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Custom Fields */
.custom-field {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--background);
  border-radius: 8px;
}

.custom-field input {
  flex: 1;
}

.custom-field .btn-remove {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.custom-field .btn-remove:hover {
  background: #d70015;
}

/* Preview Panel */
.preview-container {
  position: sticky;
  top: 20px;
}

.preview-container h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.pass-preview {
  perspective: 1000px;
}

.pass-card {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 16px;
  padding: 24px;
  color: white;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  min-height: 400px;
}

.pass-card:hover {
  transform: rotateY(5deg) rotateX(2deg);
}

.pass-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.pass-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  background: white;
  padding: 4px;
}

.pass-title-section {
  flex: 1;
}

.pass-org {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.pass-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.pass-description {
  margin-bottom: 20px;
  opacity: 0.9;
  font-size: 0.95rem;
}

.pass-fields {
  margin: 24px 0;
}

.pass-field {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.pass-field-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pass-field-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.pass-barcode {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.barcode-placeholder {
  display: inline-block;
  padding: 12px;
  background: white;
  border-radius: 8px;
}

.barcode-message {
  margin-top: 12px;
  font-size: 0.85rem;
  opacity: 0.9;
  font-family: "Courier New", monospace;
}

/* My Passes Grid */
.passes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.pass-item {
  background: var(--card-background);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.pass-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pass-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pass-item-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--background);
}

.pass-item-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.pass-item-org {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.pass-item-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state svg {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Templates Grid */
.template-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 1024px) {
  .template-cards {
    grid-template-columns: 1fr;
  }
}

.template-card {
  background: var(--card-background);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.template-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.template-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.template-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.feature-tag {
  background: var(--background);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.template-use-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-secondary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 140, 33, 0.3);
}

.template-use-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 140, 33, 0.4);
}

.template-use-btn:active {
  transform: scale(0.98);
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.template-preview {
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.template-info {
  padding: 20px;
}

.template-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.template-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card-background);
  border-radius: var(--radius);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-footer .btn {
  flex: 1;
  min-width: 120px;
}

/* Add to Apple Wallet Button */
#addToWalletBtn {
  background: linear-gradient(135deg, #000000 0%, #1c1c1e 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex: 2;
  min-width: 180px;
}

#addToWalletBtn:hover {
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#addToWalletBtn svg {
  flex-shrink: 0;
}

/* Share Pass Button */
.modal-footer-share {
  padding: 0 24px 24px;
  display: flex;
  justify-content: center;
}

.btn-share {
  background: linear-gradient(135deg, #ff8c21 0%, #6d28d9 100%);
  color: white;
  border: none;
  padding: 16px 48px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  transition: var(--transition);
  cursor: pointer;
  min-width: 220px;
}

.btn-share:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #ff8c21 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-share svg {
  flex-shrink: 0;
}

/* Share Modal */
.share-modal-content {
  max-width: 550px;
}

.share-link-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.share-url-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--background);
  color: var(--text-primary);
}

.share-url-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.share-divider {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 24px 0;
  position: relative;
}

.share-divider::before,
.share-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-color);
}

.share-divider::before {
  left: 0;
}

.share-divider::after {
  right: 0;
}

/* Social Share Buttons */
.social-share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.social-btn span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.social-btn[data-platform="messages"] svg {
  fill: #007aff;
}

.social-btn[data-platform="twitter"] svg {
  fill: #000000;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

.toast {
  background: var(--card-background);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  margin-top: 12px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--danger-color);
}

.toast.info {
  border-left: 4px solid var(--primary-color);
}

.toast-message {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .app-header h1 {
    font-size: 2.5rem;
  }

  .action-cards {
    grid-template-columns: 1fr;
  }

  .creator-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .social-share-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-share {
    padding: 14px 32px;
    font-size: 1rem;
    min-width: 180px;
  }

  .share-link-container {
    flex-direction: column;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Plan Badge & Upgrade Button */
.plan-badge-header {
  position: fixed;
  top: 68px;
  right: 20px;
  z-index: 999;
  display: none;
}

.plan-badge-content {
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.plan-badge-content:hover {
  box-shadow: 0 6px 16px rgba(255, 140, 33, 0.3);
  transform: translateY(-2px);
}

.header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  transition: var(--transition);
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.btn-upgrade svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .plan-badge-header {
    top: 68px;
    right: 10px;
  }

  .plan-badge-content {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 100%;
  }

  .header-actions a,
  .header-actions button {
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    margin-right: 0 !important;
  }

  .header-actions svg {
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
  }

  #userInfo {
    display: none !important;
  }

  #userMenuContainer {
    flex-basis: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

/* Upgrade Nudges */
.upgrade-nudge-banner {
  background: linear-gradient(135deg, #ff8c21 0%, #6d28d9 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  animation: slideDown 0.5s ease;
}

.nudge-content {
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
}

.nudge-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.nudge-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nudge-text strong {
  font-size: 1.1rem;
  font-weight: 600;
}

.nudge-desc {
  font-size: 0.9rem;
  opacity: 0.95;
}

.nudge-btn {
  padding: 10px 24px;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: var(--transition);
}

.nudge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upgrade-nudge-inline {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.nudge-inline-content {
  display: flex;
  align-items: center;
  gap: 16px;
  color: white;
}

.nudge-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.nudge-inline-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nudge-inline-text strong {
  font-weight: 600;
}

.nudge-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.nudge-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}

.upgrade-nudge-card {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(250, 112, 154, 0.3);
  text-align: center;
}

.nudge-card-content {
  color: white;
}

.nudge-icon-large {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.nudge-card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}

.nudge-card-content p {
  font-size: 1rem;
  opacity: 0.95;
  margin-bottom: 20px;
  line-height: 1.6;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Nudges */
@media (max-width: 768px) {
  .upgrade-nudge-banner {
    padding: 16px;
  }

  .nudge-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .nudge-text strong {
    font-size: 1rem;
  }

  .nudge-desc {
    font-size: 0.85rem;
  }

  .upgrade-nudge-inline {
    padding: 12px 16px;
  }

  .nudge-inline-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .nudge-inline-text {
    font-size: 0.9rem;
  }

  .upgrade-nudge-card {
    padding: 24px 16px;
  }

  .nudge-icon-large {
    font-size: 2.5rem;
  }

  .nudge-card-content h3 {
    font-size: 1.3rem;
  }
}

/* Feature Lock Badges */
.feature-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-lock-badge svg {
  width: 12px;
  height: 12px;
  opacity: 0.9;
}

/* Template Lock Styles */
.template-card {
  position: relative;
}

.template-locked {
  opacity: 0.75;
  cursor: pointer;
}

.template-locked::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  pointer-events: none;
}

.template-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #ff8c21 0%, #6d28d9 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.template-lock-badge svg {
  width: 14px;
  height: 14px;
}

/* Empty State Hint */
.empty-state-hint {
  margin-top: 24px;
  padding: 12px 20px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.empty-state-hint strong {
  color: var(--text-primary);
}

.empty-state-hint a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.empty-state-hint a:hover {
  text-decoration: underline;
}

/* ===================================
   COMPREHENSIVE DARK THEME STYLES
   =================================== */

/* Modal Dark Theme */
[data-theme="dark"] .modal {
  background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-content {
  background: #1a1a1c;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Form Elements Dark Theme */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1a1a1c;
  border-color: #2c2c2e;
  color: #e5e5e7;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: #0a84ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

[data-theme="dark"] input[type="color"] {
  background: #1a1a1c;
  border-color: #2c2c2e;
}

[data-theme="dark"] input[type="file"] {
  background: #1a1a1c;
  border-color: #2c2c2e;
  color: #e5e5e7;
}

/* Pass Card Elements Dark Theme */
[data-theme="dark"] .pass-logo {
  background: #2c2c2e;
}

[data-theme="dark"] .barcode-placeholder {
  background: #f5f5f7;
}

[data-theme="dark"] .pass-field {
  background: rgba(255, 255, 255, 0.08);
}

/* Custom Fields Dark Theme */
[data-theme="dark"] .custom-field {
  background: #1a1a1c;
}

/* Upgrade Nudge Dark Theme */
[data-theme="dark"] .nudge-btn {
  background: #f5f5f7;
  color: #667eea;
}

[data-theme="dark"] .empty-state-hint {
  background: rgba(10, 132, 255, 0.15);
}

/* Animations Dark Theme */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0d0d0d;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2c2c2e;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3c3c3e;
}

/* Loading Overlay Dark Theme */
[data-theme="dark"] .loading-overlay {
  background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: #0a84ff;
}
