@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --bg: #000000;
  --panel: rgba(10, 10, 12, 0.7);
  --text: #ffffff;
  --muted: #888888;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #22c55e;
  --accent-glow: rgba(34, 197, 94, 0.4);
  --accent-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.04), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.02), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.02), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.container {
  min-height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.card {
  width: min(480px, 100%);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 32px 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

.mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2);
  flex: 0 0 48px;
  position: relative;
  overflow: hidden;
}

.mark::after {
  content: '';
  position: absolute;
  top: 0; left: -50%; width: 200%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.card:hover .mark::after {
  left: 125%;
}

.mark span {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.brand h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.03em;
}

.input {
  height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 20, 0.4);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.input:hover {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(8, 10, 20, 0.5);
}

.input:focus {
  border-color: var(--accent);
  background: rgba(8, 10, 20, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
  filter: brightness(0.95);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.roles {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.roles h2 {
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.role {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(8, 10, 20, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.role:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(8, 10, 20, 0.35);
  transform: translateY(-1px);
}

.role input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.role span {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.role:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.1);
}

.role:has(input:checked) span {
  color: #ffffff;
}

.error {
  margin-top: 14px;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.15);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  display: none;
}

/* Light Mode Overrides for Login */
body.light-mode {
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.85);
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

body.light-mode {
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.03), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.01), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.01), transparent 50%);
}

body.light-mode .brand h1 {
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .label {
  color: #334155;
}

body.light-mode .input {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

body.light-mode .input::placeholder {
  color: rgba(100, 116, 139, 0.5);
}

body.light-mode .input:hover {
  border-color: rgba(34, 197, 94, 0.3);
  background: #ffffff;
}

body.light-mode .input:focus {
  background: #ffffff;
  border-color: var(--accent);
}

body.light-mode .role {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.6);
}

body.light-mode .role:hover {
  border-color: rgba(34, 197, 94, 0.3);
  background: #ffffff;
}

body.light-mode .role span {
  color: #334155;
}

body.light-mode .role:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.05);
}

body.light-mode .role:has(input:checked) span {
  color: #0f172a;
}
