/* ============================================================
   HIT Global — Shared Stylesheet
   Brand palette sourced from hitglobal.services
   ============================================================ */

:root {
  --teal:       #2e919c;
  --teal-mid:   #237885;
  --teal-dark:  #1a5e68;
  --teal-light: #e4f4f6;
  --charcoal:   #333333;
  --pink:       #ec008c;
  --pink-light: #fce4f3;
  --white:      #ffffff;
  --off-white:  #f8f6f5;
  --border:     #cde5e8;
  --text:       #1a3035;
  --text-muted: #4d7a82;
  --font-main:  'Segoe UI', Arial, sans-serif;
  --radius:     6px;
  --shadow:     0 2px 12px rgba(46,144,157,.10);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header / nav bar ── */
.site-header {
  background: var(--charcoal);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-header .logo img {
  height: 38px;
  width: auto;
  border-radius: 4px;
}

.site-header .logo-text {
  color: var(--pink);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.site-header .logo-text span {
  color: var(--teal);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header nav a,
.site-header nav button {
  color: rgba(255,255,255,.85);
  background: none;
  border: none;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.site-header nav a:hover,
.site-header nav button:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

.site-header .user-badge {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-right: 4px;
}

/* ── Mobile header ── */
@media (max-width: 600px) {
  .site-header {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-header .logo {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header .logo img {
    height: 28px;
    flex-shrink: 0;
  }

  .site-header .logo-text {
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 8px;
    gap: 6px;
  }

  .site-header .user-badge {
    font-size: .75rem;
    margin-right: 2px;
  }

  .site-header nav a,
  .site-header nav button {
    font-size: .82rem;
    padding: 5px 10px;
  }

  /* Keep the report toolbar below the taller header */
  .report-toolbar {
    top: 0;
    position: static;
  }
}

/* ── Page wrapper ── */
.page-wrap {
  max-width: 860px;
  margin: 48px auto;
  padding: 0 24px;
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
}

/* ── Page titles ── */
.page-title {
  color: var(--teal-dark);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 28px;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ── Form elements ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--off-white);
  transition: border-color .15s, box-shadow .15s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46,144,157,.18);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-mid); box-shadow: 0 4px 12px rgba(46,144,157,.30); }

.btn-accent {
  background: var(--pink);
  color: var(--white);
}
.btn-accent:hover { background: #c8177a; box-shadow: 0 4px 12px rgba(233,30,140,.25); }

.btn-outline {
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
}
.btn-outline:hover { background: var(--teal-light); }

.btn-danger {
  background: transparent;
  color: #b71c1c;
  border: 1.5px solid #d32f2f;
}
.btn-danger:hover { background: #fdecea; }

.btn-sm {
  padding: 7px 16px;
  font-size: .85rem;
}

.btn:disabled,
.btn[disabled] {
  background: #c8d0d1;
  color: #8a9ea1;
  border-color: transparent;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── Alert / error ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 20px;
}

.alert-error {
  background: #fdecea;
  border-left: 4px solid #d32f2f;
  color: #b71c1c;
}

.alert-success {
  background: #e4f4f6;
  border-left: 4px solid var(--teal);
  color: var(--teal-dark);
}

/* ── Report-specific styles ── */
.report-toolbar {
  position: sticky;
  top: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.report-body {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 32px;
}

.report-body h1 {
  color: var(--teal-dark);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.report-body .report-meta {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 40px;
}

.report-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  overflow: hidden;
}

.report-section-header {
  background: var(--teal);
  color: var(--white);
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.report-section-body {
  padding: 24px 28px;
}

.report-section-body h3 { color: var(--teal-mid); margin: 18px 0 6px; }

.report-section-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: .9em;
}

.report-section-body th {
  background: var(--teal);
  color: var(--white);
  padding: 9px 13px;
  text-align: left;
  font-weight: 600;
}

.report-section-body td {
  border: 1px solid var(--border);
  padding: 8px 13px;
  vertical-align: top;
}

.report-section-body tr:nth-child(even) td { background: var(--teal-light); }

/* ── Past-reports table ── */
.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.reports-table thead th {
  background: var(--teal);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .83rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reports-table thead th:last-child { width: 120px; text-align: right; }

.reports-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.reports-table tbody tr:last-child { border-bottom: none; }
.reports-table tbody tr:hover { background: var(--teal-light); }

.reports-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.reports-name {
  font-weight: 600;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-icon { font-size: 1.1rem; flex-shrink: 0; }

.reports-date { color: var(--text-muted); font-size: .85rem; white-space: nowrap; }
.reports-size { color: var(--text-muted); font-size: .85rem; white-space: nowrap; }

.reports-action {
  text-align: right;
  white-space: nowrap;
}

.reports-action .btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.reports-dl-arrow {
  font-style: normal;
  line-height: 1;
}

/* ── Reports table — mobile ── */
@media (max-width: 600px) {
  .reports-table thead { display: none; }

  .reports-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    gap: 4px 0;
    border-bottom: 1px solid var(--border);
  }

  .reports-table td {
    display: block;
    padding: 0;
    border: none;
  }

  .reports-name {
    width: 100%;
    font-size: .92rem;
    margin-bottom: 4px;
  }

  .reports-date {
    flex: 1;
    font-size: .78rem;
  }

  .reports-size {
    font-size: .78rem;
    margin-left: 8px;
  }

  .reports-size::before { content: "·"; margin-right: 8px; color: var(--border); }

  .reports-action {
    width: 100%;
    text-align: left;
    margin-top: 10px;
    display: flex;
    gap: 8px;
  }

  .reports-action .btn-sm {
    flex: 1;
    justify-content: center;
  }
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state.compact {
  padding: 8px 24px 4px;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.empty-state.compact .empty-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.empty-state p { font-size: .97rem; }
.empty-state a { color: var(--teal-mid); text-decoration: underline; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.site-footer a {
  color: var(--teal-mid);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }