/* ═══════════════════════════════════════════════════════════════
   WAI Member Roster — Warehousing Association of India
   ═══════════════════════════════════════════════════════════════ */
:root {
  --wai-primary:   #1c4a73;
  --wai-dark:      #0e2138;
  --wai-mid:       #16375a;
  --wai-accent:    #e8a33d;
  --wai-accent-dark: #c9821f;
  --wai-pale:      #eef2f7;
  --wai-pale-dark: #dbe4ee;
  --wai-text:      #1a2430;
  --wai-danger:    #dc3545;
  --wai-warning:   #f4a30a;
  --wai-success:   #28a745;
  --topbar-h:      64px;
}

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

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #f2f6f7;
  color: var(--wai-text);
  font-size: 14px;
}

a { color: var(--wai-primary); }

/* ── Top navbar ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 900;
  height: var(--topbar-h);
  background: linear-gradient(135deg, var(--wai-dark), var(--wai-mid));
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.navbar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.navbar-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: var(--wai-accent);
  object-fit: cover; object-position: top;
}
.navbar-title { font-size: 15px; font-weight: 800; line-height: 1.2; }
.navbar-sub { font-size: 10px; opacity: .7; }

.navbar-nav { display: flex; align-items: center; gap: 4px; }
.navbar-nav .nav-link {
  color: rgba(255,255,255,.82); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.navbar-nav .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.navbar-nav .nav-link.active { background: var(--wai-accent); color: #fff; }

.navbar-user { display: flex; align-items: center; gap: 10px; margin-left: 10px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--wai-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.mobile-menu-btn {
  display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
}

.content-area { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-pg, .btn-wai {
  background: var(--wai-primary); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font-weight: 600;
  font-size: 13px; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: background .15s;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-pg:hover, .btn-wai:hover { background: var(--wai-mid); color: #fff; }
.btn-pg.btn-sm, .btn-wai.btn-sm { padding: 5px 11px; font-size: 12px; }

.btn-outline-pg, .btn-outline-wai {
  background: transparent; color: var(--wai-primary);
  border: 2px solid var(--wai-primary);
  padding: 7px 15px; border-radius: 8px; font-weight: 600;
  font-size: 13px; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-outline-pg:hover, .btn-outline-wai:hover { background: var(--wai-pale); }

.btn-accent {
  background: var(--wai-accent); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font-weight: 600;
  font-size: 13px; font-family: 'Inter', sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-accent:hover { background: var(--wai-accent-dark); color: #fff; }

.btn-danger-soft {
  background: #fff1f1; color: var(--wai-danger); border: 1px solid #f5c6c6;
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid #e0eaee;
  border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.05);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px; border-bottom: 1px solid #eaf2f4;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; color: var(--wai-dark);
}
.card-body { padding: 16px 18px; }
.card-footer { padding: 10px 18px; border-top: 1px solid #eaf2f4; background: var(--wai-pale); }

/* ── Directory hero ───────────────────────────────────────────── */
.dir-hero {
  background: linear-gradient(135deg, var(--wai-dark) 0%, var(--wai-primary) 100%);
  border-radius: 18px; padding: 26px 28px; margin-bottom: 20px; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(14,33,56,.18);
}
.dir-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(232,163,61,.22), transparent 70%);
}
.dir-hero::after {
  content: ''; position: absolute; bottom: -80px; left: 30%; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
}
.dir-hero-top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px;
  flex-wrap: wrap; margin-bottom: 18px; position: relative; z-index: 1;
}
.dir-hero-eyebrow {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--wai-accent); margin-bottom: 6px;
}
.dir-hero-title { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.25; }
.dir-hero-sub { font-size: 12.5px; color: rgba(255,255,255,.72); margin-top: 4px; max-width: 480px; }
.dir-hero-stats { display: flex; gap: 22px; }
.dir-stat { text-align: right; }
.dir-stat-num { font-size: 26px; font-weight: 800; color: #fff; line-height: 1; }
.dir-stat-label { font-size: 10.5px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

.dir-hero-upcoming {
  margin-top: 12px; font-size: 11.5px; color: rgba(255,255,255,.85);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.dir-hero-upcoming i { color: var(--wai-accent); }
.dir-hero-upcoming a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); }
.dir-hero-upcoming a:hover { text-decoration-color: #fff; }
.dir-hero-upcoming .sep { opacity: .4; margin: 0 2px; }

.dir-hero-search { position: relative; z-index: 1; }
.dir-hero-search .card-body-flat {
  background: rgba(255,255,255,.97); border-radius: 12px; padding: 14px 16px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* ── Member directory cards ──────────────────────────────────── */
.category-group { margin-bottom: 28px; }
.category-heading {
  font-size: 13px; font-weight: 800; color: var(--wai-dark);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 2px solid var(--wai-pale-dark);
}
.category-heading i { color: var(--wai-accent); font-size: 14px; }
.category-heading .count { color: #7a9ab0; font-weight: 600; text-transform: none; letter-spacing: 0; }

.member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
  align-items: stretch;
}
.member-card {
  background: #fff; border: 1px solid #e0eaee; border-radius: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  overflow: hidden; position: relative;
}
.member-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--wai-accent), var(--wai-primary));
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.member-card:hover {
  box-shadow: 0 10px 26px rgba(14,33,56,.14); transform: translateY(-3px);
  border-color: var(--wai-pale-dark);
}
.member-card:hover::before { transform: scaleX(1); }

/* Head: photo + logo badge + name block */
.member-card-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 12px;
}
.avatar-stack { position: relative; flex-shrink: 0; width: 68px; height: 68px; }
.avatar-photo, .avatar-photo-fallback {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--wai-pale-dark); background: var(--wai-pale);
}
.avatar-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  color: var(--wai-primary); font-weight: 800; font-size: 24px;
}
.avatar-logo-badge {
  position: absolute; bottom: -4px; right: -4px;
  width: 24px; height: 24px; border-radius: 7px; object-fit: cover;
  border: 2px solid #fff; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.avatar-logo-badge-fallback {
  position: absolute; bottom: -4px; right: -4px;
  width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid #fff; background: var(--wai-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.member-card-head-info { min-width: 0; flex: 1; }
.member-company {
  font-size: 14.5px; font-weight: 800; color: var(--wai-dark); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.member-person-name {
  font-size: 15px; font-weight: 800; color: var(--wai-dark); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.member-company-sub {
  font-size: 12px; font-weight: 700; color: var(--wai-mid); margin-top: 1px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.member-designation {
  font-size: 11.5px; color: #7a9ab0; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.member-meta-row {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: 11px; color: #7a9ab0; flex-wrap: wrap;
}
.member-meta-row span { display: inline-flex; align-items: center; gap: 3px; }
.member-meta-row i { color: var(--wai-accent); font-size: 10.5px; }
.member-city {
  font-size: 11.5px; color: var(--wai-mid); font-weight: 600; margin-top: 3px;
  display: flex; align-items: center; gap: 4px;
}
.member-city i { font-size: 11px; color: var(--wai-accent); }

.member-card-body { padding: 0 16px; flex: 1; }
.member-desc {
  font-size: 12.5px; color: #45606b; line-height: 1.45; margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 34px;
}
.member-section-label {
  font-size: 10px; font-weight: 800; color: #9bb0ba; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 5px;
}
.member-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; min-height: 22px; }
.tag-chip {
  background: var(--wai-pale); color: var(--wai-mid);
  font-size: 11px; font-weight: 500; letter-spacing: -.1px;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap;
}
.member-expertise {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11.5px; color: var(--wai-mid); background: #f3f9fa;
  border-radius: 8px; padding: 7px 9px; margin-bottom: 12px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.member-expertise i { flex-shrink: 0; margin-top: 1px; color: var(--wai-accent); }

/* Footer: contact icons + view link, pinned to bottom */
.member-card-footer {
  margin-top: auto; padding: 10px 16px; border-top: 1px solid #eef4f6;
  background: #fafcfd; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.contact-icons { display: flex; gap: 6px; }
.ci-btn {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--wai-pale-dark); color: var(--wai-primary);
  text-decoration: none; font-size: 13px; transition: background .15s, color .15s;
}
.ci-btn:hover { background: var(--wai-primary); color: #fff; }
.ci-btn.ci-wa:hover { background: #25d366; border-color: #25d366; }
.view-link {
  font-size: 11.5px; font-weight: 700; color: var(--wai-primary); text-decoration: none;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 3px;
}
.view-link:hover { text-decoration: underline; }

/* ── Profile photo / detail ──────────────────────────────────── */
.profile-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--wai-pale-dark); }
.profile-photo-fallback {
  width: 88px; height: 88px; border-radius: 50%; background: var(--wai-pale); color: var(--wai-primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px;
}

.sales-contact-box {
  background: var(--wai-pale); border: 1px solid var(--wai-pale-dark); border-radius: 12px;
  padding: 12px 14px; display: inline-block; min-width: 220px;
}
.sales-contact-box .member-section-label { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }

/* ── Status Badges ────────────────────────────────────────────── */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-pending  { background: #fff8ec; color: var(--wai-warning); }
.badge-approved { background: #e6f6f9; color: var(--wai-primary); }
.badge-rejected { background: #fff1f1; color: var(--wai-danger); }

/* ── Tables ───────────────────────────────────────────────────── */
.pg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pg-table th {
  background: var(--wai-pale); color: var(--wai-dark);
  padding: 10px 12px; font-weight: 700; border-bottom: 2px solid var(--wai-pale-dark);
  white-space: nowrap; text-align: left;
}
.pg-table td { padding: 9px 12px; border-bottom: 1px solid #f0f5f6; vertical-align: middle; }
.pg-table tr:last-child td { border-bottom: none; }
.pg-table tr:hover td { background: #fafefe; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-label { font-size: 12px; font-weight: 600; color: var(--wai-dark); margin-bottom: 4px; display: block; }
.form-control, .form-select {
  width: 100%; padding: 9px 12px; border: 1.5px solid #d6e4e8; border-radius: 8px;
  font-size: 13px; font-family: 'Inter', sans-serif; color: var(--wai-text); background: #fff;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--wai-primary); box-shadow: 0 0 0 3px rgba(28,74,115,.15);
}
.form-control::placeholder { color: #aac3ca; }
textarea.form-control { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-hint { font-size: 11px; color: #7a9ab0; margin-top: 3px; }

/* ── Event cards ──────────────────────────────────────────────── */
.event-card { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eef4f6; }
.event-card:last-child { border-bottom: none; }
.event-date-box {
  width: 58px; height: 58px; border-radius: 10px; background: var(--wai-dark); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.event-date-box .day { font-size: 20px; font-weight: 800; line-height: 1; }
.event-date-box .mon { font-size: 10px; text-transform: uppercase; opacity: .8; }
.event-title { font-size: 14px; font-weight: 700; color: var(--wai-dark); }
.event-meta { font-size: 12px; color: #7a9ab0; margin: 2px 0 6px; }
.event-desc { font-size: 12.5px; color: #45606b; margin-bottom: 8px; }
.event-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Month calendar ───────────────────────────────────────────── */
.cal-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.cal-table th {
  font-size: 11px; font-weight: 700; color: #7a9ab0; text-transform: uppercase;
  letter-spacing: .4px; padding: 6px 4px; text-align: center; border-bottom: 2px solid var(--wai-pale-dark);
}
.cal-cell {
  width: 14.28%; height: 92px; vertical-align: top; padding: 6px;
  border: 1px solid #eef4f6; overflow: hidden;
}
.cal-cell.cal-empty { background: #fafcfd; }
.cal-cell.cal-today { background: var(--wai-pale); border: 1px solid var(--wai-primary); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--wai-dark); margin-bottom: 4px; }
.cal-cell.cal-today .cal-daynum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--wai-primary); color: #fff;
}
.cal-event-chip {
  display: block; background: var(--wai-mid); color: #fff; text-decoration: none;
  font-size: 10px; font-weight: 600; padding: 2px 5px; border-radius: 5px;
  margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event-chip:hover { background: var(--wai-dark); }
.cal-more { font-size: 10px; color: #7a9ab0; font-weight: 600; }
@media (max-width: 700px) {
  .cal-cell { height: 70px; }
}

/* ── Alerts / toast ───────────────────────────────────────────── */
.alert-pg {
  padding: 10px 14px; border-radius: 10px; font-size: 13px; display: flex; align-items: flex-start; gap: 8px;
}
.alert-pg.info    { background: #ebfafc; color: var(--wai-mid); border: 1px solid #c4eef2; }
.alert-pg.success { background: #f0fdf4; color: var(--wai-success); border: 1px solid #bbf0cc; }
.alert-pg.warning { background: #fff8ec; color: #b07a00; border: 1px solid #fce7a8; }
.alert-pg.danger  { background: #fff1f1; color: var(--wai-danger); border: 1px solid #f5c6c6; }


/* ── Utilities ────────────────────────────────────────────────── */
.text-wai      { color: var(--wai-primary) !important; }
.text-accent   { color: var(--wai-accent) !important; }
.text-dark-wai { color: var(--wai-dark) !important; }
.fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.gap-8  { gap: 8px; }
.text-11 { font-size: 11px; } .text-12 { font-size: 12px; } .text-13 { font-size: 13px; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 800; color: var(--wai-dark); margin-bottom: 4px; }
.page-sub { font-size: 12px; color: #7a9ab0; margin-bottom: 20px; }

/* ── Auth pages ───────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--wai-dark) 0%, var(--wai-primary) 100%); padding: 20px;
}
.auth-card { background: #fff; border-radius: 20px; padding: 36px 32px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-logo { width: 56px; height: 56px; background: var(--wai-accent); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; margin: 0 auto 12px; }
.auth-logo-img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; object-position: top; margin: 0 auto 12px; display: block; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.auth-title { text-align: center; font-size: 19px; font-weight: 800; color: var(--wai-dark); }
.auth-sub { text-align: center; font-size: 12px; color: #7a9ab0; margin-bottom: 26px; }
.auth-switch { text-align: center; font-size: 12.5px; margin-top: 16px; color: #7a9ab0; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .navbar-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .navbar-nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--topbar-h); left: 0; right: 0;
    background: var(--wai-dark); padding: 8px; gap: 2px; box-shadow: 0 6px 16px rgba(0,0,0,.2);
  }
  .form-row { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: 1fr 1fr; }
  .dir-hero-stats { width: 100%; justify-content: flex-start; }
  .dir-stat { text-align: left; }
}
@media (max-width: 520px) {
  .member-grid { grid-template-columns: 1fr; }
  .content-area { padding: 16px 14px 50px; }
  .dir-hero { padding: 20px 18px; }
  .dir-hero-title { font-size: 19px; }
  .dir-hero-search .card-body-flat { padding: 12px; }
}
