/* ═══════════════════════════════════════
   MASKCAM — SHARED STYLES
   Used by: index.html, login.html,
            register.html, dashboard.html
═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg:        #07111f;
  --surface:   #0c1a2e;
  --surface2:  #101f35;
  --border:    #1a3050;
  --accent:    #1d6ef5;
  --accent2:   #05c8e0;
  --glow:      rgba(29,110,245,0.32);
  --glow2:     rgba(5,200,224,0.18);
  --text:      #deeaff;
  --muted:     #5b7aaa;
  --danger:    #ef4444;
  --success:   #22c55e;
  --warning:   #f59e0b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(29,110,245,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,110,245,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── LOGO ── */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 20px;
  color: var(--text);
}
.logo .logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 18px var(--glow);
}
.logo em { color: var(--accent2); font-style: normal; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px;
  border-radius: 11px; border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all 0.22s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1558cc);
  color: #fff;
  box-shadow: 0 0 28px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 42px rgba(29,110,245,0.5);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12.5px; font-weight: 500;
  color: var(--muted); margin-bottom: 7px;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.form-group input {
  width: 100%; padding: 13px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder { color: var(--muted); opacity: 0.5; }
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 20px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s; z-index: 9999;
  max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-color: rgba(34,197,94,0.4); color: #86efac; }
#toast.error   { border-color: rgba(239,68,68,0.35); color: #fca5a5; }

/* ── MESSAGE BOX ── */
.msg {
  padding: 11px 16px; border-radius: 9px;
  font-size: 13px; margin-bottom: 16px;
  display: none; line-height: 1.5;
}
.msg.error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; display: block; }
.msg.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; display: block; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 20px var(--glow); }
  50%      { box-shadow: 0 0 45px rgba(29,110,245,0.6); }
}

.animate-fadeup { animation: fadeUp 0.5s ease both; }
.animate-fadein { animation: fadeIn 0.4s ease both; }

/* ── SHARED AUTH CARD ── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; z-index: 1;
}
.auth-glow-1 {
  position: fixed; width: 700px; height: 700px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(29,110,245,0.14) 0%, transparent 70%);
  top: -200px; left: -200px;
}
.auth-glow-2 {
  position: fixed; width: 500px; height: 500px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(5,200,224,0.1) 0%, transparent 70%);
  bottom: -100px; right: -100px;
}
.auth-card {
  background: rgba(12,26,46,0.88);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 48px 44px;
  width: 100%; max-width: 440px;
  box-shadow: 0 0 80px rgba(29,110,245,0.12), 0 40px 80px rgba(0,0,0,0.5);
  animation: fadeUp 0.5s ease;
}
.auth-card .logo { margin-bottom: 32px; }
.auth-divider {
  text-align: center; margin: 20px 0;
  font-size: 12px; color: var(--muted);
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 42%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer {
  text-align: center; margin-top: 22px;
  font-size: 13px; color: var(--muted);
}
.auth-footer a {
  color: var(--accent2); text-decoration: none; font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 22px; margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px; color: var(--muted); margin-bottom: 28px;
}

/* ── UTILITY ── */
.z1 { position: relative; z-index: 1; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
