/* public/css/style.css
   Shared styling for the AUM Alumni Portal across all three areas:
   admin, alumni self-service, and public directory.
   Color palette sampled directly from the official AUM logo/seal:
   deep maroon text and accents, bronze/gold seal tone, cream backgrounds. */

:root {
  --aum-maroon: #80111a;       /* primary brand color, from the AUM wordmark */
  --aum-maroon-dark: #5c0c13;  /* hover/active state */
  --aum-bronze: #946838;       /* accent, from the seal's gold/bronze tone */
  --aum-bronze-dark: #7a5429;
  --aum-gray: #6b7280;
  --aum-cream: #faf7f2;        /* warm off-white background, echoes the seal's parchment tone */
  --aum-border: #e6ded2;
  --aum-success: #1e9e6e;
  --aum-danger: #c0392b;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: var(--aum-cream);
  color: #2b2320;
}

a { color: var(--aum-maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--aum-maroon);
  color: white;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.topbar .brand img.logo-seal {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  background: white;
  padding: 2px;
}

.topbar .brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--aum-bronze);
}

.topbar nav a {
  color: white;
  margin-left: 18px;
  font-size: 0.92rem;
  opacity: 0.9;
}
.topbar nav a:hover { opacity: 1; text-decoration: underline; }

.topbar .session-info {
  font-size: 0.85rem;
  opacity: 0.85;
}

.container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px;
}

.card {
  background: white;
  border: 1px solid var(--aum-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card h2 {
  margin-top: 0;
  color: var(--aum-maroon);
  font-size: 1.25rem;
  border-bottom: 3px solid var(--aum-bronze);
  padding-bottom: 10px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
}
.tabs a {
  padding: 10px 20px;
  background: var(--aum-cream);
  color: var(--aum-maroon);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.tabs a:hover { text-decoration: none; }
.tabs a.active {
  background: var(--aum-bronze);
  color: white;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--aum-maroon);
  margin-bottom: 4px;
}

input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel],
input[type=file], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--aum-border);
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 14px;
  font-family: inherit;
  background: white;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--aum-bronze);
  border-color: var(--aum-bronze-dark);
}

/* Compound field for the official AUM email: editable local part +
   fixed, read-only domain suffix, styled as one continuous input. */
.email-domain-field {
  display: flex;
  align-items: stretch;
  margin-bottom: 14px;
}
.email-domain-field input[type=text] {
  border-radius: 6px 0 0 6px;
  margin-bottom: 0;
  border-right: none;
  text-align: right;
}
.email-domain-field .domain-suffix {
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--aum-border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: var(--aum-cream);
  color: var(--aum-gray);
  font-size: 0.92rem;
  white-space: nowrap;
}

.btn {
  display: inline-block;
  background: var(--aum-bronze);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.btn:hover { background: var(--aum-bronze-dark); }
.btn.secondary { background: var(--aum-maroon); color: white; }
.btn.secondary:hover { background: var(--aum-maroon-dark); }
.btn.danger { background: var(--aum-danger); color: white; }
.btn.small { padding: 6px 14px; font-size: 0.82rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--aum-border); }
th { color: var(--aum-maroon); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover { background: var(--aum-cream); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.green { background: #e3f7ed; color: var(--aum-success); }
.badge.gray { background: #ececec; color: var(--aum-gray); }
.badge.bronze { background: #fdf1d8; color: var(--aum-bronze-dark); }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.alert.error { background: #fde8e8; color: var(--aum-danger); border: 1px solid #f6c1c1; }
.alert.success { background: #e3f7ed; color: var(--aum-success); border: 1px solid #b9e8d0; }

.login-wrap {
  max-width: 420px;
  margin: 80px auto;
  padding: 0 20px;
}

.login-wrap .login-logo {
  display: block;
  margin: 0 auto 20px;
  height: 90px;
  width: auto;
}

.photo-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--aum-bronze);
  background: var(--aum-cream);
}

.photo-circle.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aum-gray);
  font-size: 0.75rem;
  text-align: center;
}

.alumni-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-bar input, .search-bar select { margin-bottom: 0; max-width: 260px; }

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.directory-grid .card { text-align: center; padding: 20px 14px; }
.directory-grid .photo-circle { margin: 0 auto 12px; width: 90px; height: 90px; }

.footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--aum-gray);
  margin: 40px 0 20px;
}

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.checkbox-row input { width: auto; margin: 0; }
.checkbox-row label { margin: 0; font-weight: 500; }

.stat-box {
  background: white;
  border: 1px solid var(--aum-border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.stat-box .num { font-size: 1.8rem; font-weight: 700; color: var(--aum-maroon); }
.stat-box .label { font-size: 0.8rem; color: var(--aum-gray); margin-top: 4px; }

/* ===========================================================================
   Login page: full-bleed graduation-photo backdrop with the masthead and
   login panel arranged horizontally, side by side. Scoped under
   .login-page so it never affects other screens.
   =========================================================================== */

body.login-page {
  margin: 0;
  background: #1a0d0a; /* fallback shown briefly before the first photo loads */
  overflow-x: hidden;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.login-backdrop .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0;
  transition: opacity 2.4s ease-in-out;
}

.login-backdrop .slide.is-active {
  opacity: 1;
}

/* Darkens the upper area generally, with extra depth on the right where
   the panel sits, while keeping the photo's left side visible. */
.login-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(255deg, rgba(20,8,7,0.90) 0%, rgba(20,8,7,0.74) 32%, rgba(20,8,7,0.42) 58%, rgba(20,8,7,0.22) 100%);
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 6vw;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5vw;
  width: 100%;
}

.login-masthead {
  max-width: 540px;
  flex: 1 1 480px;
}

.login-masthead .seal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.login-masthead .seal-row .uni-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: rgba(255,255,255,0.95);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  letter-spacing: -0.01em;
  font-weight: 700;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
}

.login-masthead h1 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800;
  color: white;
  margin: 0 0 18px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 22px rgba(0,0,0,0.5);
}

.login-masthead h1 .accent {
  color: white;
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
}

.login-masthead .tagline-rule {
  width: 70px;
  height: 3px;
  background: var(--aum-bronze);
  margin-bottom: 20px;
  border-radius: 2px;
}

.login-masthead p.tagline {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.005em;
  color: rgba(255,255,255,0.88);
  line-height: 1.45;
  margin: 0;
  max-width: 480px;
}

.login-panel {
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 36px 36px 30px;
  width: 100%;
  max-width: 410px;
  flex: 0 0 410px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.45);
}

.login-panel .tabs { margin-bottom: 22px; }

.login-panel h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--aum-maroon);
  font-size: 1.3rem;
  border-bottom: 3px solid var(--aum-bronze);
  padding-bottom: 12px;
}

.login-panel label {
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

.login-panel .footer-note {
  color: var(--aum-gray);
  margin: 18px 0 0;
}

.login-dots {
  position: fixed;
  bottom: 24px;
  right: 6vw;
  left: auto;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.login-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  padding: 0;
}

.login-dots button.is-active {
  background: var(--aum-bronze);
  border-color: var(--aum-bronze);
}

@media (max-width: 1000px) {
  .login-row { flex-direction: column; align-items: stretch; gap: 36px; }
  .login-masthead { max-width: 100%; text-align: left; }
  .login-panel { max-width: 100%; flex: none; }
  .login-dots { display: none; }
}

@media (max-width: 600px) {
  .login-stage { padding: 36px 5vw 80px; }
  .login-masthead h1 { font-size: 2.3rem; }
  .login-masthead p.tagline { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .login-backdrop .slide { transition: none; }
}
