/* ═══════════════════════════════════════════════
   Bridge App — Rural Village Hub Theme
   PvR Digital, Neduvasal
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Tiro+Tamil:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --green-dark:   #1b4d2e;
  --green-mid:    #2e7d4f;
  --green-light:  #4caf77;
  --green-pale:   #e8f5ee;
  --earth:        #8b6914;
  --earth-light:  #f5e6c8;
  --orange:       #e07b2a;
  --orange-light: #fff3e0;
  --sky:          #1565c0;
  --sky-light:    #e3f2fd;
  --red:          #c62828;
  --text-dark:    #1a2e1c;
  --text-mid:     #3d5c40;
  --text-muted:   #6b8f71;
  --bg-page:      #f4f7f4;
  --bg-white:     #ffffff;
  --border:       #c8ddc8;
  --shadow-sm:    0 2px 8px rgba(27,77,46,.10);
  --shadow-md:    0 4px 24px rgba(27,77,46,.14);
  --shadow-lg:    0 8px 48px rgba(27,77,46,.18);
  --r:            12px;
  --r-sm:         8px;
  --topbar-h:     40px;
}

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

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

/* ── TOP UTILITY BAR ─────────────────────────── */
.topbar {
  background: #0d1f10;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.topbar-home {
  font-size: .7rem;
  color: rgba(168,240,168,.75);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  transition: color .2s;
  justify-self: start;
}
.topbar-home:hover { color: #6effa8; }
.topbar-social { display: flex; align-items: center; gap: 8px; justify-content: center; }
.soc-ico {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: transform .2s;
}
.soc-ico:hover { transform: scale(1.2); }
.soc-ico svg { width: 12px; height: 12px; }
.portfolio-link {
  font-size: .65rem;
  font-weight: 600;
  color: #6effa8;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  animation: blink-glow 2.5s ease-in-out infinite;
  justify-self: end;
}
.portfolio-link svg { width: 9px; height: 9px; flex-shrink: 0; }
.portfolio-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6effa8;
  display: inline-block;
  animation: blink-dot 2.5s ease-in-out infinite;
}
@keyframes blink-glow { 0%,100%{opacity:1;text-shadow:0 0 8px rgba(110,255,168,.5);}50%{opacity:.4;text-shadow:none;} }
@keyframes blink-dot  { 0%,100%{opacity:1;transform:scale(1);}50%{opacity:.1;transform:scale(.4);} }

/* ── NAVBAR ──────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: .75rem 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-badge {
  background: var(--orange);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: .4px;
  text-transform: uppercase;
  vertical-align: middle;
}
.navbar .nav-link {
  color: rgba(255,255,255,.88) !important;
  font-weight: 500;
  font-size: .88rem;
  padding: .4rem .7rem !important;
  border-radius: var(--r-sm);
  transition: all .2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.15); }
.navbar .dropdown-menu {
  border: none;
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  background: var(--bg-white);
  padding: .5rem;
}
.navbar .dropdown-item {
  border-radius: var(--r-sm);
  font-size: .86rem;
  padding: .5rem .9rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: background .15s;
}
.navbar .dropdown-item:hover { background: var(--green-pale); color: var(--green-dark); }
.navbar .dropdown-item i { width: 18px; margin-right: 6px; color: var(--green-mid); }

/* ── HERO ────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, #0d2e14 0%, #1b5e32 40%, #2e7d4f 100%);
  color: #fff;
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  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");
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 20px;
  color: #a8e6b8;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero h1 span { color: #ffa040; }
.hero p { font-size: 1.05rem; opacity: .85; max-width: 520px; margin-bottom: 32px; line-height: 1.7; }
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #ffa040;
  line-height: 1;
}
.hero-stat .lbl { font-size: .72rem; opacity: .75; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* ── SECTION COMMONS ─────────────────────────── */
section { padding: 72px 0; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.25;
}
.section-sub { color: var(--text-muted); font-size: .95rem; max-width: 560px; }

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.card-icon-wrap.green  { background: var(--green-pale); }
.card-icon-wrap.orange { background: var(--orange-light); }
.card-icon-wrap.sky    { background: var(--sky-light); }
.card-icon-wrap.earth  { background: var(--earth-light); }

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-sm);
  padding: .6rem 1.4rem;
  font-size: .9rem;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(46,125,79,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46,125,79,.45); color: #fff; }
.btn-outline-primary { border: 2px solid var(--green-mid); color: var(--green-mid); background: transparent; font-weight: 700; border-radius: var(--r-sm); }
.btn-outline-primary:hover { background: var(--green-mid); color: #fff; }
.btn-orange { background: linear-gradient(135deg, var(--orange), #f59e0b); border: none; color: #fff; font-weight: 700; border-radius: var(--r-sm); }
.btn-orange:hover { opacity: .9; color: #fff; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; }

/* ── FORM STYLES ─────────────────────────────── */
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .88rem;
  color: var(--text-dark);
  padding: .55rem .85rem;
  background: var(--bg-white);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(46,125,79,.12);
  outline: none;
}
.form-control::placeholder { color: #9ab0a0; }
.form-check-input {
  width: 1.1em;
  height: 1.1em;
  margin-top: .15em;
  flex-shrink: 0;
  border: 2px solid var(--green-mid);
  border-radius: 4px;
  background-color: #fff;
  appearance: auto;
  -webkit-appearance: auto;
  cursor: pointer;
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked { background-color: var(--green-mid); border-color: var(--green-mid); }

/* ── MODAL CUSTOM ────────────────────────────── */
.modal-content { border: none; border-radius: var(--r); box-shadow: var(--shadow-lg); }
.modal-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: #fff;
  border-radius: var(--r) var(--r) 0 0;
  border-bottom: none;
  padding: 1.2rem 1.5rem;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; }
.modal-header .btn-close { filter: invert(1); }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; }

/* ── NAV PILLS (inside pages) ────────────────── */
.role-tabs .nav-link { border: 2px solid var(--border); border-radius: var(--r-sm); color: var(--text-mid); font-weight: 600; padding: .55rem 1.4rem; font-size: .88rem; }
.role-tabs .nav-link.active { background: var(--green-mid); border-color: var(--green-mid); color: #fff; }

/* ── WORK CATEGORY BADGES ────────────────────── */
.work-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  color: var(--green-dark);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 600;
  margin: 4px;
  white-space: nowrap;
}
.work-badge i { font-size: .75rem; color: var(--green-mid); }

/* ── WORKER CARD ─────────────────────────────── */
.worker-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  height: 100%;
}
.worker-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.worker-avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}
.worker-name { font-weight: 700; font-size: 1rem; color: var(--text-dark); }
.worker-skill { font-size: .78rem; color: var(--green-mid); font-weight: 600; }
.worker-area { font-size: .76rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.avail-badge {
  display: inline-block;
  font-size: .65rem; font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.avail-badge.weekday { background: var(--sky-light); color: var(--sky); }
.avail-badge.weekend { background: var(--orange-light); color: var(--orange); }
.avail-badge.all     { background: var(--green-pale);  color: var(--green-dark); }

/* ── STAT BOX ────────────────────────────────── */
.stat-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-box .num {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
}
.stat-box .lbl { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-top: 6px; text-transform: uppercase; letter-spacing: .4px; }

/* ── DISTRICT TABLE ──────────────────────────── */
.area-badge {
  display: inline-block;
  background: var(--sky-light);
  color: var(--sky);
  border: 1px solid rgba(21,101,192,.15);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  margin: 2px;
}

/* ── ALERT / NOTICE ──────────────────────────── */
.alert-village {
  background: var(--earth-light);
  border: 1.5px solid rgba(139,105,20,.2);
  border-radius: var(--r);
  color: var(--earth);
  font-size: .88rem;
  padding: 14px 18px;
}

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: #0a1a0c;
  color: rgba(255,255,255,.8);
  padding: 56px 0 0;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.footer-tagline { font-size: .82rem; color: rgba(255,255,255,.55); margin-top: 6px; line-height: 1.6; max-width: 280px; }
.footer-heading { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #6effa8; margin-bottom: 14px; }
.footer-link { color: rgba(255,255,255,.65); text-decoration: none; font-size: .85rem; display: block; margin-bottom: 8px; transition: color .2s; }
.footer-link:hover { color: #6effa8; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 40px;
  padding: 16px 0;
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: #6effa8; text-decoration: none; }

/* ── ADMIN SIDEBAR ───────────────────────────── */
.admin-sidebar {
  background: linear-gradient(180deg, var(--green-dark) 0%, #0d2e14 100%);
  min-height: 100vh;
  width: 240px;
  position: fixed;
  top: 0; left: 0;
  z-index: 900;
  padding: 0;
  overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.72) !important;
  font-size: .84rem;
  font-weight: 500;
  padding: .6rem 1.2rem !important;
  border-radius: var(--r-sm);
  margin: 2px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,.15) !important;
  color: #fff !important;
}
.admin-sidebar .nav-link i { width: 16px; }
.admin-main { margin-left: 240px; padding: 28px; min-height: 100vh; background: var(--bg-page); }
.admin-topbar { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
.admin-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 24px; }
.admin-stat-card { border-left: 4px solid var(--green-mid); }
.admin-stat-card.orange { border-left-color: var(--orange); }
.admin-stat-card.sky    { border-left-color: var(--sky); }
.admin-stat-card.earth  { border-left-color: var(--earth); }

/* ── TABLE ───────────────────────────────────── */
.table th { background: var(--green-pale); color: var(--green-dark); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--border); }
.table td { font-size: .86rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--green-pale); }
.badge-active   { background: var(--green-pale); color: var(--green-dark); border: 1px solid var(--border); font-weight: 600; padding: 3px 10px; border-radius: 20px; font-size: .72rem; }
.badge-pending  { background: var(--orange-light); color: var(--orange); border: 1px solid rgba(224,123,42,.2); font-weight: 600; padding: 3px 10px; border-radius: 20px; font-size: .72rem; }
.badge-inactive { background: #f5f5f5; color: #888; border: 1px solid #ddd; font-weight: 600; padding: 3px 10px; border-radius: 20px; font-size: .72rem; }

/* ── TOAST ───────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.my-toast { background: var(--green-dark); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-size: .85rem; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: slideIn .3s ease; max-width: 320px; }
.my-toast.success { background: var(--green-mid); }
.my-toast.error   { background: #c62828; }
.my-toast.info    { background: var(--sky); }
@keyframes slideIn { from{transform:translateX(120%);opacity:0} to{transform:translateX(0);opacity:1} }

/* ── SEARCH BOX ──────────────────────────────── */
.search-wrap { background: var(--bg-white); border: 1.5px solid var(--border); border-radius: 40px; display: flex; align-items: center; padding: 6px 6px 6px 18px; gap: 8px; box-shadow: var(--shadow-sm); }
.search-wrap input { border: none; outline: none; flex: 1; font-size: .9rem; color: var(--text-dark); background: transparent; }
.search-wrap input::placeholder { color: #9ab0a0; }
.search-wrap button { border-radius: 30px !important; }

/* ── UTILITY ─────────────────────────────────── */
.text-green { color: var(--green-mid); }
.text-earth { color: var(--earth); }
.bg-green-pale { background: var(--green-pale); }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.required::after { content: ' *'; color: var(--red); }

@media (max-width: 768px) {
  section { padding: 48px 0; }
  .hero { padding: 60px 0 48px; }
  .admin-sidebar { width: 100%; min-height: auto; position: relative; }
  .admin-main { margin-left: 0; padding: 16px; }
  .topbar { grid-template-columns: auto 1fr; gap: 6px; padding: 0 12px; }
  .portfolio-link { display: none; }
}
