/* Custom Modern Styling for Training Center PETIRS */
/* Applied incrementally to avoid disrupting legacy layout */

/* ---- Color Palette (Corporate Medical) ---- */
:root {
  --primary-blue: #005f99;
  --accent-teal: #0fb3b7;
  --accent-green: #27ae60;
  --accent-red: #e74c3c;
  --soft-bg: #f4f8fb;
  --card-bg: #ffffff;
  --border-color: #e3eaf3;
  --text-muted: #7a8a99;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
}

/* ---- Global Background ---- */
body {
  background: linear-gradient(135deg, #f0f6fc 0%, #f4f8fb 100%);
  color: #2c3e50;
}

/* ---- Main Wrapper / Card ---- */
.posting.container {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* ---- Section Header ---- */
#pendaftaran .posting.container h3 {
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

#pendaftaran .posting.container h5 {
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

/* ---- Form Controls ---- */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(15, 179, 183, 0.2);
}

.form-control:focus + label,
.form-label {
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.85rem;
}

.form-label {
  margin-bottom: 0.35rem;
}

select.form-control {
  min-height: 44px;
  height: auto;
  padding: 0.5rem 1rem;
  line-height: 1.5;
  background-image: none;
  background-color: #fff;
}

select.form-control[multiple],
select.form-control[size]:not([size="1"]) {
  height: auto;
  min-height: 96px;
}

/* ---- Submit Button ---- */
input[type="submit"].btn-primary,
.btn-primary {
  background: var(--primary-blue);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover,
input[type="submit"].btn-primary:hover {
  background: var(--accent-teal);
  transform: translateY(-1px);
}

/* ---- Flash Messages ---- */
.alert {
  border-radius: 8px;
}

.alert-success {
  background: rgba(39, 174, 92, 0.1);
  border-color: var(--accent-green);
  color: #1e7e34;
}

.alert-danger {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--accent-red);
  color: #721c24;
}

/* ---- Modal Enhancements ---- */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom-color: var(--border-color);
}

/* ---- Instansi Table ---- */
.table.table-hover tbody tr:hover {
  background: rgba(0, 95, 153, 0.05);
}

/* ---- Alert Link on Home ---- */
.carousel-caption .btn-sm {
  border-radius: 6px;
  font-weight: 600;
  padding: 0.4rem 1rem;
}

/* ---- Dashboard Summary Cards ---- */
.dashboard-summary .stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-top: 3px solid var(--primary-blue);
}
.dashboard-summary .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.bg-primary-light { background-color: rgba(0, 95, 153, 0.1); }
.bg-info-light    { background-color: rgba(23, 162, 184, 0.1); }
.bg-warning-light { background-color: rgba(255, 193, 7, 0.15); }
.bg-success-light { background-color: rgba(40, 167, 69, 0.1); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--primary-blue); }
.stat-label { font-size: 0.75rem; letter-spacing: 0.5px; }

/* ---- Dashboard Data Table ---- */
.card-header.bg-white h4 {
  font-weight: 600;
  color: var(--primary-blue);
}
.table thead .small {
  font-size: 0.7rem;
  letter-spacing: 0.4px;
}

/* ---- Public Landing & Event Experience ---- */
html { scroll-behavior: smooth; }
.public-body { background: #f7fafc; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.public-main { min-height: calc(100vh - 220px); }
.public-header {
  padding: 16px 0;
  background: #ffffff;
  border-bottom: 1px solid #eef2f5;
  box-shadow: 0 4px 18px rgba(20, 61, 83, 0.04);
}
.public-header .header-nav .nav-link {
  color: #4b6375;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.public-header .header-nav .nav-link:hover,
.public-header .header-nav .nav-link.active {
  color: #0d6efd;
  background: #eef6ff;
}
.public-brand { display: inline-flex; align-items: center; gap: 11px; color: #17384f; font-weight: 700; }
.public-brand:hover { color: var(--primary-blue); }
.public-brand img { width: 98px; height: auto; }
.public-brand span { padding-left: 11px; border-left: 1px solid #dbe5eb; font-size: 0.84rem; }
.public-nav-link {
  display: block;
  margin-left: 5px;
  padding: 9px 11px;
  color: #577084;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
}
.public-nav-link:hover, .public-nav-link.active { color: var(--primary-blue); background: #eef6fa; text-decoration: none; }
.public-navbar-toggler { border: 1px solid #d8e5ec; border-radius: 9px; }
.public-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 76px;
  background:
    radial-gradient(circle at 85% 15%, rgba(15, 179, 183, 0.16), transparent 28%),
    linear-gradient(135deg, #eef7fc 0%, #f9fcfe 54%, #eef9f7 100%);
}
.public-hero::before {
  position: absolute;
  top: -110px;
  left: -90px;
  width: 300px;
  height: 300px;
  content: "";
  border: 1px solid rgba(0, 95, 153, 0.08);
  border-radius: 50%;
}
.public-kicker { display: block; margin-bottom: 12px; color: #087f8c; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.public-hero h1 { max-width: 620px; margin-bottom: 20px; color: #113b55; font-size: clamp(2.35rem, 5vw, 4rem); font-weight: 700; line-height: 1.03; letter-spacing: -0.045em; }
.public-hero-copy > p { max-width: 590px; margin-bottom: 27px; color: #5c7485; font-size: 1.05rem; line-height: 1.75; }
.public-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.public-trust-list { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.public-trust-list span { display: flex; flex-direction: column; padding-left: 12px; border-left: 2px solid rgba(15, 179, 183, 0.55); }
.public-trust-list strong { color: #234c64; font-size: 0.84rem; }
.public-trust-list small { color: #8495a1; font-size: 0.72rem; }
.public-hero-visual { position: relative; min-height: 410px; overflow: hidden; background: #dceaf2; border: 9px solid rgba(255,255,255,.82); border-radius: 26px; box-shadow: 0 28px 65px rgba(23, 65, 90, 0.18); }
.public-hero-visual img { width: 100%; height: 410px; object-fit: cover; }
.public-featured-caption { position: absolute; right: 17px; bottom: 17px; left: 17px; display: flex; flex-direction: column; padding: 17px 19px; color: #fff; background: rgba(7, 44, 67, 0.86); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; backdrop-filter: blur(8px); }
.public-featured-caption span { color: #87e3db; font-size: 0.65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.public-featured-caption strong { margin: 3px 0; font-size: 1rem; }
.public-featured-caption small { color: rgba(255,255,255,.72); }
.public-hero-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 410px; color: #486578; }
.public-section { padding: 76px 0; }
.public-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 34px; }
.public-section-heading h2 { margin: 0; color: #173e57; font-size: 2rem; font-weight: 700; letter-spacing: -.025em; }
.public-section-heading > p { max-width: 500px; margin: 0; color: #718593; line-height: 1.7; }
.event-grid > div, .service-grid > div { margin-bottom: 24px; }
.event-card { display: flex; flex: 1; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e4ebf0; border-radius: 16px; box-shadow: 0 8px 25px rgba(19, 60, 84, 0.06); transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(19, 60, 84, 0.12); }
.event-card-image { position: relative; display: block; overflow: hidden; background: #eaf1f5; }
.event-card-image img { width: 100%; height: 215px; object-fit: cover; transition: transform .35s ease; }
.event-card:hover .event-card-image img { transform: scale(1.035); }
.event-status { position: absolute; top: 14px; left: 14px; padding: 6px 10px; color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; }
.event-status-open { background: #16885b; }
.event-status-upcoming { background: #246b94; }
.event-status-closed { background: #6e7b84; }
.event-card-body { display: flex; flex: 1; flex-direction: column; padding: 21px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 11px; margin-bottom: 12px; color: #82939e; font-size: .72rem; }
.event-meta span { display: inline-flex; align-items: center; gap: 5px; }
.event-card h3 { margin-bottom: 10px; color: #193e55; font-size: 1.08rem; font-weight: 700; line-height: 1.4; }
.event-card p { flex: 1; color: #718593; font-size: .88rem; line-height: 1.65; }
.event-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.event-detail-link { color: var(--primary-blue); font-size: .82rem; font-weight: 700; }
.event-detail-link:hover { color: var(--accent-teal); text-decoration: none; }
.public-service-section { background: linear-gradient(180deg, #eef6fa 0%, #f7fafc 100%); border-top: 1px solid #e4edf2; }
.service-card { display: flex; flex: 1; flex-direction: column; padding: 27px; color: inherit; background: #fff; border: 1px solid #e1eaf0; border-radius: 16px; box-shadow: 0 8px 24px rgba(19, 60, 84, .05); transition: transform .18s ease, border-color .18s ease; }
.service-card:hover { color: inherit; border-color: rgba(15,179,183,.45); text-decoration: none; transform: translateY(-3px); }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 20px; color: #087f8c; background: #e6f6f5; border-radius: 13px; }
.service-card h3 { color: #193e55; font-size: 1.02rem; font-weight: 700; }
.service-card p { flex: 1; color: #748894; font-size: .86rem; line-height: 1.65; }
.service-link { color: var(--primary-blue); font-size: .8rem; font-weight: 700; }
.public-empty-state { padding: 55px 20px; text-align: center; background: #fff; border: 1px dashed #cedde5; border-radius: 16px; }
.event-detail { padding: 42px 0 75px; }
.event-back-link { display: inline-block; margin-bottom: 17px; color: #668091; font-size: .82rem; font-weight: 600; }
.event-detail-shell { overflow: hidden; background: #fff; border: 1px solid #e3ebf0; border-radius: 20px; box-shadow: 0 16px 44px rgba(20, 59, 82, .08); }
.event-detail-hero { position: relative; background: #eaf1f5; }
.event-detail-hero img { width: 100%; max-height: 510px; object-fit: cover; }
.event-detail-content { max-width: 900px; padding: 38px 44px 46px; }
.event-detail-content h1 { margin-bottom: 22px; color: #173e57; font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 700; letter-spacing: -.035em; }
.event-detail-meta { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 27px; padding-bottom: 22px; border-bottom: 1px solid #e8eef2; }
.event-detail-meta span { display: grid; grid-template-columns: 20px auto; color: #687e8d; font-size: .84rem; }
.event-detail-meta i { grid-row: 1 / 3; color: #0f9ba0; }
.event-detail-meta strong { color: #284e64; font-size: .72rem; text-transform: uppercase; }
.event-description { color: #526c7d; line-height: 1.8; }
.event-description img { max-width: 100%; height: auto; }
.event-detail-action { margin-top: 30px; }
.public-footer {
  width: 100%;
  margin: 0;
  padding: 40px 0 35px;
  color: rgba(255, 255, 255, 0.7);
  background: #062f49;
}
.public-footer-brand { display: inline-flex; align-items: center; gap: 13px; margin-bottom: 10px; color: #fff; font-weight: 700; }
.public-footer-brand:hover { color: #fff; text-decoration: none; }
.public-footer-brand img { width: auto; height: 32px; filter: none; }
.public-footer p { max-width: 540px; margin: 0; font-size: .8rem; }
.public-footer-links { margin-bottom: 8px; }
.public-footer-links a { margin-left: 15px; color: rgba(255,255,255,.78); font-size: .78rem; font-weight: 600; }
.public-footer-links a:hover { color: #8ce0db; text-decoration: none; }

@media (max-width: 991.98px) {
  .public-navbar .navbar-collapse { padding-top: 12px; }
  .public-nav-link { margin: 2px 0; }
  .public-hero { padding: 52px 0 60px; }
  .public-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 767.98px) {
  .public-brand span { display: none; }
  .public-hero h1 { font-size: 2.45rem; }
  .public-hero-visual, .public-hero-visual img, .public-hero-placeholder { min-height: 300px; height: 300px; }
  .public-trust-list { gap: 14px; }
  .public-section { padding: 54px 0; }
  .public-section-heading h2 { font-size: 1.65rem; }
  .event-card-image img { height: 205px; }
  .event-detail-content { padding: 28px 22px 34px; }
  .public-footer, .public-footer .text-md-right { text-align: center !important; }
  .public-footer p { margin: 0 auto; }
  .public-footer-links { margin-top: 14px; }
  .public-footer-links a { margin: 0 7px; }
}

/* ---- Modern Registration Form ---- */
.registration-page { padding: 46px 0 70px; }
.registration-container { max-width: 860px; }
.registration-heading { margin-bottom: 24px; }
.registration-heading h3 { margin: 8px 0 4px; color: #173f56; font-size: 1.8rem; font-weight: 750; }
.registration-heading p { margin: 0; color: #6c828f; }
.registration-progress {
  margin: 0 0 22px;
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(26, 72, 96, .06);
}
.registration-progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: #49697a; font-size: .78rem; }
.registration-progress-track { height: 8px; overflow: hidden; background: #e8eff3; border-radius: 999px; }
.registration-progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal)); border-radius: inherit; transition: width .25s ease; }
.registration-section {
  margin: 0 0 22px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 72, 96, .07);
}
.registration-section legend { width: auto; margin: 0 0 4px; padding: 0; color: #1d4f69; font-size: 1rem; font-weight: 700; }
.registration-section legend span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 8px; color: #fff; background: var(--primary-blue); border-radius: 8px; font-size: .75rem; }
.registration-section-help { margin: 0 0 20px; color: #7a8f9b; font-size: .78rem; }
.registration-section .form-group:last-child { margin-bottom: 0; }
.registration-section .form-control.is-valid { border-color: #3b9b70; background-image: none; }
.registration-section .form-control.is-invalid { border-color: #cf554d; background-image: none; }
.registration-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 2px 0; }
.registration-submit p { margin: 0; color: #718692; font-size: .78rem; }
.registration-submit .btn { min-width: 210px; }
.registration-submit .btn:disabled { cursor: wait; opacity: .72; }
.registration-closed { padding: 40px 20px; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; }
@media (max-width: 575.98px) {
  .registration-page { padding: 28px 0 48px; }
  .registration-section { padding: 19px 16px; }
  .registration-submit { align-items: stretch; flex-direction: column; }
  .registration-submit .btn { width: 100%; min-width: 0; }
}

/* ---- AJAX Institution Search ---- */
.instansi-search-widget { position: relative; }
.instansi-search-status { min-height: 22px; padding: 6px 2px 3px; color: #718593; font-size: .77rem; }
.instansi-search-status.is-loading { color: var(--primary-blue); }
.instansi-search-status.is-success { color: #19734d; }
.instansi-search-status.is-error { color: #b23a31; }
.instansi-search-results {
  max-height: 310px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(22, 61, 83, .10);
}
.instansi-search-results:empty { display: none; }
.instansi-result-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  cursor: pointer;
}
.instansi-result-item:last-child { border-bottom: 0; }
.instansi-result-item:hover, .instansi-result-item:focus { background: #edf7fa; outline: 0; }
.instansi-result-item strong { color: #234c64; font-size: .84rem; }
.instansi-result-item span { margin-top: 3px; color: #788c99; font-size: .72rem; }

/* ---- Server-side Admin Tables ---- */
.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}
.admin-filter-grid .form-group { margin-bottom: 0; }
.admin-filter-actions { display: flex; gap: 8px; padding-bottom: 1px; }
.admin-table-toolbar, .admin-data-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-section-kicker { display: block; color: #7493a3; font-size: .68rem; font-weight: 700; letter-spacing: .12em; }
.admin-table-toolbar h5, .admin-data-table-heading h5 { color: #214f68; font-weight: 700; }
.admin-filter-hint, .admin-table-note { color: #8296a2; font-size: .76rem; }
.admin-filter-card { border: 1px solid #dce9ee; border-radius: 14px; box-shadow: 0 5px 18px rgba(35, 76, 100, .05); }
.admin-data-table { overflow-x: auto; background: #fff; border: 1px solid #dce6eb; border-radius: 14px; padding: 16px; box-shadow: 0 7px 22px rgba(35, 76, 100, .06); }
.admin-data-table table { width: 100% !important; min-width: 1150px; color: #385466; border-collapse: separate; border-spacing: 0; }
.admin-data-table table.dataTable thead th { padding: .8rem .7rem; color: #28566e; background: #eaf4f8; border-bottom: 1px solid #cfe1e9; font-size: .72rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
#dt-instansi td:nth-child(1), #dt-instansi th:nth-child(1) { width: 45px !important; text-align: center; }
#dt-instansi td:nth-child(2), #dt-instansi th:nth-child(2) { width: 95px !important; white-space: nowrap; font-family: monospace; font-weight: 600; }
#dt-instansi td:nth-child(5), #dt-instansi th:nth-child(5) { min-width: 260px !important; font-weight: 600; color: #1c455d; }
#dt-instansi td:nth-child(7), #dt-instansi th:nth-child(7) { width: 60px !important; text-align: center; white-space: nowrap; }
#dt-instansi td:nth-child(8), #dt-instansi th:nth-child(8) { width: 80px !important; text-align: center; white-space: nowrap; }
#dt-instansi td:nth-child(9), #dt-instansi th:nth-child(9) { width: 75px !important; text-align: center; white-space: nowrap; }
#dt-instansi td:nth-child(10), #dt-instansi th:nth-child(10) { width: 65px !important; text-align: center; white-space: nowrap; }
.admin-data-table table.dataTable tbody td { padding: .7rem; border-top: 1px solid #edf2f5; vertical-align: middle; }
.admin-data-table table.dataTable tbody tr:nth-child(even) { background: #f8fbfc; }
.admin-data-table table.dataTable tbody tr:hover { background: #eef8f7; }
.admin-data-table .dataTables_wrapper .dataTables_filter input, .admin-data-table .dataTables_wrapper .dataTables_length select { border: 1px solid #ccdfe7; border-radius: 8px; color: #385466; }
.admin-data-table .dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 7px; }
.admin-data-table .dataTables_wrapper .dataTables_paginate .paginate_button.current { color: #fff !important; background: #4e9aa0; border-color: #4e9aa0; }
.admin-participant-name, .admin-cell-primary { display: block; color: #234c64; font-weight: 700; }
.admin-participant-phone, .admin-cell-secondary { display: block; margin-top: 2px; color: #8195a1; font-size: .76rem; }
.admin-status-badge { padding: .4em .65em; border-radius: 999px; font-weight: 600; }
.admin-status-info { color: #276779; background: #dff2f5; }
.admin-status-success { color: #32725c; background: #e2f3eb; }
.admin-status-warning { color: #806a2b; background: #fff3cf; }
.admin-status-muted { color: #71808a; background: #edf1f3; }
.admin-data-table .admin-room-form { white-space: nowrap; }
.admin-data-table .btn { border-radius: 7px; font-size: .73rem; }
.admin-room-form { white-space: nowrap; }
.admin-room-form .form-control { vertical-align: middle; }
@media (max-width: 767.98px) {
  .admin-filter-grid { grid-template-columns: 1fr; }
  .admin-data-table { padding: 8px; }
}

/* ---- WhatsApp Notification Templates ---- */
.notification-template-page { max-width: 960px; }
.notification-template-intro h4 { color: #214f68; font-weight: 700; }
.notification-variable-card, .notification-template-card, .notification-event-overrides {
  margin: 1rem 0; padding: 1rem; background: #fff; border: 1px solid #dce6eb; border-radius: 12px; box-shadow: 0 5px 18px rgba(35, 76, 100, .05);
}
.notification-variable-card strong { display: block; color: #28566e; margin-bottom: .55rem; }
.notification-variable-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.notification-variable-list code, .notification-event-overrides code { padding: .2rem .38rem; color: #276779; background: #e8f4f5; border-radius: 4px; font-size: .72rem; }
.notification-template-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.notification-template-card-header h5 { margin: 0; color: #234c64; font-size: 1rem; font-weight: 700; }
.notification-template-editor { min-height: 150px; font-family: inherit; line-height: 1.45; }
.notification-event-overrides { border-color: #cfe3df; }
.notification-event-overrides legend { width: auto; padding: 0 .35rem; color: #276779; font-size: .95rem; font-weight: 700; }
.notification-event-override-card { margin-top: .8rem; padding: .8rem; border: 1px solid #e3ecef; border-radius: 9px; background: #fbfdfd; }
@media (max-width: 767.98px) { .notification-template-card-header { align-items: flex-start; flex-direction: column; } }

.notification-template-toggle { display: flex; align-items: center; gap: .5rem; margin: 0; }
.notification-template-toggle .form-check-input { width: 1.15rem; height: 1.15rem; margin-top: 0; cursor: pointer; }
.notification-template-toggle .form-check-label { cursor: pointer; user-select: none; }
.notification-template-toggle .form-check-input:checked { background-color: #17a2b8; border-color: #17a2b8; }

.user-panel-page .table { background: #fff; }
@media (max-width: 991.98px) { .user-panel-page { overflow-x: auto; } }

/* Bootstrap 5 bridge for server-rendered forms not yet structurally rewritten.
   The scope prevents legacy Bootstrap 4 grid rules leaking into modern forms. */
.legacy-bs5-form .form-group { margin-bottom: 1rem; }
.legacy-bs5-form .control-label { display: inline-block; margin-bottom: .5rem; font-weight: 600; }
.legacy-bs5-form .col-sm-offset-2 { margin-left: 16.666667%; }
.legacy-bs5-form .form-control { min-height: calc(1.5em + .75rem + 2px); }
.legacy-bs5-form input[type="file"].form-control { padding: .375rem .75rem; }
.legacy-bs5-form .help-block { display: block; margin-top: .25rem; color: #6c757d; font-size: .875em; }
@media (min-width: 576px) {
  .legacy-bs5-form .form-group:has(> .control-label.col-sm-2) { display: flex; flex-wrap: wrap; align-items: flex-start; }
  .legacy-bs5-form .control-label.col-sm-2 { flex: 0 0 auto; width: 16.666667%; padding-top: calc(.375rem + 1px); padding-right: .75rem; }
  .legacy-bs5-form .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
}
@media (max-width: 575.98px) { .legacy-bs5-form .col-sm-offset-2 { margin-left: 0; } }

/* ---- Event Management List ---- */
.event-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.event-list-toolbar h4 { color: #214f68; font-weight: 700; }
.event-create-button { border-radius: 8px; font-weight: 600; white-space: nowrap; }
.event-create-button .oi { margin-right: .35rem; }
.event-list-card { overflow: hidden; background: #fff; border: 1px solid #dce6eb; border-radius: 14px; box-shadow: 0 7px 22px rgba(35, 76, 100, .06); }
.event-list-table { min-width: 920px; color: #385466; }
.event-list-table thead th { padding: .82rem .8rem; color: #28566e; background: #eaf4f8; border-top: 0; border-bottom: 1px solid #cfe1e9; font-size: .72rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.event-list-table tbody td { padding: .88rem .8rem; border-top: 1px solid #edf2f5; vertical-align: middle; }
.event-list-table tbody tr:nth-child(even) { background: #f8fbfc; }
.event-list-table tbody tr:hover { background: #eef8f7; }
.event-list-number { color: #77919f; font-size: .8rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.event-list-name { display: block; max-width: 310px; color: #234c64; font-weight: 700; line-height: 1.35; }
.event-list-location, .event-list-description, .event-list-date-label, .event-list-date { display: block; }
.event-list-location { margin-top: .25rem; color: #548190; font-size: .78rem; }
.event-list-location .oi { margin-right: .2rem; font-size: .7rem; }
.event-list-description { max-width: 320px; margin-top: .25rem; color: #8396a2; font-size: .74rem; line-height: 1.35; }
.event-list-date-label { color: #8a9da8; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.event-list-date { color: #385466; font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-publish-badge, .event-group-badge { padding: .42em .68em; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.event-publish-active { color: #32725c; background: #e2f3eb; }
.event-publish-draft { color: #806a2b; background: #fff3cf; }
.event-group-ready { color: #276779; background: #dff2f5; }
.event-group-empty { color: #71808a; background: #edf1f3; }
.event-edit-button { border-radius: 7px; font-size: .76rem; }
.event-edit-button .oi { margin-right: .28rem; }
.event-list-empty { padding: 2.25rem !important; color: #8496a1; text-align: center; }
@media (max-width: 767.98px) { .event-list-toolbar { align-items: flex-start; flex-direction: column; } .event-create-button { width: 100%; } .event-list-card { border-radius: 10px; } }

/* ---- Event Analytics ---- */
.analytics-page { padding: 1rem 0 2rem; }
.analytics-actions { white-space: nowrap; }
.analytics-metric-card { height: 100%; padding: 1rem; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.analytics-metric-card span { display: block; color: #64748b; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.analytics-metric-card strong { display: block; margin-top: .35rem; color: #0f172a; font-size: 1.75rem; }
.analytics-chart-card { min-height: 360px; }
.analytics-chart-card canvas { min-height: 285px; max-height: 315px; }
.analytics-filter label { font-size: .8rem; font-weight: 600; color: #475569; }
.analytics-table-card {
  overflow: hidden;
  border: 1px solid #dfe9ef;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(31, 78, 105, 0.06);
}
.analytics-table-card h2 { color: #214f68; font-weight: 700; }
.analytics-soft-table { color: #385466; border-collapse: separate; border-spacing: 0; }
.analytics-soft-table thead th {
  padding: .72rem .78rem;
  color: #28566e;
  background: #eaf4f8;
  border-top: 0;
  border-bottom: 1px solid #cfe1e9;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}
.analytics-soft-table tbody td,
.analytics-soft-table tfoot td { padding: .68rem .78rem; border-top: 1px solid #edf2f5; vertical-align: middle; }
.analytics-soft-table tbody tr:nth-child(even) { background: #f8fbfc; }
.analytics-soft-table tbody tr:hover { background: #eef8f7; }
.analytics-soft-table tfoot td { color: #214f68; background: #edf6f4; border-top: 1px solid #cfe3df; }
.analytics-number { color: #274f65; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
#participantTable { min-width: 1200px; }
@media (max-width: 767.98px) { .analytics-actions { margin-top: .75rem; white-space: normal; } .analytics-chart-card { min-height: 300px; } }

/* ---- Event Image Fallback ---- */
.event-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 210px;
  padding: 24px;
  color: #607d8b;
  background: linear-gradient(135deg, #eef5f7, #dfecef);
  font-weight: 600;
  text-align: center;
}

/* ---- Panel Admin Application Shell ---- */
.panel-body {
  min-height: 100vh;
  background: #f5f7fb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.panel-shell { min-height: 100vh; }
.panel-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  width: 256px;
  overflow-y: auto;
  color: #dce6ef;
  background: linear-gradient(180deg, #073b5c 0%, #062f49 100%);
  box-shadow: 8px 0 28px rgba(20, 52, 74, 0.12);
}
.panel-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.panel-sidebar-brand img { width: auto; height: 34px; filter: none; }
.panel-sidebar-caption {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel-sidebar-nav { flex: 1; padding: 15px 12px; }
.panel-nav-section {
  display: block;
  margin: 17px 12px 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-nav-section:first-child { margin-top: 3px; }
.panel-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  margin: 3px 0;
  padding: 10px 13px;
  color: rgba(255, 255, 255, 0.76);
  border-radius: 9px;
  font-size: 0.89rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.panel-nav-link .oi { width: 18px; font-size: 0.91rem; text-align: center; }
.panel-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
  transform: translateX(2px);
}
.panel-nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 179, 183, 0.92), rgba(0, 125, 170, 0.92));
  box-shadow: 0 7px 18px rgba(0, 22, 38, 0.22);
}
.analysis-submenu-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.analysis-submenu-toggle .analysis-submenu-chevron {
  width: auto;
  margin-left: auto;
  font-size: 0.68rem;
  transition: transform 0.18s ease;
}
.analysis-submenu-toggle[aria-expanded="true"] .analysis-submenu-chevron { transform: rotate(180deg); }
.analysis-submenu-item {
  min-height: 38px;
  margin-left: 22px;
  padding-left: 14px;
  font-size: 0.82rem;
}
.panel-sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.panel-logout-link {
  width: 100%;
  color: #ff6b6b !important;
  background: rgba(231, 76, 60, 0.12) !important;
  border: 1px solid rgba(231, 76, 60, 0.35) !important;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.panel-logout-link:hover {
  color: #ffffff !important;
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  transform: translateY(-1px);
}
.panel-main { min-height: 100vh; margin-left: 256px; display: flex; flex-direction: column; }
.panel-main > main { flex: 1 0 auto; }
.panel-footer { flex-shrink: 0; }
.panel-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e7edf3;
  box-shadow: 0 2px 12px rgba(18, 48, 70, 0.04);
}
.panel-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-right: 13px;
  color: var(--primary-blue);
  background: #edf5fa;
  border: 0;
  border-radius: 10px;
}
.panel-topbar-eyebrow {
  color: #8a9baa;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-page-title { color: #17384f; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.panel-view-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 9px 13px;
  color: #466378;
  background: #f3f7fa;
  border: 1px solid #e0e9ef;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
}
.panel-view-site:hover { color: var(--primary-blue); text-decoration: none; background: #eaf3f8; }
.panel-content { padding: 28px; }
.panel-sidebar-overlay { display: none; }

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .panel-sidebar {
    width: 270px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .panel-sidebar.is-open { transform: translateX(0); }
  .panel-main { margin-left: 0; }
  .panel-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .panel-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: block;
    visibility: hidden;
    padding: 0;
    background: rgba(5, 25, 39, 0.48);
    border: 0;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .panel-sidebar-overlay.is-open { visibility: visible; opacity: 1; }
  body.sidebar-open { overflow: hidden; }
}
@media (max-width: 768px) {
  .posting.container { padding: 1.25rem; }
  .panel-topbar { min-height: 66px; padding: 10px 15px; }
  .panel-content { padding: 18px 14px; }
  .panel-page-title { font-size: 1.12rem; }
  .panel-view-site span { display: none; }
  .panel-view-site { width: 40px; height: 40px; justify-content: center; padding: 0; }
}
