/* Admin Panel Styles */
.admin-panel-container {
  min-height: 100vh;
  background-color: #080a0f;
  color: #f0f3f7;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.admin-navbar {
  background: rgba(14, 18, 26, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 500;
  backdrop-filter: blur(12px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.admin-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.admin-subtitle {
  font-size: 0.75rem;
  color: var(--accent-color);
  display: block;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-action-btn {
  font-size: 0.82rem;
  padding: 0.6rem 1.2rem;
}

.whatsapp-nav-action {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.4);
}

.whatsapp-nav-action:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25d366;
  color: #fff;
}

.view-card-btn {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

/* Main Split Workspace */
.admin-workspace {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 75px);
  overflow: hidden;
}

.admin-editor-column {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  max-width: 900px;
}

/* Tab navigation */
.admin-tabs-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 0.8rem;
  margin-bottom: 1.8rem;
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-color);
  color: var(--accent-color);
  font-weight: 600;
}

/* Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.metric-box {
  background: rgba(18, 23, 33, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.metric-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.metric-name {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-sublabel {
  font-size: 0.72rem;
  color: var(--accent-color);
  margin-top: 0.2rem;
}

/* Section Boxes */
.admin-section-box {
  background: rgba(18, 23, 33, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

.section-box-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.section-box-title h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.section-box-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

/* Form Styles */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-field.full-width {
  grid-column: 1 / -1;
}

.admin-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  font-weight: 600;
}

.admin-input,
.admin-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(10, 13, 19, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.admin-input:focus,
.admin-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.input-with-action {
  display: flex;
  gap: 0.6rem;
}

.test-link-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
}

/* Link Generator */
.link-generator-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.gen-input-col {
  flex: 1;
}

.gen-input-col.passes-col {
  max-width: 100px;
}

.generated-link-preview-box {
  background: rgba(10, 13, 19, 0.9);
  border: 1px dashed var(--primary-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.link-preview-text {
  font-family: monospace;
  font-size: 0.84rem;
  color: var(--primary-color);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  border-radius: 4px;
}

.link-btns-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.gen-btn {
  font-size: 0.8rem;
  padding: 0.6rem 1.2rem;
}

.whatsapp-btn {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25d366;
}

/* Guests Table Section */
.table-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.export-csv-btn {
  font-size: 0.8rem;
  padding: 0.6rem 1.2rem;
}

.table-filters-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.search-input {
  max-width: 260px;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.76rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--primary-color);
  color: var(--accent-color);
  font-weight: 600;
}

/* Quick Add Guest */
.quick-add-guest-form {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  background: rgba(10, 13, 19, 0.6);
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.pases-input {
  max-width: 80px;
}

.add-guest-btn {
  flex-shrink: 0;
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
}

/* Table */
.guests-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-sm);
}

.guests-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.guests-table th {
  background: rgba(10, 13, 19, 0.9);
  padding: 0.8rem 1rem;
  color: var(--accent-color);
  font-family: var(--font-heading);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.guests-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.guest-col-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.guest-row-name {
  font-weight: 600;
  color: #fff;
}

.guest-row-phone {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.guest-row-date {
  font-size: 0.7rem;
  color: var(--accent-color);
  font-style: italic;
}

.badge-passes {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: #fff;
  font-size: 0.78rem;
}

.status-select {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.status-select.confirmed {
  background: rgba(43, 182, 115, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.status-select.declined {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.status-select.pending {
  background: rgba(156, 163, 175, 0.15);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.attendees-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.dietary-and-msg {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 250px;
}

.dietary-badge {
  font-size: 0.72rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-color);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.guest-table-msg {
  font-size: 0.75rem;
  font-style: italic;
  color: #cbd5e1;
  line-height: 1.3;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.table-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(37, 211, 102, 0.18);
  border: 1px solid #25d366;
  color: #25d366;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.table-btn-wa:hover {
  background: #25d366;
  color: #0b140e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.table-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.table-btn-copy:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--primary-color);
  color: #fff;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.action-icon-btn:hover.delete-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.empty-table-msg {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Appearance Preset Cards */
.presets-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.preset-card {
  background: rgba(10, 13, 19, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.preset-card.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.1);
}

.preset-colors-preview {
  display: flex;
  gap: 6px;
  height: 24px;
}

.preset-colors-preview span {
  flex: 1;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.preset-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  color: #fff;
  font-weight: 600;
}

/* Sections Toggle List */
.sections-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.section-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 19, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  gap: 1rem;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toggle-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.toggle-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2a3344;
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Backup Cards */
.backup-actions-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.backup-card {
  background: rgba(10, 13, 19, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.backup-card h4 {
  font-size: 0.98rem;
  color: #fff;
  font-weight: 600;
}

.backup-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.upload-json-label {
  cursor: pointer;
}

.danger-card {
  border-color: rgba(239, 68, 68, 0.35);
}

.reset-btn {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.reset-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fff;
}

.apk-info-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
}

.apk-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.apk-header h4 {
  font-size: 1rem;
  color: var(--accent-color);
  font-weight: 600;
}

.apk-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.84rem;
  color: #d1d5db;
  line-height: 1.5;
}

.apk-steps code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--primary-color);
}

/* Right Side: Phone Simulator */
.admin-simulator-column {
  width: 480px;
  background: #040609;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
}

.simulator-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

/* Phone Mockup Frame */
.mobile-device-frame {
  width: 375px;
  height: 740px;
  background: #11141a;
  border-radius: 44px;
  border: 8px solid #232a38;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 120px;
  height: 18px;
  background: #232a38;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.phone-screen-scrollable {
  flex: 1;
  overflow-y: auto;
  padding-top: 10px;
  background: var(--background-color);
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .admin-simulator-column {
    display: none;
  }
  .admin-editor-column {
    max-width: 100%;
  }
}

/* Sello de Bronce en Navbar */
.admin-brand-logo-seal {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Tarjeta de Previsualización WhatsApp con el Logo del Botón */
.link-whatsapp-rich-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.link-card-seal-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.link-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.link-card-site {
  font-size: 0.72rem;
  color: #c99846;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.link-card-headline {
  font-size: 0.92rem;
  color: #ffffff;
  font-family: var(--font-heading);
  margin: 0;
}

.link-card-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-domain {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}
