/* ============================================
   Lahore Jobs - Main Stylesheet
   Step 1: Authentication & Layout
   ============================================ */

/* ===== CSS Variables ===== */
:root {
  --primary: #0F4C81;
  --primary-dark: #0A3A63;
  --primary-light: #1A6BB5;
  --secondary: #00AEEF;
  --accent: #F9A826;
  --accent-hover: #E0941B;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(15, 76, 129, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 76, 129, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(15, 76, 129, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 76, 129, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Auth Pages Layout ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--bg) 50%, rgba(0, 174, 239, 0.05) 100%);
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(15, 76, 129, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 800;
}
.auth-logo-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}
.auth-logo-text span { color: var(--secondary); }

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-medium);
  text-align: center;
  margin-bottom: 28px;
}

/* ===== Form Styles ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.1);
}
.form-control::placeholder { color: var(--text-light); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1); }

.invalid-feedback {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.form-control.is-invalid + .invalid-feedback { display: block; }

.input-group {
  position: relative;
}
.input-group-text {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  background: none;
  border: none;
  padding: 4px;
}
.input-group-text:hover { color: var(--primary); }

/* ===== Buttons ===== */
.btn-auth {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary-auth {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.3);
}
.btn-primary-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 76, 129, 0.4);
}
.btn-accent-auth {
  background: linear-gradient(135deg, var(--accent), #FFB84D);
  color: white;
  box-shadow: 0 4px 14px rgba(249, 168, 38, 0.3);
}
.btn-accent-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 168, 38, 0.4);
}

/* ===== Auth Footer ===== */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-medium);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ===== Role Toggle (Candidate vs Employer) ===== */
.role-toggle {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.role-toggle a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-medium);
  transition: var(--transition);
}
.role-toggle a.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.role-toggle a:hover:not(.active) { color: var(--primary); }

/* ===== Flash Messages ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16A34A;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.alert-info {
  background: rgba(0, 174, 239, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(0, 174, 239, 0.2);
}
.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===== Admin Login Page ===== */
.admin-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
}
.admin-auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.admin-auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ===== Dashboard Layout ===== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--text-dark);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
}
.sidebar-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
}
.sidebar-brand-text span { color: var(--secondary); }

.sidebar-user {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user-name {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}
.sidebar-user-role {
  font-size: 12px;
  color: var(--text-light);
}

.sidebar-nav { list-style: none; padding: 16px 0; margin: 0; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: white;
  background: rgba(255,255,255,0.05);
  border-left-color: var(--secondary);
}
.sidebar-nav a i { width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-footer a:hover { color: var(--danger); }

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 30px;
  background: var(--bg);
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}
.page-breadcrumb {
  font-size: 13px;
  color: var(--text-light);
}
.page-breadcrumb a { color: var(--text-medium); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--primary); }

/* ===== Stats Cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.stat-icon.blue { background: rgba(0, 174, 239, 0.1); color: var(--secondary); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-icon.orange { background: rgba(249, 168, 38, 0.1); color: var(--accent); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
  .auth-card { padding: 28px 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 20px; }
}
