/* ============================================================
   DugsiHub — shared.css
   Reset, fonts, variables, and reusable components
   used by both index.html and home.html
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUpSm {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Shared badge component ── */
.badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}

.badge-green { background: rgba(45,90,39,0.1);   color: #2d5a27; }
.badge-amber { background: rgba(201,149,42,0.1);  color: #a07020; }
.badge-rose  { background: rgba(180,60,60,0.1);   color: #b43c3c; }
.badge-blue  { background: rgba(56,116,172,0.1);  color: #3874ac; }

/* ── Shared logo gem ── */
.logo-gem {
  width: 9px; height: 9px;
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Modal (used on home.html, shared for future use) ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(10,18,10,0.65);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  width: 100%; max-width: 480px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--deep, var(--text));
  margin-bottom: 0.25rem;
}

.modal-sub {
  font-size: 0.8rem; color: var(--muted);
  font-weight: 300; margin-bottom: 1.5rem;
}

.modal-field { margin-bottom: 1rem; }

.modal-field label {
  display: block;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem;
}

.modal-field input,
.modal-field select {
  width: 100%; padding: 0.78rem 1rem;
  background: rgba(45,90,39,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.modal-field input::placeholder { color: var(--muted); opacity: 0.55; }

.modal-field input:focus,
.modal-field select:focus {
  border-color: rgba(45,90,39,0.4);
  box-shadow: 0 0 0 3px rgba(45,90,39,0.07);
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.modal-actions {
  display: flex; gap: 0.75rem; margin-top: 1.5rem;
}

.modal-btn-save {
  flex: 1; padding: 0.82rem;
  background: var(--green); color: #fff;
  border: none; border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.16s;
}

.modal-btn-save:hover     { background: var(--green-mid); }
.modal-btn-save:disabled  { opacity: 0.6; cursor: not-allowed; }

.modal-btn-cancel {
  padding: 0.82rem 1.4rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem; cursor: pointer;
  transition: background 0.16s;
}

.modal-btn-cancel:hover { background: rgba(45,90,39,0.04); color: var(--text); }

#classMessage {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  text-align: center;
  min-height: 1em;
}

#classMessage.error   { color: var(--error); }
#classMessage.success { color: var(--success); }

/* ── Mobile modal tweaks ── */
@media (max-width: 768px) {
  .modal-box  { padding: 1.75rem 1.5rem; }
  .modal-row  { grid-template-columns: 1fr; }
}

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