/* ============================================================
   KaamMitra – Auth Pages Stylesheet
   File: assets/css/auth.css
   Used by: provider/register.php, provider/login.php,
            user/register.php, user/login.php, admin/login.php
============================================================ */

:root {
  --brand:        #2557a7;
  --brand-dark:   #1a3f7a;
  --brand-light:  #e8f0fd;
  --accent:       #ff6b35;
  --accent-dark:  #e05520;
  --accent-light: #fff3ee;
  --success:      #1a9e5c;
  --success-bg:   #e6f7ee;
  --warn:         #e07c00;
  --warn-bg:      #fff8e6;
  --error:        #c0392b;
  --error-bg:     #fdecea;
  --text-dark:    #1a1a2e;
  --text-mid:     #3d4155;
  --text-mute:    #6b7280;
  --border:       #dde3ee;
  --bg-light:     #f5f7fc;
  --shadow-sm:    0 2px 8px rgba(37,87,167,.10);
  --shadow-md:    0 4px 20px rgba(37,87,167,.14);
  --shadow-lg:    0 8px 40px rgba(37,87,167,.18);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --font-head:    'Baloo 2', sans-serif;
  --font-body:    'Nunito', sans-serif;
  --transition:   .22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.auth-body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: var(--font-body); }

/* ── Auth Navbar ──────────────────────────────────────────── */
.auth-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
}
.logo-text span { color: var(--accent); }
.auth-nav-right {
  font-size: .88rem;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link-btn {
  background: var(--brand);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .85rem;
  transition: var(--transition);
}
.nav-link-btn:hover { background: var(--brand-dark); }

/* ── Wrapper ─────────────────────────────────────────────── */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 20px 48px;
}

/* ── Auth Card ───────────────────────────────────────────── */
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  overflow: hidden;
}
.login-card  { max-width: 480px; }
.register-card { max-width: 780px; }

/* ── Auth Header ─────────────────────────────────────────── */
.auth-header {
  background: linear-gradient(135deg, #0d2456, #2557a7);
  padding: 32px 36px 28px;
  text-align: center;
}
.auth-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 auto 14px;
}
.auth-icon-blue { background: rgba(255,255,255,.2); }
.auth-header h1 {
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.auth-header p {
  color: #a8c0e8;
  font-size: .9rem;
}

/* ── Steps Bar ───────────────────────────────────────────── */
.steps-bar {
  display: flex;
  align-items: center;
  padding: 20px 36px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mute);
}
.step-item.active { color: var(--brand); }
.step-item.done   { color: var(--success); }
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.step-item.active .step-circle { border-color: var(--brand); color: var(--brand); }
.step-item.done   .step-circle { border-color: var(--success); background: var(--success); color: #fff; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 10px;
  max-width: 60px;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  margin: 20px 32px 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.alert i { margin-top: 1px; flex-shrink: 0; font-size: 1rem; }
.alert-success { background: var(--success-bg); color: #155a38; border: 1px solid #b7e4cc; }
.alert-error   { background: var(--error-bg);   color: #7b1e1e; border: 1px solid #f5b5b0; }
.alert-warning { background: var(--warn-bg);    color: #7a4000; border: 1px solid #f5d99a; }

/* ── Form Layout ─────────────────────────────────────────── */
.form-step {
  padding: 28px 32px;
}
.form-section-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.req { color: var(--error); margin-left: 3px; }
.label-link {
  font-size: .8rem;
  color: var(--brand);
  font-weight: 600;
}
.label-link:hover { text-decoration: underline; }

/* ── Input styles ────────────────────────────────────────── */
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > i:first-child {
  position: absolute;
  left: 12px;
  color: var(--text-mute);
  font-size: .9rem;
  pointer-events: none;
  z-index: 1;
}
.input-icon input,
.input-icon select,
.input-icon textarea {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text-dark);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.input-icon textarea {
  resize: vertical;
  min-height: 80px;
  padding-top: 10px;
}
.input-icon input:focus,
.input-icon select:focus,
.input-icon textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,87,167,.1);
}
.input-icon input.is-error,
.input-icon select.is-error { border-color: var(--error); }
.input-icon input.is-error:focus,
.input-icon select.is-error:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.1); }

.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px;
  font-size: .9rem;
}
.pw-toggle:hover { color: var(--brand); }

.field-error {
  font-size: .78rem;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-hint {
  font-size: .77rem;
  color: var(--text-mute);
}

/* ── Upload area ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: var(--bg-light);
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}
.upload-area.uploaded {
  border-color: var(--success);
  background: var(--success-bg);
}
.upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.upload-icon {
  font-size: 1.8rem;
  color: var(--brand);
  margin-bottom: 6px;
}
.upload-area.uploaded .upload-icon { color: var(--success); }
.upload-text {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.upload-hint {
  font-size: .78rem;
  color: var(--text-mute);
}

/* ── Info boxes ──────────────────────────────────────────── */
.info-box {
  background: var(--brand-light);
  border: 1px solid #b8cef5;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex;
  gap: 12px;
  font-size: .85rem;
  color: var(--brand-dark);
  line-height: 1.55;
  margin-bottom: 16px;
}
.info-box i { color: var(--brand); font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.info-box-warn {
  background: var(--warn-bg);
  border-color: #f5d99a;
  color: #7a4000;
}
.info-box-warn i { color: var(--warn); }

/* ── Checkbox ────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .87rem;
  color: var(--text-mid);
  line-height: 1.5;
  cursor: pointer;
  font-weight: 400;
}
.checkbox-label input[type=checkbox] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.checkbox-label a { color: var(--brand); font-weight: 600; }
.checkbox-label a:hover { text-decoration: underline; }

/* ── Step nav ────────────────────────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--brand); background: var(--brand-light); }
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 1rem;
}
.btn-submit { width: auto; min-width: 200px; justify-content: center; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ── Login-specific ──────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 32px;
  color: var(--text-mute);
  font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-alt-links {
  margin: 0 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alt-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.alt-link:hover { border-color: var(--brand); background: var(--brand-light); }
.alt-link > i:first-child {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.alt-link div { flex: 1; }
.alt-link div strong { display: block; font-size: .88rem; color: var(--text-dark); }
.alt-link div span { font-size: .8rem; color: var(--text-mute); }
.alt-link > i:last-child { color: var(--text-mute); font-size: .8rem; }

.login-link {
  text-align: center;
  font-size: .85rem;
  color: var(--text-mute);
  margin-top: 16px;
}
.login-link a { color: var(--brand); font-weight: 700; }
.login-link a:hover { text-decoration: underline; }

/* Login card form padding */
.login-card form {
  padding: 28px 32px 0;
}

/* ── Auth Footer ─────────────────────────────────────────── */
.auth-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-mute);
}
.auth-footer a { color: var(--brand); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-wrapper { padding: 20px 12px 40px; }
  .auth-header { padding: 24px 20px 20px; }
  .form-step { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .steps-bar { padding: 16px 20px; gap: 0; }
  .step-item span { display: none; }
  .step-line { max-width: 30px; }
  .alert { margin: 16px 16px 0; }
  .auth-divider,
  .auth-alt-links { margin-left: 16px; margin-right: 16px; }
  .login-card form { padding: 20px 16px 0; }
  .login-card .auth-alt-links { margin-bottom: 20px; }
}
