/* ================================
   NAGARSEVA — SHARED STYLES
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

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

:root {
  --orange:        #EA580C;
  --orange-dark:   #C2410C;
  --orange-light:  #FFF7ED;
  --orange-mid:    #FED7AA;
  --text:          #1C1917;
  --text-muted:    #78716C;
  --text-subtle:   #A8A29E;
  --bg:            #FFFFFF;
  --bg-alt:        #FAFAF9;
  --border:        #E7E5E4;
  --border-strong: #D6D3D1;
  --green:         #16A34A;
  --green-light:   #DCFCE7;
  --red:           #DC2626;
  --red-light:     #FEE2E2;
  --yellow:        #CA8A04;
  --yellow-light:  #FEF9C3;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.06);
  --shadow:        0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 20px rgba(234,88,12,0.12);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

h1, h2, h3, h4, h5, .logo { font-family: 'Sora', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-up   { animation: fadeUp  0.5s ease both; }
.fade-up-2 { animation: fadeUp  0.5s ease 0.1s both; }
.fade-up-3 { animation: fadeUp  0.5s ease 0.2s both; }
.fade-up-4 { animation: fadeUp  0.5s ease 0.3s both; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all 0.18s ease; white-space: nowrap;
}
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-sm  { padding: 6px 14px;  font-size: 13px; }
.btn-xs  { padding: 4px 10px;  font-size: 12px; }

.btn-primary  { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline   { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-ghost { background: var(--orange-light); color: var(--orange); border-color: transparent; }
.btn-ghost:hover { background: var(--orange-mid); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #B91C1C; }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }

/* ---- NAVBAR ---- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px; height: 64px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 200;
}
.logo { font-size: 21px; font-weight: 700; color: var(--text); }
.logo span { color: var(--orange); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---- BADGES / PILLS ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-red    { background: var(--red-light);    color: #991B1B; }
.badge-green  { background: var(--green-light);  color: #14532D; }
.badge-yellow { background: var(--yellow-light); color: #713F12; }
.badge-orange { background: var(--orange-light); color: #9A3412; }
.badge-gray   { background: #F5F5F4;             color: #57534E; }
.badge-blue   { background: #EFF6FF;             color: #1E40AF; }

/* ---- STATUS BADGES ---- */
.status-reported   { background: var(--red-light);    color: #991B1B; }
.status-progress   { background: var(--yellow-light); color: #713F12; }
.status-fixed      { background: var(--green-light);  color: #14532D; }
.status-rejected   { background: #F5F5F4;             color: #57534E; }

/* ---- CATEGORY TAGS ---- */
.cat-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--orange-light); color: #9A3412;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-header h3 { font-size: 16px; font-weight: 600; }

/* ---- ISSUE CARD ---- */
.issue-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.issue-card:hover { border-color: var(--orange); box-shadow: var(--shadow-md); }
.issue-card .issue-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.issue-card .issue-body  { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.issue-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-subtle); }

/* ---- UPVOTE BTN ---- */
.upvote-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg);
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.upvote-btn:hover { border-color: var(--orange); color: var(--orange); }
.upvote-btn.active { background: var(--orange-light); border-color: var(--orange); color: var(--orange); }

/* ---- SIDEBAR LAYOUT ---- */
.app-layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 236px; flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-section { padding: 0 10px; margin-bottom: 6px; }
.sidebar-label {
  font-size: 10px; font-weight: 700; color: var(--text-subtle);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0 10px 8px; display: block;
}
.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: all 0.14s;
}
.sidebar-link:hover  { background: var(--bg-alt); color: var(--text); }
.sidebar-link.active { background: var(--orange-light); color: var(--orange); }
.sidebar-link .si { font-size: 16px; width: 20px; text-align: center; }
.sidebar-divider { height: 1px; background: var(--border); margin: 10px 10px; }

/* ---- MAIN CONTENT ---- */
.main-content { flex: 1; padding: 32px 40px; background: var(--bg-alt); min-height: calc(100vh - 64px); }
.page-title   { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-sub     { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

/* ---- STAT CARDS ---- */
.stat-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
}
.stat-card .sc-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.stat-card .sc-value { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 700; }
.stat-card .sc-change { font-size: 12px; margin-top: 5px; color: var(--green); }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  background: var(--bg); color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--orange); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- SEARCH BAR ---- */
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  transition: border-color 0.15s;
}
.search-wrap:focus-within { border-color: var(--orange); }
.search-wrap input { border: none; background: none; outline: none; font-size: 14px; font-family: inherit; flex: 1; color: var(--text); }
.search-wrap .search-icon { color: var(--text-subtle); font-size: 15px; }

/* ---- TABS ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--border); margin-bottom: 22px; }
.tab-btn {
  padding: 10px 16px; font-size: 14px; font-weight: 500;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.14s;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ---- GRIDS ---- */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---- UPLOAD ZONE ---- */
.upload-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 32px; text-align: center; color: var(--text-muted);
  font-size: 14px; cursor: pointer; transition: border-color 0.15s;
}
.upload-zone:hover { border-color: var(--orange); color: var(--orange); }

/* ---- AVATAR ---- */
.avatar {
  border-radius: 50%; background: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.av-lg { width: 68px; height: 68px; font-size: 26px; }
.av-md { width: 40px; height: 40px; font-size: 16px; }
.av-sm { width: 30px; height: 30px; font-size: 12px; }

/* ---- LEADERBOARD ---- */
.lb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  transition: background 0.14s;
}
.lb-row:hover { background: var(--bg-alt); }
.lb-rank { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 700; width: 28px; text-align: center; color: var(--text-subtle); }
.lb-rank.gold   { color: #D97706; }
.lb-rank.silver { color: #9CA3AF; }
.lb-rank.bronze { color: #B45309; }
.lb-name { flex: 1; font-weight: 500; font-size: 14px; }
.lb-pts  { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--orange); font-size: 14px; }

/* ---- AUTH PAGE ---- */
.auth-page {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg-alt); padding: 40px 20px;
}
.auth-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow);
}
.auth-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.auth-box .auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 26px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }
.auth-foot a { color: var(--orange); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.divider span { font-size: 13px; color: var(--text-subtle); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- MAP PLACEHOLDER ---- */
.map-placeholder {
  background: #E7F0E8; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  color: var(--text-muted); font-size: 14px;
}

/* ---- ADMIN TABLE ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; padding: 10px 16px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-alt); }

/* ---- MISC ---- */
.sep { height: 1px; background: var(--border); margin: 16px 0; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .es-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* ---- FOOTER ---- */
.footer {
  background: var(--text); color: #fff;
  padding: 48px 60px 28px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-logo { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.footer-logo span { color: var(--orange); }
.footer p { font-size: 14px; color: #A8A29E; line-height: 1.7; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13px; color: #A8A29E; transition: color 0.15s; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid #292524; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 13px; color: #78716C; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .navbar  { padding: 0 20px; }
  .nav-links { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; top: 0; display: flex; overflow-x: auto; padding: 10px; gap: 4px; }
  .main-content { padding: 20px; }
}
