/* IFS Haze Agent Dashboard Styles
   Faithfully styled after ui_mockup.png
*/

:root {
  --card-bg: #eceef1;
  --card-border: #111111;
  --card-radius: 28px;
  --pill-radius: 8px;
  --text-main: #000000;
  --text-muted: #555555;
  --primary-btn: #000000;
  --primary-btn-text: #ffffff;
  --accent-color: #0b457f;
  --danger-color: #d32f2f;
  --success-color: #2e7d32;
  --warning-color: #ed6c02;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f7f9fb;
  color: var(--text-main);
  line-height: 1.4;
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.main-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Base Card Style */
.campus-card,
.notice-card,
.metric-card,
.instructions-card {
  background-color: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 22px 28px;
}

/* TOP ROW */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ifs-logo {
  height: 95px;
  width: auto;
  object-fit: contain;
}

.campus-card {
  flex: 1 1 380px;
  padding: 16px 22px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.campus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.campus-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.region-badge {
  background-color: #000000;
  color: #ffffff;
  padding: 4px 14px;
  border-radius: var(--pill-radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.campus-address {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
}

.auth-subscribe-container {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.subscribe-btn {
  background-color: var(--primary-btn);
  color: var(--primary-btn-text);
  border: none;
  border-radius: 16px;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1.25;
}

.subscribe-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.subscribe-btn:active {
  transform: translateY(0);
}

.user-status {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.sign-out-link {
  color: var(--danger-color);
  text-decoration: underline;
  cursor: pointer;
}

/* NOTICE CARD (ROW 2) */
.notice-card {
  padding: 24px 28px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 24px;
}

.notice-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
}

.notice-links {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notice-links a {
  color: #004b93;
  text-decoration: none;
  font-weight: 600;
}

.notice-links a:hover {
  text-decoration: underline;
}

.link-separator {
  color: #888888;
}

/* HOLIDAY BANNER */
.holiday-banner {
  background-color: #fff3cd;
  border: 1.5px solid #ffeeba;
  color: #856404;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 20px;
}

/* DUAL METRIC CARDS (ROW 3) */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  padding: 24px 28px;
}

.metric-heading {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--text-main);
  margin-bottom: 8px;
}

.metric-body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 10px 0;
}

.metric-value-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.metric-number {
  font-size: 125px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -2px;
}

.metric-unit {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  align-self: flex-end;
  margin-bottom: 16px;
}

.metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.tier-badge {
  background: #000000;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
}

.tier-normal { background: #2e7d32; }
.tier-elevated { background: #ed6c02; }
.tier-high { background: #d32f2f; }
.tier-veryhigh { background: #7b1fa2; }

/* INSTRUCTIONS CARD (ROW 4) */
.instructions-card {
  padding: 28px 32px;
  border-radius: 28px;
}

.instructions-heading {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}

.instructions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instruction-row {
  font-size: 20px;
  line-height: 1.45;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.school-level {
  font-weight: 800;
  color: var(--text-main);
  flex-shrink: 0;
}

.instruction-text {
  font-weight: 500;
  color: #1a1a1a;
}

/* FOOTER BAR */
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  background-color: var(--success-color);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.pipe {
  color: #cccccc;
}

.sync-btn {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sync-btn:hover {
  background: #f0f0f0;
  border-color: #999999;
}

/* MODAL STYLES */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 19px;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #777777;
}

.modal-body {
  font-size: 15px;
  color: #333333;
}

.modal-desc {
  margin: 12px 0 20px 0;
  line-height: 1.4;
  color: #555555;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #000000;
  color: #ffffff;
}

.btn-danger {
  background: #d32f2f;
  color: #ffffff;
}

/* RESPONSIVENESS */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-number {
    font-size: 90px;
  }
  .top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .logo-container {
    justify-content: center;
  }
  .auth-subscribe-container {
    align-items: center;
  }
  .subscribe-btn {
    width: 100%;
  }
  .instruction-row {
    font-size: 17px;
  }
}
