/* =============================================
   UNCS Employee Resources — Mobile-First Styles
   ============================================= */

:root {
  --uncs-red: #aa2327;
  --uncs-dark: #232122;
  --uncs-gray: #7f7f7f;
  --uncs-blue: #3B5EDB;
  --bg: #f7f7f8;
  --white: #ffffff;
  --border: #e2e2e5;
  --text: #1a1a1b;
  --text-muted: #5a5a5e;
  --green: #1a7a3a;
  --green-bg: #e8f5ec;
  --blue-bg: #e8eef8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,.1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--uncs-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---- NAV ---- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--uncs-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  box-shadow: var(--shadow-md);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--uncs-red);
  letter-spacing: 1px;
}
.nav-title { font-size: 14px; font-weight: 500; opacity: .9; }
.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}
.nav-links {
  display: none;
  list-style: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--uncs-dark);
  padding: 8px 0;
  box-shadow: var(--shadow-md);
}
.nav-links.open { display: block; }
.nav-links li a {
  display: block;
  padding: 12px 24px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s;
}
.nav-links li a:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--uncs-dark) 0%, #3a3839 100%);
  color: var(--white);
  padding: 48px 20px 56px;
  text-align: center;
}
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.hero-sub { font-size: 16px; opacity: .85; }

/* ---- QUICK LINKS ---- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: -28px auto 24px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}
.ql-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 8px;
  text-align: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  border: 1px solid var(--border);
}
.ql-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  text-decoration: none;
  border-color: var(--uncs-blue);
}
.ql-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--uncs-dark);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
}
.ql-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--uncs-dark);
}

/* ---- SECTIONS ---- */
.section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 24px auto;
  padding: 28px 20px;
  max-width: 900px;
}
.section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--uncs-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--uncs-red);
}
.section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--uncs-dark);
  margin: 24px 0 10px;
}

.plan-year {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.broker-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.plan-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

/* ---- CALLOUTS ---- */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 15px;
}
.callout-green { background: var(--green-bg); border-left: 4px solid var(--green); }
.callout-blue { background: var(--blue-bg); border-left: 4px solid var(--uncs-blue); }
.callout ul { margin: 8px 0 0 20px; }
.callout li { margin-bottom: 4px; }
.fine-print { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ---- TABLES ---- */
.plan-card {
  margin: 12px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.plan-card h4 {
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}
.plan-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--uncs-blue);
  margin-left: 8px;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}
thead { background: var(--uncs-dark); color: var(--white); }
th { padding: 10px 12px; text-align: left; font-weight: 600; font-size: 13px; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #fafafa; }
td:last-child { font-weight: 600; color: var(--uncs-dark); }

/* ---- ACCORDION ---- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 8px 0;
  overflow: hidden;
}
.accordion summary {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  background: #fafafa;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.accordion summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--text-muted); }
.accordion[open] summary::after { content: '\2212'; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion-body { padding: 16px; }
.accordion-body ul { margin-left: 20px; }
.accordion-body li { margin-bottom: 6px; font-size: 14px; }
.accordion-body h5 { margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: var(--uncs-dark); }

/* ---- CARRIER CARDS ---- */
.carrier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.carrier-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafafa;
}
.carrier-card h4 { font-size: 16px; margin-bottom: 4px; }
.carrier-type { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

/* ---- LINK CARDS ---- */
.link-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.link-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: #fafafa;
  transition: box-shadow .15s, border-color .15s;
  position: relative;
}
.link-card:hover { box-shadow: var(--shadow-md); border-color: var(--uncs-blue); text-decoration: none; }
.link-card h4 { color: var(--uncs-blue); font-size: 16px; margin-bottom: 4px; }
.link-card p { color: var(--text-muted); font-size: 14px; }
.placeholder-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

/* ---- CTA ---- */
.cta-block { text-align: center; margin: 24px 0 8px; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--uncs-red); color: var(--white); }
.btn-primary:hover { background: #8c1d20; }
.btn-secondary { background: var(--uncs-blue); color: var(--white); }
.btn-secondary:hover { background: #2c4ab3; }

/* ---- FORMS ---- */
.hr-form { max-width: 560px; }
.mini-form { margin: 0; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--uncs-dark);
}
.req { color: var(--uncs-red); }
.optional { font-weight: 400; color: var(--text-muted); font-size: 13px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--uncs-blue);
  box-shadow: 0 0 0 3px rgba(59,94,219,.12);
}
.form-disclaimer { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ---- INFO BLOCK ---- */
.info-block {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.info-block h3 { margin-top: 0; }
.info-block h4 { font-size: 15px; margin: 12px 0 6px; }
.info-block ul { margin-left: 20px; }
.info-block li { margin-bottom: 6px; font-size: 14px; }

/* ---- TIPS ---- */
.tip-carousel { text-align: center; padding: 12px 0; }
.tip-card {
  background: linear-gradient(135deg, var(--green-bg) 0%, var(--blue-bg) 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tip-text { font-size: 17px; font-weight: 500; color: var(--uncs-dark); line-height: 1.5; }
.tip-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.tip-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.tip-btn:hover { background: var(--bg); }
.tip-counter { font-size: 14px; color: var(--text-muted); min-width: 40px; }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: #fafafa;
}
.contact-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--uncs-dark); }
.contact-card p { font-size: 14px; margin-bottom: 4px; }

/* ---- FOOTER ---- */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

/* ---- FORM SUCCESS ---- */
.form-success {
  background: var(--green-bg);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--green);
}

/* ---- ONBOARDING CHECKLIST ---- */
.onboarding-checklist { margin: 20px 0 28px; }
.checklist-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.checklist-item:last-child { border-bottom: none; }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--uncs-red);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.checklist-item h4 { font-size: 16px; margin-bottom: 4px; color: var(--uncs-dark); }
.checklist-item p { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.btn-small {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--uncs-blue);
  color: var(--white);
  text-decoration: none;
  transition: background .15s;
}
.btn-small:hover { background: #2c4ab3; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--uncs-blue);
  border: 1px solid var(--uncs-blue);
}
.btn-outline:hover { background: var(--uncs-blue); color: var(--white); }

/* ---- FIELDSETS ---- */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
legend {
  font-size: 16px;
  font-weight: 700;
  color: var(--uncs-dark);
  padding: 0 8px;
}

/* ---- FORM ROWS ---- */
.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 140px; }
.form-row .form-group-sm { flex: 0 1 120px; min-width: 90px; }

/* ---- CHECKBOX GRID ---- */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
}
.checkbox-label input { width: 18px; height: 18px; cursor: pointer; }

/* ---- SIGNATURE PAD ---- */
.sig-policy {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.sig-policy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.sig-policy-header h4 { font-size: 15px; margin: 0; }
.sig-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  background: #fef3c7;
  color: #b45309;
}
.sig-status.signed { background: var(--green-bg); color: var(--green); }
.sig-pad-wrap { margin-top: 10px; }
.sig-pad-wrap label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.sig-canvas {
  display: block;
  width: 100%;
  max-width: 400px;
  height: 120px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: crosshair;
  touch-action: none;
  margin: 6px 0;
}
.sig-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---- FILE INPUT ---- */
.file-input {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
  cursor: pointer;
  margin-top: 4px;
}
.file-input:hover { border-color: var(--uncs-blue); }

/* ---- I-9 LIST DETAILS ---- */
.i9-list-detail {
  margin-left: 26px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--uncs-dark);
  color: var(--white);
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .15s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: scale(1.1); }

/* ---- UNCS AI WIDGET ---- */
.ai-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--uncs-blue);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: transform .15s, box-shadow .15s;
}
.ai-widget:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(59,94,219,.3);
  text-decoration: none;
  color: var(--white);
}
.ai-widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
}
.ai-widget-label { white-space: nowrap; }

/* ---- LOGIN SCREEN ---- */
.login-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--uncs-dark) 0%, #3a3839 100%);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.login-logo {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--uncs-red);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.login-card h1 { font-size: 22px; color: var(--uncs-dark); margin-bottom: 8px; }
.login-card > p { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }
.login-btn { width: 100%; padding: 14px; font-size: 16px; margin-bottom: 16px; }

/* ---- NAV USER ---- */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  color: rgba(255,255,255,.7);
}
.nav-logout {
  color: rgba(255,255,255,.5) !important;
  font-size: 13px;
}
.nav-logout:hover { color: var(--white) !important; }

/* =============================================
   TABLET+ (640px)
   ============================================= */
@media (min-width: 640px) {
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .carrier-grid { grid-template-columns: repeat(3, 1fr); }
  .link-cards { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 34px; }
  .section { padding: 32px 28px; }
}

/* =============================================
   DESKTOP (768px)
   ============================================= */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    gap: 4px;
  }
  .nav-links li a { padding: 8px 14px; font-size: 14px; border-radius: 6px; }
  .nav-user { padding: 0 0 0 12px; border-left: 1px solid rgba(255,255,255,.2); }
  .hero { padding: 56px 20px 48px; }
  table { min-width: auto; }
}
