/* ============================================
   R3i-Rohire — Global Styles
   Corporate clean (Google-inspired)
   ============================================ */

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

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #1a73e8;
  --blue-dark:  #1557b0;
  --blue-light: #e8f0fe;
  --red:        #ea4335;
  --green:      #34a853;
  --yellow:     #fbbc04;
  --bg:         #f8f9fa;
  --surface:    #ffffff;
  --border:     #e0e0e0;
  --text:       #202124;
  --text-muted: #5f6368;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--blue); }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* --- Navbar --- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.navbar-logo img { height: 32px; }
.navbar-logo span {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
}
.navbar-actions { display: flex; gap: 12px; align-items: center; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,115,232,.35); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-light); text-decoration: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }
.btn-full { width: 100%; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #c5221f; color: #fff; text-decoration: none; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 24px; }
.card-sm .card-body { padding: 16px; }

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
}
.badge-blue  { background: var(--blue-light); color: var(--blue); }
.badge-green { background: #e6f4ea; color: #188038; }
.badge-red   { background: #fce8e6; color: #c5221f; }
.badge-yellow{ background: #fef7e0; color: #a16b00; }
.badge-gray  { background: #f1f3f4; color: var(--text-muted); }

/* --- Tag chips --- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Form styles --- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.form-input::placeholder { color: #9aa0a6; }

/* --- Search bar --- */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 10px 20px;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.search-bar:focus-within {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(26,115,232,.15);
}
.search-bar input {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  flex: 1;
  background: transparent;
  color: var(--text);
}
.search-bar .search-icon { color: var(--text-muted); font-size: 18px; }

/* --- Filter chips --- */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
  color: var(--text-muted);
  user-select: none;
}
.chip:hover, .chip.active {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}

/* --- Avatar --- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* --- Company logo box --- */
.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* --- Match score --- */
.match-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}
.match-score .score-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* --- Section headings --- */
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* --- Grid layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* --- Dashboard layout --- */
.dashboard-layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  margin-bottom: 2px;
}
.sidebar-nav-item:hover, .sidebar-nav-item.active {
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
}
.sidebar-nav-item.active { font-weight: 600; }
.sidebar-icon { font-size: 18px; }
.main-content { flex: 1; padding: 32px; overflow-y: auto; }

/* --- Stats bar --- */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* --- Auth page --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f0fe 100%);
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
}
.auth-logo { margin-bottom: 24px; }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* --- Footer --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand p { font-size: 14px; color: var(--text-muted); margin-top: 12px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.footer-col a:hover { color: var(--blue); text-decoration: none; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .stats-bar { flex-wrap: wrap; }
}
