/* ─── ARCHINEERS AUTH STYLES ─────────────────────────────────────────────── */
/* Shared by login.html and signup.html                                        */

:root {
  --ink:    #111418;
  --slate:  #2B3F4E;
  --teal:   #3D7A6F;
  --gold:   #B8924A;
  --dust:   #F0EDE6;
  --muted:  #8A9BA8;
  --line:   rgba(255,255,255,0.08);
  --card:   #1C2330;
  --error:  #E63946;
  --green:  #2DC653;
  --ff:     'Outfit', sans-serif;
  --ffi:    'Lora', serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff);
  background: var(--ink);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* Left — branding panel */
.auth-left {
  background: var(--slate);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.auth-left-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.auth-left-logo img {
  height: 36px;
  filter: brightness(0) invert(1);
}
.auth-left-logo-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.auth-left-mid {
  position: relative;
  z-index: 1;
}
.auth-left-headline {
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.auth-left-headline span {
  color: var(--teal);
}
.auth-left-sub {
  font-family: var(--ffi);
  font-style: italic;
  font-size: 18px;
  color: rgba(255,255,255,0.4);
}
.auth-left-bottom {
  position: relative;
  z-index: 1;
}
.auth-left-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-left-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.auth-left-feat::before {
  content: '✓';
  font-size: 10px;
  color: var(--teal);
  background: rgba(61,122,111,0.15);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Right — form panel */
.auth-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  overflow-y: auto;
}
.auth-form-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.auth-form-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.auth-form-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
}
.auth-form-sub a {
  color: var(--teal);
  transition: opacity 0.2s;
}
.auth-form-sub a:hover {
  opacity: 0.8;
}

/* ─── FORM ELEMENTS ───────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 16px;
  font-family: var(--ff);
  font-size: 14px;
  color: white;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--teal);
}
.form-input::placeholder {
  color: rgba(255,255,255,0.2);
}
.form-input.error {
  border-color: var(--error);
}
.form-input-wrap {
  position: relative;
}
.form-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  transition: color 0.2s;
}
.form-input-icon:hover {
  color: white;
}
.form-error {
  font-size: 11px;
  color: var(--error);
  margin-top: 5px;
  display: none;
}
.form-error.show {
  display: block;
}

/* ─── ROLE TYPE BUTTONS ───────────────────────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.role-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.role-btn:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}
.role-btn.active {
  border-color: var(--teal);
  background: rgba(61,122,111,0.1);
}
.role-btn-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.role-btn-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}
.role-btn-sub {
  font-size: 10px;
  color: var(--muted);
}
.role-btn.active .role-btn-name {
  color: var(--teal);
}

/* ─── DYNAMIC FORM SECTIONS ───────────────────────────────────────────────── */
.role-form-section {
  display: none;
  animation: fadeIn 0.3s ease;
}
.role-form-section.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CATEGORY SELECTOR ───────────────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}
.category-grid::-webkit-scrollbar { width: 3px; }
.category-grid::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 2px; }
.cat-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.cat-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: white;
}
.cat-btn.selected {
  border-color: var(--teal);
  background: rgba(61,122,111,0.1);
  color: var(--teal);
}
.cat-btn-icon { font-size: 14px; flex-shrink: 0; }
.subcategory-wrap {
  display: none;
  margin-bottom: 16px;
}
.subcategory-wrap.show { display: block; }
.subcategory-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.subcat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.subcat-chip {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.15s;
}
.subcat-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.subcat-chip.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

/* ─── SUBMIT BUTTON ───────────────────────────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover {
  background: #326358;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(61,122,111,0.3);
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-submit .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── DIVIDER ─────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ─── ALERT MESSAGES ──────────────────────────────────────────────────────── */
.auth-alert {
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 10px;
}
.auth-alert.show { display: flex; }
.auth-alert.error {
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  color: #E63946;
}
.auth-alert.success {
  background: rgba(45,198,83,0.1);
  border: 1px solid rgba(45,198,83,0.3);
  color: var(--green);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 24px; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}
