/**
 * Leader attendance capture — light luxury shell inspired by LG ministry polish
 * (gold / royal accents, grid texture) on a warm light canvas.
 */

.lg-att-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
  background: rgba(30, 45, 60, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.lg-att-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lg-att-modal {
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(165deg, #fffefb 0%, #f6f2ea 48%, #f0ebe3 100%);
  border: 1px solid rgba(201, 162, 39, 0.28);
  box-shadow:
    0 24px 48px rgba(30, 58, 95, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  position: relative;
}

.lg-att-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: inherit;
  opacity: 0.85;
}

.lg-att-modal-hd {
  position: relative;
  z-index: 1;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent);
}

.lg-att-modal-kicker {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b6914;
  margin: 0 0 6px;
}

.lg-att-modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 40px;
}

.lg-att-modal-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.lg-att-week-pill {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.18), rgba(30, 58, 95, 0.08));
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.12);
}

.lg-att-week-pill strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: -0.02em;
}

.lg-att-week-pill span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.lg-att-modal-bd {
  position: relative;
  z-index: 1;
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.lg-att-field {
  margin-bottom: 16px;
}

.lg-att-field label.lg-att-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 8px;
}

.lg-att-date {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(30, 58, 95, 0.15);
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(30, 58, 95, 0.06);
}

.lg-att-seg {
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: rgba(30, 58, 95, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.1);
}

.lg-att-seg button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lg-att-seg button.is-on {
  background: #fff;
  color: #1e3a5f;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.1);
}

.lg-att-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(30, 58, 95, 0.15);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.lg-att-roster {
  border-radius: 14px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  background: rgba(255, 255, 255, 0.55);
  max-height: 280px;
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lg-att-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.07);
  background: rgba(255, 255, 255, 0.4);
}

.lg-att-row:last-child {
  border-bottom: none;
}

.lg-att-row-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.lg-att-pa {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.lg-att-pa button {
  min-width: 44px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.lg-att-pa button:active {
  transform: scale(0.96);
}

.lg-att-pa .lg-att-p {
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.45);
}

.lg-att-pa .lg-att-p.is-sel {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.lg-att-pa .lg-att-a {
  background: linear-gradient(180deg, #fef2f2, #fee2e2);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.4);
}

.lg-att-pa .lg-att-a.is-sel {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.lg-att-pa button:not(.is-sel) {
  opacity: 0.55;
}

.lg-att-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.lg-att-modal-ft {
  position: relative;
  z-index: 1;
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(30, 58, 95, 0.1);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.5), transparent);
}

.lg-att-modal-ft .btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
  border-color: rgba(30, 58, 95, 0.5);
  color: #fff;
  font-weight: 700;
}

.lg-att-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

/* Page: slightly warmer canvas behind leader shell */
body.leader-dash-light-page {
  background: linear-gradient(180deg, #faf8f4 0%, #f3efe8 55%, #ebe6dd 100%);
  min-height: 100vh;
}
