:root {
  --primary: #0B1B3D;
  --primary-light: #13547A;
  --secondary: #1A6B7A;
  --accent: #D4A017;
  --accent-light: #F5D78E;
  --teal: #80D0C7;
  --bg-soft: #F7F9FC;
  --text-slate: #475569;
  --white-80: rgba(255, 255, 255, 0.85);
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(11, 27, 61, 0.05);
  --shadow: 0 4px 6px -1px rgba(11, 27, 61, 0.08), 0 2px 4px -2px rgba(11, 27, 61, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(11, 27, 61, 0.12), 0 8px 10px -6px rgba(11, 27, 61, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-soft);
  color: #1f2937;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-size: 1.05rem;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  font-weight: 800;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  color: var(--secondary);
}

/* Navbar */
.navbar {
  background: rgba(11, 27, 61, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu-dark {
  background: rgba(16, 30, 60, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 0;
}

.dropdown-menu-dark .dropdown-header {
  color: var(--accent-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dropdown-menu-dark .dropdown-item {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 1.25rem;
  font-weight: 400;
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-menu-dark .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.6rem 1.4rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  border: none;
  box-shadow: 0 4px 6px -1px rgba(19, 84, 122, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #0f4160 0%, #145a66 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(19, 84, 122, 0.3);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #C37B24 100%);
  border: none;
  color: #0B1B3D;
  box-shadow: 0 4px 6px -1px rgba(212, 160, 23, 0.3);
}

.btn-accent:hover,
.btn-accent:focus {
  background: linear-gradient(135deg, #C37B24 0%, #A8651C 100%);
  color: #0B1B3D;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(212, 160, 23, 0.35);
}

.btn-outline-primary {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
}

.btn-light {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: var(--primary);
  font-weight: 600;
}

.btn-light:hover {
  background: #fff;
  color: var(--primary);
}

/* Cards */
.card {
  border: 1px solid rgba(11, 27, 61, 0.06);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  background: rgba(247, 249, 252, 0.8);
  border-bottom: 1px solid rgba(11, 27, 61, 0.06);
  padding: 1rem 1.25rem;
}

.card-title {
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
}

.stat-card {
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card h3 {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
}

/* Hero */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background: url("../images/hero-tech.308f9db795ef.jpg") center center / cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 27, 61, 0.88) 0%, rgba(11, 27, 61, 0.7) 50%, rgba(19, 84, 122, 0.65) 100%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 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");
  opacity: 0.4;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: white;
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero .lead {
  color: var(--white-80);
  font-size: 1.45rem;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.5;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
  color: var(--white-80);
  backdrop-filter: blur(6px);
  font-weight: 500;
}

/* Page headers */
.page-header {
  padding: 3.5rem 0;
  margin-bottom: 0;
}

.page-header-gradient {
  position: relative;
  background: url("../images/hero-abstract.08e6e7527883.jpg") center center / cover no-repeat;
  color: white;
}

.page-header-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 27, 61, 0.92) 0%, rgba(19, 84, 122, 0.82) 100%);
}

.page-header-gradient .container {
  position: relative;
  z-index: 1;
}

.page-header-gradient h1,
.page-header-gradient h2,
.page-header-gradient h3 {
  color: white;
}

.page-header-soft {
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid rgba(11, 27, 61, 0.06);
}

.page-header-soft .breadcrumb-item a {
  color: var(--primary-light);
}

.page-header-soft .breadcrumb-item.active {
  color: var(--text-slate);
}

.text-white-80 {
  color: var(--white-80);
}

/* Feature icons */
.feature-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, rgba(19, 84, 122, 0.1) 0%, rgba(128, 208, 199, 0.2) 100%);
  color: var(--primary-light);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(19, 84, 122, 0.1);
}

/* CFP cards */
.cfp-card {
  border-left: 4px solid var(--primary-light);
  transition: all 0.25s ease;
}

.cfp-card:hover {
  border-left-color: var(--accent);
}

.badge-phase {
  background: linear-gradient(135deg, rgba(19, 84, 122, 0.1) 0%, rgba(128, 208, 199, 0.15) 100%);
  color: var(--primary-light);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
}

/* Assignment cards */
.assignment-card {
  border-top: 4px solid transparent;
}

.assignment-status-pending {
  border-top-color: var(--accent);
}

.assignment-status-accepted {
  border-top-color: var(--primary-light);
}

.assignment-status-completed {
  border-top-color: #198754;
}

.assignment-status-declined {
  border-top-color: #6c757d;
}

/* Section titles */
.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
}

.section-title .subtitle {
  color: var(--text-slate);
  font-size: 1.15rem;
  font-weight: 300;
}

/* Deadline items */
.deadline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(11, 27, 61, 0.06);
}

.deadline-item:last-child {
  border-bottom: none;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-slate);
  background: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.empty-state i {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  color: #cbd5e1;
}

/* Forms */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border-color: rgba(11, 27, 61, 0.12);
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.2rem rgba(19, 84, 122, 0.15);
}

/* Footer */
footer {
  background: var(--primary) !important;
  margin-top: auto;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

footer h5 {
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
}

footer p,
footer a {
  color: rgba(255, 255, 255, 0.65) !important;
}

footer a:hover {
  color: white !important;
}

/* Tables */
.table {
  --bs-table-bg: transparent;
}

.table-hover > tbody > tr:hover {
  background-color: rgba(19, 84, 122, 0.03);
}

/* Alerts */
.alert {
  border-radius: 0.75rem;
  border: none;
}

/* Border accent */
.border-accent {
  border: 2px solid var(--accent) !important;
}

/* Conference website call-out on the public CFP page */
.website-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f2f6fc 100%);
  border: 1px solid rgba(13, 110, 253, 0.18);
  box-shadow: 0 0.125rem 0.35rem rgba(15, 23, 42, 0.06);
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.website-banner:hover,
.website-banner:focus {
  transform: translateY(-2px);
  border-color: rgba(13, 110, 253, 0.45);
  box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.14);
  color: inherit;
}

/* Breadcrumb on gradient */
.page-header-gradient .breadcrumb-item a,
.page-header-gradient .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.8);
}

.page-header-gradient .breadcrumb-item a:hover {
  color: #fff;
}

/* Navbar bell badge */
.navbar .badge {
  transform: translate(-20%, -10%);
  font-weight: 700;
  padding: 0.25em 0.5em;
}

/* Notification link styling */
.notif-link {
  color: inherit;
  text-decoration: none;
}
.notif-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Touch-friendly hit areas on mobile */
.btn {
  min-height: 2.5rem;
}

/* Review score pills */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(11, 27, 61, 0.12);
  border-radius: 0.75rem;
  padding: 0.35rem 0.6rem;
  margin: 0.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}
.score-pill .score-num {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}
.score-pill .score-label {
  font-size: 0.78rem;
  color: var(--text-slate);
  max-width: 8rem;
  line-height: 1.1;
}
.score-pill:hover {
  border-color: var(--primary-light);
  background: rgba(19, 84, 122, 0.05);
}
.score-pill.selected {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, rgba(19, 84, 122, 0.1), rgba(128, 208, 199, 0.15));
  box-shadow: 0 0 0 0.15rem rgba(19, 84, 122, 0.12);
}
.score-pill.selected .score-num {
  color: var(--secondary);
}
/* Score color coding: high = accept (green), low = reject (red) */
.score-pill[data-score="10"].selected,
.score-pill[data-score="9"].selected,
.score-pill[data-score="8"].selected {
  border-color: #198754;
  background: rgba(25, 135, 84, 0.08);
  box-shadow: 0 0 0 0.15rem rgba(25, 135, 84, 0.15);
}
.score-pill[data-score="10"].selected .score-num,
.score-pill[data-score="9"].selected .score-num,
.score-pill[data-score="8"].selected .score-num {
  color: #198754;
}
.score-pill[data-score="7"].selected {
  border-color: #D4A017;
  background: rgba(212, 160, 23, 0.08);
  box-shadow: 0 0 0 0.15rem rgba(212, 160, 23, 0.15);
}
.score-pill[data-score="7"].selected .score-num {
  color: #C37B24;
}
.score-pill[data-score="6"].selected,
.score-pill[data-score="5"].selected,
.score-pill[data-score="4"].selected {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.08);
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15);
}
.score-pill[data-score="6"].selected .score-num,
.score-pill[data-score="5"].selected .score-num,
.score-pill[data-score="4"].selected .score-num {
  color: #dc3545;
}

/* Responsive */
@media (max-width: 992px) {
  .navbar-collapse {
    max-height: 85vh;
    overflow-y: auto;
  }
  .navbar .dropdown-menu {
    border-radius: 0.5rem;
  }
  .btn-lg {
    min-height: 3rem;
    white-space: normal;
  }
  .card {
    border-radius: 0.85rem;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 5rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .lead {
    font-size: 1.15rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .stat-card h3 {
    font-size: 2rem;
  }

  .page-header {
    padding: 2.5rem 0;
  }

  /* Stack wide forms and give touch-friendly padding */
  .form-control,
  .form-select {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Deadline items wrap gracefully */
  .deadline-item {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  /* Reduce giant hero badge font on small screens */
  .hero-badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
  }

  .website-banner {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero .lead {
    font-size: 1.05rem;
  }
  .section-title h2 {
    font-size: 1.75rem;
  }
  .navbar-brand {
    font-size: 1.4rem;
  }
  .footer .col-md-6 {
    text-align: center;
  }
}

/* Markdown-rendered conference content */
.conf-md { line-height: 1.6; }
.conf-md p:last-child { margin-bottom: 0; }
.conf-md ul, .conf-md ol { padding-left: 1.25rem; margin-bottom: .75rem; }
.conf-md li { margin-bottom: .25rem; }
.conf-md h1, .conf-md h2, .conf-md h3, .conf-md h4 { margin-top: 1rem; margin-bottom: .5rem; font-weight: 600; }
.conf-md h1 { font-size: 1.35rem; }
.conf-md h2 { font-size: 1.2rem; }
.conf-md h3 { font-size: 1.1rem; }
.conf-md h4 { font-size: 1rem; }
.conf-md code { background: rgba(13,110,253,.08); padding: .1em .35em; border-radius: .3rem; font-size: .9em; }
.conf-md pre { background: #f6f8fa; border: 1px solid #e2e8f0; border-radius: .5rem; padding: .75rem 1rem; overflow-x: auto; margin-bottom: .75rem; }
.conf-md pre code { background: none; padding: 0; }
.conf-md blockquote { border-left: 3px solid #dee2e6; padding-left: .9rem; margin: .75rem 0; color: #64748b; }
.conf-md hr { margin: 1rem 0; opacity: .3; }
.conf-md a { word-break: break-word; }

/* Review scoring-history histogram */
.score-hist-bar { background: #0d6efd; opacity: .85; }
.score-hist-bar:hover { opacity: 1; }

/* CFP comparison tool */
.compare-toolbar { position: sticky; top: 76px; z-index: 900; box-shadow: 0 4px 12px rgba(11,27,61,.08); }
.compare-check { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.compare-check .form-check-input { cursor: pointer; }
.compare-check:has(input:checked) label { color: #0d6efd; font-weight: 600; }
.compare-table th, .compare-table td { vertical-align: middle; }

/* Admin dashboard trend bars */
.admin-bar { background: #0d6efd; opacity: .85; }
.admin-bar:hover { opacity: 1; }

/* Print-friendly CFP pages */
@media print {
  .navbar, .footer, #back-to-top, .btn, .compare-toolbar, form, .share-buttons {
    display: none !important;
  }
  body { background: #fff !important; }
  .page-header-gradient, .page-header-soft { background: #fff !important; padding: 0 !important; }
  .page-header-gradient h1, .page-header-gradient p, .page-header-soft h1, .page-header-soft p { color: #000 !important; }
  .card { border: none !important; box-shadow: none !important; }
  .container { max-width: 100% !important; }
}
