/* ═══════════════════════════════════════════════════════════
   iBACT Chamber Portal — CSS
   Prefix: icp- (isolated from plugin and theme styles)
   ═══════════════════════════════════════════════════════════ */

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

.icp-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.icp-wrap {
  font-family: 'Outfit', -apple-system, sans-serif;
  color: #0D1B4B;
  --blue:   #0057FF;
  --teal:   #00C6AE;
  --green:  #06D6A0;
  --red:    #FF4D6D;
  --orange: #f0b429;
  --border: #DDE3F5;
  --bg:     #F0F4FF;
  --text:   #0D1B4B;
  --muted:  #6B7BB4;
  --r:      12px;
  --t:      0.22s ease;
}

/* ════════════════════════════════
   LOGIN CARD
════════════════════════════════ */
.icp-wrap:not(.icp-dashboard) {
  min-height: 100vh;
  background: linear-gradient(150deg, #00115A 0%, #0038CC 50%, #0077FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.icp-login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
}

.icp-login-header {
  text-align: center;
  margin-bottom: 28px;
}
.icp-login-logo {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}
.icp-login-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0D1B4B;
  margin-bottom: 6px;
}
.icp-login-header p {
  font-size: 14px;
  color: #6B7BB4;
}

.icp-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
}
.icp-alert-error {
  background: rgba(255,77,109,0.08);
  color: #FF4D6D;
  border: 1.5px solid rgba(255,77,109,0.20);
}
.icp-alert-success {
  background: rgba(6,214,160,0.08);
  color: #05a87a;
  border: 1.5px solid rgba(6,214,160,0.20);
}

.icp-login-form { display: flex; flex-direction: column; gap: 18px; }

.icp-field { display: flex; flex-direction: column; gap: 7px; }
.icp-field label {
  font-size: 12px;
  font-weight: 700;
  color: #6B7BB4;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.icp-field input,
.icp-field select,
.icp-field textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  color: #0D1B4B;
  background: #F5F7FF;
  border: 2px solid #DDE3F5;
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: var(--t);
}
.icp-field input:focus,
.icp-field select:focus,
.icp-field textarea:focus {
  border-color: #0057FF;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,87,255,0.10);
}

.icp-pass-wrap { position: relative; }
.icp-pass-wrap input { padding-right: 48px; }
.icp-pass-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* Buttons */
.icp-btn-primary {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  background: #0057FF;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  cursor: pointer;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.icp-btn-primary:hover { background: #003FBF; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,87,255,0.28); }
.icp-btn-ghost {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: #6B7BB4;
  border: 2px solid #DDE3F5;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icp-btn-ghost:hover { border-color: #0057FF; color: #0057FF; }
.icp-btn-full { width: 100%; justify-content: center; }

.icp-login-footer {
  text-align: center;
  font-size: 12.5px;
  color: #6B7BB4;
  margin-top: 20px;
}

/* ════════════════════════════════
   DASHBOARD
════════════════════════════════ */
.icp-dashboard {
  background: #F0F4FF;
  min-height: 100vh;
  padding-bottom: 48px;
}

/* Top bar */
.icp-topbar {
  background: linear-gradient(135deg, #001A80, #0057FF);
  padding: 16px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.icp-topbar-left { display: flex; align-items: center; gap: 14px; }
.icp-topbar-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.icp-topbar-name { font-size: 17px; font-weight: 800; color: #fff; line-height: 1; }
.icp-topbar-sub  { font-size: 12px; color: rgba(255,255,255,0.60); margin-top: 3px; }

.icp-topbar-right { display: flex; align-items: center; gap: 12px; }
.icp-user-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 50px;
}
.icp-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.icp-logout-btn {
  font-size: 13px; font-weight: 600;
  background: rgba(255,77,109,0.15);
  border: 1.5px solid rgba(255,77,109,0.30);
  color: #ffb3c0;
  padding: 7px 16px; border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: var(--t);
}
.icp-logout-btn:hover { background: rgba(255,77,109,0.28); color: #fff; }

/* Stats */
.icp-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 5% 0;
}
.icp-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 18px;
  border: 2px solid #DDE3F5;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--t);
}
.icp-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,87,255,0.10); }
.icp-stat-icon { font-size: 28px; flex-shrink: 0; }
.icp-stat-val { font-size: 22px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.icp-stat-lbl { font-size: 11.5px; color: #6B7BB4; font-weight: 500; }
.icp-stat-blue   .icp-stat-val { color: #0057FF; }
.icp-stat-teal   .icp-stat-val { color: #00C6AE; }
.icp-stat-purple .icp-stat-val { color: #7C3AED; }
.icp-stat-green  .icp-stat-val { color: #06D6A0; }

/* Tabs */
.icp-tabs-wrap { padding: 24px 5% 0; }
.icp-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 2px solid #DDE3F5;
  border-radius: 12px;
  padding: 5px;
  width: fit-content;
  margin-bottom: 16px;
}
.icp-tab {
  font-size: 13.5px; font-weight: 600;
  color: #6B7BB4;
  padding: 9px 18px;
  border-radius: 9px;
  text-decoration: none;
  transition: var(--t);
}
.icp-tab:hover { color: #0057FF; background: #F0F4FF; }
.icp-tab.active { background: #0057FF; color: #fff; }

/* Filters */
.icp-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.icp-filter-input {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: #0D1B4B;
  background: #fff;
  border: 2px solid #DDE3F5;
  border-radius: 9px;
  padding: 9px 13px;
  outline: none;
  transition: var(--t);
}
.icp-filter-input:focus { border-color: #0057FF; }
.icp-filter-search { min-width: 220px; }

/* Table */
.icp-table-wrap { padding: 0 5% 40px; }
.icp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #DDE3F5;
  font-size: 13.5px;
}
.icp-table thead th {
  background: #F0F4FF;
  color: #0D1B4B;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 14px;
  border-bottom: 2px solid #DDE3F5;
  text-align: left;
}
.icp-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #F0F4FF;
  vertical-align: middle;
}
.icp-table tbody tr:last-child td { border-bottom: none; }
.icp-table tbody tr:hover td { background: #FAFBFF; }

/* Badge */
.icp-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 50px;
  white-space: nowrap;
}

/* Action buttons */
.icp-action-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.icp-act-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px; font-weight: 700;
  padding: 6px 11px; border-radius: 7px;
  border: none; cursor: pointer; transition: var(--t);
  white-space: nowrap;
}
.icp-act-confirm { background: rgba(0,87,255,0.10); color: #0057FF; }
.icp-act-confirm:hover { background: #0057FF; color: #fff; }
.icp-act-done { background: rgba(6,214,160,0.12); color: #05a87a; }
.icp-act-done:hover { background: #06D6A0; color: #fff; }
.icp-act-cancel { background: rgba(255,77,109,0.10); color: #FF4D6D; }
.icp-act-cancel:hover { background: #FF4D6D; color: #fff; }

/* Empty state */
.icp-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid #DDE3F5;
}
.icp-empty-icon { font-size: 48px; margin-bottom: 12px; }
.icp-empty-title { font-size: 18px; font-weight: 700; color: #0D1B4B; margin-bottom: 6px; }
.icp-empty-sub { font-size: 14px; color: #6B7BB4; }

/* Mobile appointment cards */
.icp-cards-mobile { display: none; }
.icp-appt-card {
  background: #fff;
  border: 2px solid #DDE3F5;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}
.icp-appt-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #F0F4FF;
  background: #FAFBFF;
}
.icp-appt-card-id { font-size: 14px; font-weight: 700; color: #0057FF; }
.icp-appt-card-dt { font-size: 12px; color: #6B7BB4; margin-top: 2px; }
.icp-appt-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.icp-appt-row { display: flex; justify-content: space-between; font-size: 13px; }
.icp-appt-row span { color: #6B7BB4; }
.icp-appt-row strong { color: #0D1B4B; }
.icp-appt-card-actions {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid #F0F4FF;
  flex-wrap: wrap;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
  .icp-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .icp-table { display: none; }
  .icp-cards-mobile { display: block; }
  .icp-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px 4% 0; }
  .icp-topbar { padding: 14px 4%; }
  .icp-topbar-name { font-size: 15px; }
  .icp-user-pill span:last-child { display: none; }
  .icp-tabs-wrap, .icp-table-wrap { padding-left: 4%; padding-right: 4%; }
  .icp-tabs { width: 100%; }
  .icp-tab { flex: 1; text-align: center; font-size: 12.5px; padding: 9px 10px; }
  .icp-filters { gap: 8px; }
  .icp-filter-input { width: 100%; }
  .icp-filter-search { min-width: unset; }
}
@media (max-width: 480px) {
  .icp-stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .icp-stat-card { padding: 14px 12px; gap: 10px; }
  .icp-stat-val { font-size: 18px; }
  .icp-stat-icon { font-size: 22px; }
  .icp-login-card { padding: 28px 20px; }
}
