@import url('https://fonts.cdnfonts.com/css/maiandra-gd');

/* FTZA Public Results Portal Stylesheet */
:root {
  --ftza-primary: #0e4d8d;
  --ftza-primary-dark: #0a3867;
  --ftza-accent: #00a3dd;
  --ftza-gold: #fcd116;
  --ftza-bg: #0f141c;
  --ftza-card-bg: #161c26;
  --ftza-border: rgba(255, 255, 255, 0.1);
  --ftza-text: #f0f4f8;
  --ftza-muted: #94a3b8;
  --ftza-font-family: 'Maiandra GD', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.public-results-body {
  background-color: var(--ftza-bg);
  color: var(--ftza-text);
  font-family: var(--ftza-font-family);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.public-results-body button,
body.public-results-body input,
body.public-results-body select,
body.public-results-body textarea {
  font-family: var(--ftza-font-family);
  box-sizing: border-box;
}

.barcode-text {
  font-family: 'Libre Barcode 39', cursive !important;
}

.public-navbar {
  background: linear-gradient(135deg, var(--ftza-primary-dark) 0%, var(--ftza-primary) 100%);
  border-bottom: 2px solid var(--ftza-gold);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.public-logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #ffffff;
}

.public-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ftza-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.public-title-group h1 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.02em;
  font-family: var(--ftza-font-family);
}

.public-title-group p {
  font-size: 0.78rem;
  margin: 2px 0 0 0;
  color: var(--ftza-gold);
  font-weight: 600;
  font-family: var(--ftza-font-family);
}

.public-container {
  max-width: 1560px;
  width: 96%;
  margin: 0 auto;
  padding: 24px 20px;
  flex: 1;
}

.public-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ftza-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-family: var(--ftza-font-family);
}

.public-breadcrumbs a {
  color: var(--ftza-accent);
  text-decoration: none;
  font-weight: 600;
}

.public-breadcrumbs a:hover {
  text-decoration: underline;
}

.public-card {
  background: var(--ftza-card-bg);
  border: 1px solid var(--ftza-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-item-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.stat-item-lbl {
  font-size: 0.78rem;
  color: var(--ftza-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.public-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--ftza-border);
}

.public-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.public-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #67d8ff;
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--ftza-border);
  white-space: nowrap;
}

.public-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.public-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-complete { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-absent { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-inc { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

/* IRMS-Style 4-Column Hierarchy Table Grid (FTZA Dark Theme) */
.irms-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px double var(--ftza-border);
  border-radius: 8px;
  background: var(--ftza-card-bg);
  overflow: hidden;
  margin-top: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.irms-column {
  border-left: 1px solid var(--ftza-border);
}

.irms-column:first-child {
  border-left: none;
}

.irms-column.col-blue {
  background: rgba(14, 77, 141, 0.15);
}

.irms-column.col-pink {
  background: rgba(236, 72, 153, 0.10);
}

.irms-column.col-green {
  background: rgba(16, 185, 129, 0.10);
}

.irms-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.irms-item:hover {
  background: rgba(0, 163, 221, 0.15);
}

.irms-item a {
  text-decoration: none;
  color: #67d8ff;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.irms-item a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* IRMS Search & Filter Bar */
.irms-filter-bar {
  text-align: center;
  margin: 16px 0 20px 0;
}

.irms-search-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 12px auto;
}

.irms-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ftza-border);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-family: inherit;
}

.irms-search-btn {
  background: #fcd116;
  color: #0b1d33;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}

.irms-search-btn:hover {
  background: #ffe359;
}

.irms-btn-all {
  background: #fcd116;
  color: #0b1d33;
  border: none;
  border-radius: 4px;
  padding: 5px 14px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 8px;
  font-family: inherit;
}

.irms-alpha-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ftza-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.irms-alpha-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.irms-alpha-btn {
  background: rgba(14, 77, 141, 0.3);
  border: 1px solid rgba(0, 163, 221, 0.3);
  color: #67d8ff;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.irms-alpha-btn:hover, .irms-alpha-btn.active {
  background: var(--ftza-accent);
  color: #ffffff;
  border-color: var(--ftza-accent);
}

.public-footer {
  background: var(--ftza-primary-dark);
  border-top: 1px solid var(--ftza-border);
  padding: 24px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ftza-muted);
  margin-top: auto;
  font-family: var(--ftza-font-family);
}

@media (max-width: 900px) {
  .irms-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 550px) {
  .irms-container {
    grid-template-columns: 1fr !important;
  }
}

@media print {
  body.public-results-body { background: #ffffff !important; color: #000000 !important; }
  .public-navbar, .public-footer, .az-bar, .no-print { display: none !important; }
  .public-card { border: none !important; box-shadow: none !important; padding: 0 !important; }
  .public-table th, .public-table td { border-color: #cccccc !important; color: #000000 !important; }
}
