/* ===== ADMIN LOGIN ===== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--navy);
}

.login-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.login-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.login-card h1 {
  font-family: 'Assistant', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.login-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  font-family: 'Assistant', sans-serif;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
  transition: border-color var(--transition);
}

.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-muted);
}

.login-card .btn { margin-top: 12px; }

.login-card .error-msg {
  color: #e55;
  font-size: 0.8rem;
  display: none;
}

.login-card .error-msg.show {
  display: block;
}

/* ===== ADMIN HEADER ===== */
.admin-header {
  background: var(--navy-card);
  border-bottom: 1px solid var(--navy-border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header h1 {
  font-family: 'Assistant', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.admin-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  min-height: 34px;
  border-radius: 6px;
}

/* ===== ADMIN CONTAINER ===== */
.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ===== ADMIN ACTIONS ===== */
.admin-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.import-label {
  cursor: pointer;
}

/* ===== ADMIN SECTION ===== */
.admin-section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: 'Assistant', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-count {
  background: rgba(255,255,255,0.06);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== BLESSINGS LIST ===== */
.blessings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blessing-item {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color var(--transition);
}

.blessing-item:hover {
  border-color: rgba(255,255,255,0.12);
}

/* Top row: photo, name, date, status, actions - all in one line */
.blessing-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}

.blessing-item-photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.blessing-item-no-photo {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.blessing-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.blessing-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.blessing-item-phone {
  font-size: 0.75rem;
  color: var(--gold-light);
  direction: ltr;
  text-align: right;
  opacity: 0.7;
}

.blessing-item-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.blessing-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Dropdown for full content */
.blessing-item-dropdown {
  display: none;
  padding: 10px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
  width: 100%;
}

.blessing-item-dropdown.open {
  display: block;
}

.blessing-item-dropdown .blessing-full-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.blessing-item-toggle {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 6px;
  font-family: 'Assistant', sans-serif;
  opacity: 0.8;
  flex-shrink: 0;
}

.blessing-item-toggle:hover {
  opacity: 1;
}

.blessing-item-template {
  font-size: 0.7rem;
  color: var(--gold-light);
  background: var(--gold-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Status indicators */
.blessing-item.status-approved {
  border-right: 3px solid #2ecc71;
}

.blessing-item.status-rejected {
  border-right: 3px solid #e74c3c;
  animation: rejectedBlink 1s ease-in-out infinite;
  background: rgba(231,76,60,0.05);
}

@keyframes rejectedBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
  50% { box-shadow: 0 0 12px 2px rgba(231,76,60,0.2); background: rgba(231,76,60,0.1); }
}

/* Warning block inside rejected items */
.blessing-item-warning {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.warning-text {
  color: #e74c3c;
  font-size: 0.8rem;
  font-weight: 700;
}

.warning-reason {
  color: rgba(231,76,60,0.7);
  font-size: 0.7rem;
}

.warning-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #25D366;
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s;
}

.warning-whatsapp:hover {
  background: #1fb855;
}

.blessing-item.status-pending {
  border-right: 3px solid #f39c12;
  animation: pendingBlink 0.8s ease-in-out infinite;
}

@keyframes pendingBlink {
  0%, 100% {
    background: var(--navy-card);
    box-shadow: 0 0 0 0 rgba(243,156,18,0);
  }
  50% {
    background: rgba(243,156,18,0.15);
    box-shadow: 0 0 12px 2px rgba(243,156,18,0.3);
  }
}

/* Approved items should NOT blink */
.blessing-item.status-approved {
  animation: none !important;
}

.blessing-item-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.blessing-item-status.status-approved {
  color: #2ecc71;
  background: rgba(46,204,113,0.1);
}

.blessing-item-status.status-rejected {
  color: #e74c3c;
  background: rgba(231,76,60,0.1);
}

.blessing-item-status.status-pending {
  color: #f39c12;
  background: rgba(243,156,18,0.1);
}

.blessing-item-approve {
  background: rgba(46,204,113,0.15);
  border: 1px solid rgba(46,204,113,0.3);
  color: #2ecc71;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all var(--transition);
  white-space: nowrap;
}

.blessing-item-approve:hover {
  background: rgba(46,204,113,0.25);
  border-color: #2ecc71;
}

.blessing-item-delete {
  background: none;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.blessing-item-delete:hover {
  background: rgba(220,53,69,0.15);
  border-color: rgba(220,53,69,0.3);
  color: #e55;
}

/* ===== ADMIN LOADER ===== */
.admin-loader {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-loader p {
  margin-top: 16px;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto;
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* ===== ADMIN EMPTY ===== */
.admin-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CONFIRM DIALOG ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,8,16,0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.confirm-card h3 {
  font-family: 'Assistant', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.confirm-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
}

.confirm-actions .btn { flex: 1; }

.btn-danger {
  background: #c0392b;
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #e74c3c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header-actions {
    width: 100%;
  }
}
