:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f1f3f8;
    --text: #1d2330;
    --muted: #667085;
    --line: #dde3ec;
    --accent: #8b1e3f;
    --accent-2: #5f122a;
    --success: #0f9d58;
    --danger: #c62828;
    --warning: #b26a00;
    --shadow: 0 12px 30px rgba(21, 31, 56, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: linear-gradient(180deg, #fafbfe 0%, var(--bg) 100%);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.site-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--line);
    z-index: 100;
}
.brand { display: flex; gap: 0.8rem; align-items: center; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #bf5575); color: white; font-size: 1.4rem;
    box-shadow: var(--shadow);
}
.brand-title { font-weight: 800; }
.brand-subtitle, .muted { color: var(--muted); font-size: 0.92rem; }
.main-nav { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.main-nav a { padding: 0.65rem 0.9rem; border-radius: 999px; color: var(--muted); }
.main-nav a.active, .main-nav a:hover { background: var(--surface-2); color: var(--text); }
.header-user { display: flex; gap: 0.75rem; align-items: center; }
.user-chip { display: flex; gap: 0.6rem; align-items: center; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700;
}
.avatar-image {
    display: block;
    object-fit: cover;
    border: 1px solid rgba(221, 227, 236, 0.9);
}
.avatar-fallback {
    flex-shrink: 0;
}
.user-name { font-weight: 700; }
.user-role { font-size: 0.85rem; color: var(--muted); }

.page-shell { padding: 1.25rem; max-width: 1440px; margin: 0 auto; }
.card {
    background: var(--surface);
    border: 1px solid rgba(221, 227, 236, 0.7);
    border-radius: var(--radius);
    padding: 1.15rem;
    box-shadow: var(--shadow);
}
.hero-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.hero-card h1 { margin: 0.25rem 0 0.6rem; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.hero-metrics { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.metric {
    min-width: 140px; padding: 1rem; border-radius: 16px; background: linear-gradient(180deg, #fff8fa, #fff); border: 1px solid #f0d7df;
}
.metric strong { display: block; font-size: 1.8rem; color: var(--accent); }
.metric span { color: var(--muted); font-size: 0.9rem; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-head { margin-bottom: 0.65rem; }
.section-head h2, .page-header h1 { margin: 0; }
.card-header { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; }
.badge {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 0.3rem 0.65rem; font-size: 0.82rem; font-weight: 700;
}
.badge-muted { background: #eef2f7; color: #44506a; }
.badge-success { background: #e6f7ee; color: var(--success); }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-warning { background: #fff3e0; color: var(--warning); }
.list-stack { display: grid; gap: 0.9rem; }
.list-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.compact-card h3, .compact-card h2, .event-card h3 { margin-top: 0; }
.attendance-actions, .inline-actions, .admin-links, .auth-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    border: 0; border-radius: 12px; padding: 0.8rem 1rem; cursor: pointer; font-weight: 700;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #bf5575); color: white; }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-success { background: #e6f7ee; color: var(--success); }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-warning { background: #fff3e0; color: var(--warning); }
.btn-full { width: 100%; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.9rem 0.75rem; text-align: left; border-bottom: 1px solid var(--line); }
.simple-list { margin: 0; padding-left: 1.1rem; }
.notice { margin-top: 1rem; color: var(--muted); }
.auth-page { max-width: 640px; margin: 0 auto; }
.stack-form { display: grid; gap: 1rem; }
.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}
.field span { font-weight: 700; }
.field input,
.field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: #fff;
    color: var(--text);
    font: inherit;
}
.field textarea {
    resize: vertical;
    min-height: 140px;
}
.field input:focus,
.field textarea:focus {
    outline: 2px solid rgba(139, 30, 63, 0.16);
    border-color: var(--accent);
}
.alert {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success {
    background: #e9f8ef;
    border-color: #c4ead1;
    color: #17663a;
}
.alert-danger {
    background: #fff0f0;
    border-color: #f3caca;
    color: #9f2b2b;
}
.site-footer {
    border-top: 1px solid var(--line); padding: 1rem 1.25rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
@media (max-width: 980px) {
    .site-header, .hero-card, .list-card { flex-direction: column; align-items: stretch; }
    .two-col, .three-col { grid-template-columns: 1fr; }
    .main-nav { justify-content: center; }
}


.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border: 1px solid #d9dce3;
    border-radius: 14px;
    background: #ffffff;
    color: #1f2a44;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-google:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-color: #c7ccd8;
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: #f3f5f9;
    color: #c52233;
    font-weight: 700;
    font-family: Arial, sans-serif;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(180, 20, 60, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(20, 33, 61, 0.08), transparent 35%),
        #f4f5f7;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 26px 20px 18px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.10);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    animation: authCardIn 0.55s ease-out forwards;
}

@keyframes authCardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-eyebrow {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7a1d2a;
    opacity: 0;
    transform: translateX(-8px);
    animation: authTextIn 0.45s ease-out 0.15s forwards;
}

.auth-title {
    margin: 0 0 22px;
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 700;
    color: #14213d;
    opacity: 0;
    transform: translateX(-8px);
    animation: authTextIn 0.45s ease-out 0.25s forwards;
}

@keyframes authTextIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 62px;
    padding: 0 18px;
    background: #f8f8f8;
    border: 1px solid #d9dce3;
    border-radius: 16px;
    color: #14213d;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: authButtonIn 0.45s ease-out 0.35s forwards;
}

@keyframes authButtonIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.google-btn:hover {
    background: #ffffff;
    border-color: #c7ccd6;
    box-shadow: 0 10px 24px rgba(20, 33, 61, 0.10);
    transform: translateY(-2px);
}

.google-btn:active {
    transform: translateY(0);
}

.google-btn__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #db4437;
    flex: 0 0 34px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.google-btn:hover .google-btn__icon {
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.auth-card {
  max-width: 760px;
  margin: 40px auto;
  padding: 28px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.auth-eyebrow {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8d1d3d;
}

.auth-title {
  margin: 0 0 28px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  color: #1f2937;
}

.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid #d7dce3;
  background: #fff;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  border-color: #bfc7d2;
}

.social-btn:active {
  transform: translateY(0);
}

.social-btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.25);
  outline-offset: 2px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

@media (max-width: 700px) {
  .social-buttons {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 22px;
    border-radius: 18px;
  }

  .social-btn {
    font-size: 17px;
  }
}
