@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --md-primary: #1a73e8;
  --md-on-primary: #ffffff;
  --md-primary-container: #d3e3fd;
  --md-on-primary-container: #041e49;
  --md-surface: #f0f4ff;
  --md-surface-1: #e8edf8;
  --md-surface-2: #dfe5f2;
  --md-surface-3: #d6dcea;
  --md-on-surface: #1a1c1e;
  --md-on-surface-variant: #5f6368;
  --md-outline: #80868b;
  --md-outline-variant: #dadce0;
  --md-error: #d93025;
  --md-error-container: #fce8e6;
  --md-success: #1e8e3e;
  --md-success-container: #ceead6;
  --md-radius-sm: 12px;
  --md-radius-md: 16px;
  --md-radius-lg: 20px;
  --md-radius-xl: 32px;
  --md-radius-full: 100px;
}

body {
  font-family: 'Google Sans', 'Roboto', system-ui, sans-serif;
  background: var(--md-surface);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--md-on-surface);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 440px;
}

/* ═══════════════════════════════
   CARD — poster style
   ═══════════════════════════════ */
.card {
  background: #ffffff;
  border-radius: var(--md-radius-xl);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    0 4px 12px rgba(0,0,0,0.05),
    0 12px 40px rgba(0,0,0,0.08);
  overflow: hidden;
  animation: cardIn 0.5s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

/* ─── Hero Banner ─── */
.card-header {
  background:
    radial-gradient(ellipse 120% 80% at 20% 100%, rgba(66,133,244,0.6) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 80% 0%, rgba(138,180,248,0.4) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #1a73e8 0%, #1557b0 35%, #0d47a1 70%, #0a3280 100%);
  color: var(--md-on-primary);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated floating orbs */
.card-header::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138,180,248,0.2) 0%, rgba(138,180,248,0.05) 40%, transparent 70%);
  top: -140px;
  right: -100px;
  animation: floatOrb 6s ease-in-out infinite alternate;
}

.card-header::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 40%, transparent 70%);
  bottom: -100px;
  left: -70px;
  animation: floatOrb 8s ease-in-out 1s infinite alternate-reverse;
}

@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(12px, -8px) scale(1.08); }
}

/* Subtle mesh dots overlay */
.card-header .header-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 0;
}

.card-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1.25rem;
  letter-spacing: -0.25px;
  position: relative;
  z-index: 2;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.card-header p.subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.5rem;
  position: relative;
  z-index: 2;
}

.header-icon {
  font-size: 3rem;
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  line-height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 100%);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.25);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 0 rgba(255,255,255,0.1); }
  50% { box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 12px rgba(255,255,255,0); }
}

.card-content {
  padding: 1.75rem;
}

/* ═══════════════════════════════
   INFO FIELDS — big & bold
   ═══════════════════════════════ */
.info-field {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--md-radius-lg);
  margin-bottom: 0.625rem;
  background: var(--md-surface);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  animation: fieldIn 0.4s cubic-bezier(0.2, 0, 0, 1) both;
}

.info-field:nth-child(1) { animation-delay: 0.08s; }
.info-field:nth-child(2) { animation-delay: 0.16s; }
.info-field:nth-child(3) { animation-delay: 0.24s; }
.info-field:nth-child(4) { animation-delay: 0.32s; }

@keyframes fieldIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.info-field:hover {
  background: var(--md-surface-1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.info-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--md-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon.name {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.info-icon.phone {
  background: var(--md-success-container);
  color: #0d5320;
}
.info-icon.email {
  background: #feefc3;
  color: #5f4100;
}
.info-icon.duration {
  background: #f3e8fd;
  color: #4a2570;
}

.info-icon .material-icons {
  font-size: 1.75rem;
}

.info-details {
  flex: 1;
  min-width: 0;
}

.info-label {
  font-size: 0.8125rem;
  color: var(--md-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.info-value {
  font-size: 1.125rem;
  color: var(--md-on-surface);
  font-weight: 700;
  word-break: break-word;
  line-height: 1.3;
}

.info-value a {
  color: var(--md-primary);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.info-value a:hover {
  border-bottom-color: var(--md-primary);
}

/* ═══════════════════════════════
   LOADING
   ═══════════════════════════════ */
.loading {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--md-on-surface-variant);
}

.loading p {
  font-size: 1rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--md-outline-variant);
  border-top-color: var(--md-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1.25rem;
}

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

/* ═══════════════════════════════
   ERROR
   ═══════════════════════════════ */
.error-message {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--md-error);
}

.error-message .material-icons {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.error-message p {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
}

/* ═══════════════════════════════
   ADMIN: INPUT GROUPS
   ═══════════════════════════════ */
.input-group {
  margin-bottom: 1.125rem;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--md-on-surface-variant);
  margin-bottom: 0.625rem;
  font-weight: 500;
}

.input-group label .material-icons {
  font-size: 1.375rem;
  color: var(--md-primary);
}

.input-group input {
  width: 100%;
  padding: 1rem 1.125rem;
  border: 1.5px solid var(--md-outline-variant);
  border-radius: var(--md-radius-sm);
  font-size: 1.0625rem;
  font-family: inherit;
  color: var(--md-on-surface);
  background: var(--md-surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.input-group input::placeholder {
  color: var(--md-outline);
  font-weight: 400;
}

.input-group input:hover {
  border-color: var(--md-on-surface);
}

.input-group input:focus {
  border-color: var(--md-primary);
  border-width: 2px;
  padding: 0.96875rem 1.09375rem;
  background: #ffffff;
  box-shadow: none;
}

/* ═══════════════════════════════
   FIELD ROW (toggle + input)
   ═══════════════════════════════ */
.field-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: var(--md-radius-lg);
  margin-bottom: 0.375rem;
  transition: background 0.15s;
}

.field-row:hover {
  background: var(--md-surface);
}

.field-toggle {
  padding-top: 2.5rem;
}

.field-input {
  flex: 1;
}

.field-input .input-group {
  margin-bottom: 0;
}

/* ═══════════════════════════════
   TOGGLE SWITCH (Material 3)
   ═══════════════════════════════ */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--md-surface-3);
  border: 2px solid var(--md-outline);
  border-radius: var(--md-radius-full);
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--md-outline);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

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

.switch input:checked + .slider::before {
  transform: translateX(20px) translateY(-50%);
  background: var(--md-on-primary);
  width: 24px;
  height: 24px;
  left: 2px;
}

/* ═══════════════════════════════
   BUTTONS — big & bold
   ═══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--md-radius-full);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.1px;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}

.btn:hover::before { opacity: 0.08; }
.btn:active::before { opacity: 0.12; }

.btn .material-icons {
  font-size: 1.375rem;
}

.btn-primary {
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 2px 8px rgba(26,115,232,0.25);
}

.btn-primary:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 4px 16px rgba(26,115,232,0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transform: translateY(0);
}

.btn-secondary {
  background: var(--md-surface-2);
  color: var(--md-on-surface);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--md-surface-3);
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
  height: 52px;
}

/* ═══════════════════════════════
   STATUS MESSAGES
   ═══════════════════════════════ */
.save-status {
  text-align: center;
  padding: 0.875rem 1.25rem;
  border-radius: var(--md-radius-sm);
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  animation: statusIn 0.3s ease;
}

@keyframes statusIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.save-status.success {
  background: var(--md-success-container);
  color: #0d5320;
}

.save-status.error {
  background: var(--md-error-container);
  color: var(--md-error);
}

.field-error {
  color: var(--md-error);
  font-size: 0.9375rem;
  margin-top: 0.875rem;
  text-align: center;
  font-weight: 600;
}

/* ═══════════════════════════════
   EMPTY STATE
   ═══════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--md-on-surface-variant);
}

.empty-state .material-icons {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state p {
  font-size: 1rem;
  font-weight: 500;
}

/* ═══════════════════════════════
   ADMIN PANEL SPACING
   ═══════════════════════════════ */
#admin-panel > .card + .card,
#admin-panel .card.main-card + .card.main-card {
  margin-top: 1.25rem;
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 480px) {
  body { padding: 0.5rem; }
  .card { border-radius: 28px; }
  .card-header { padding: 2.25rem 1.5rem 2rem; }
  .card-header h1 { font-size: 1.5rem; }
  .header-icon { width: 72px; height: 72px; font-size: 2.5rem; }
  .card-content { padding: 1.25rem; }
  .info-field { padding: 1rem; gap: 1rem; }
  .info-icon { width: 48px; height: 48px; }
  .info-icon .material-icons { font-size: 1.5rem; }
  .info-label { font-size: 0.75rem; }
  .info-value { font-size: 1rem; }
  .field-row { padding: 0.625rem; }
}
