/**
 * Rajshahi To-Let - Authentication Stylesheet (Mobile-First Vanilla CSS)
 * Pure CSS3 • No Framework Dependencies
 */

:root {
  --bg-primary: #090d16;
  --bg-surface: #131b2e;
  --bg-elevated: #1e293b;
  --border-color: #334155;
  --border-focus: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --color-primary: #10b981;
  --color-primary-hover: #059669;
  --color-accent: #06b6d4;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hind Siliguri", "Kalpurush", sans-serif;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.auth-logo svg {
  width: 26px;
  height: 26px;
  color: #ffffff;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Flash Messages & Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.alert-info {
  background-color: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #a5f3fc;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--color-danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
}

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.invalid-feedback {
  font-size: 12px;
  color: #f87171;
  margin-top: 5px;
  display: block;
}

/* Password Toggle Field */
.password-input-group {
  position: relative;
}

.password-input-group .form-control {
  padding-right: 42px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

/* Radio Group for User Type */
.user-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.user-type-option {
  position: relative;
}

.user-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.user-type-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.user-type-option input[type="radio"]:checked + .user-type-label {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: var(--color-primary);
  color: #34d399;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-secondary {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
}

.btn-secondary:hover {
  background-color: #273549;
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Links & Footer */
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a, .auth-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover, .auth-link:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

/* Simple Navigation Header */
.site-nav {
  background-color: rgba(19, 27, 46, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
}

.site-nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.site-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav-links a:hover {
  color: #ffffff;
}

.site-nav-links a.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Profile Page Layout */
.profile-container {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.profile-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.profile-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.profile-avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.profile-meta h2 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 2px;
}

.profile-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

@media (max-width: 480px) {
  .auth-card, .profile-card {
    padding: 24px 18px;
  }
  .user-type-selector {
    grid-template-columns: 1fr;
  }
}
