/*
 * Jigphish 360 design foundation
 * Shared product skin for admin, client dashboards and login surfaces.
 */
:root {
  --j360-bg: #f5f7fb;
  --j360-surface: #ffffff;
  --j360-surface-soft: #f9fafb;
  --j360-surface-tint: #eef6ff;
  --j360-ink: #101828;
  --j360-ink-soft: #344054;
  --j360-muted: #667085;
  --j360-line: #d9e2ec;
  --j360-line-strong: #b8c5d6;
  --j360-primary: #0f4c81;
  --j360-primary-2: #0ea5e9;
  --j360-accent: #f5b60a;
  --j360-success: #16a34a;
  --j360-warning: #d97706;
  --j360-danger: #dc2626;
  --j360-info: #2563eb;
  --j360-radius: 12px;
  --j360-radius-sm: 8px;
  --j360-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  --j360-shadow-soft: 0 8px 22px rgba(16, 24, 40, 0.06);
  --j360-shadow-sm: 0 4px 12px rgba(16, 24, 40, 0.04);
  --j360-font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

html {
  letter-spacing: 0;
}

body {
  color: var(--j360-ink);
}

body.j360-app,
body.j360-login {
  font-family: var(--j360-font);
  background:
    radial-gradient(900px 280px at 0% -8%, rgba(14, 165, 233, 0.12), transparent 58%),
    radial-gradient(760px 260px at 100% -8%, rgba(245, 182, 10, 0.12), transparent 58%),
    linear-gradient(180deg, #fbfcff 0%, var(--j360-bg) 46%, #eef3f8 100%);
}

.j360-page {
  padding: 24px;
}

.j360-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.j360-hero,
.j360-panel,
.j360-card {
  border: 1px solid var(--j360-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--j360-shadow-soft);
}

.j360-hero {
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.j360-hero h1 {
  margin: 0 0 6px;
  color: var(--j360-ink);
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  line-height: 1.08;
  font-weight: 850;
}

.j360-hero p {
  margin: 0;
  color: var(--j360-muted);
  font-size: 0.96rem;
  max-width: 780px;
  line-height: 1.55;
}

.j360-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -130px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.20), transparent 70%);
}

.j360-hero > * {
  position: relative;
  z-index: 1;
}

.j360-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--j360-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.j360-eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--j360-accent);
  border-radius: 999px;
}

.j360-title {
  margin: 0;
  color: var(--j360-ink);
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  line-height: 1.08;
  font-weight: 850;
}

.j360-subtitle {
  margin: 8px 0 0;
  color: var(--j360-muted);
  font-size: 0.96rem;
  max-width: 780px;
  line-height: 1.55;
}

.j360-panel {
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
}

.j360-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.j360-panel-header h2 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--j360-ink);
}

.j360-panel-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--j360-muted);
  line-height: 1.5;
}

.j360-panel-title {
  margin: 0 0 14px;
  color: var(--j360-ink);
  font-size: 1.02rem;
  font-weight: 800;
}

.j360-grid {
  display: grid;
  gap: 16px;
}

.j360-grid-2 {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
}

.j360-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.j360-card {
  border-radius: 14px;
  padding: 18px;
}

.j360-report-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  min-height: 160px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.j360-report-link:hover {
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(15, 76, 129, 0.24);
  box-shadow: var(--j360-shadow);
}

.j360-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 76, 129, 0.10);
  color: var(--j360-primary);
  font-size: 22px;
}

.j360-report-link h2 {
  margin: 6px 0 8px;
  color: var(--j360-ink);
  font-size: 18px;
  font-weight: 850;
}

.j360-report-link p {
  margin: 0;
  color: var(--j360-muted);
  line-height: 1.55;
}

.j360-card-arrow {
  align-self: start;
  color: var(--j360-muted);
  font-size: 20px;
}

.j360-muted {
  color: var(--j360-muted);
}

.j360-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.j360-form label,
.j360-label {
  display: block;
  margin-bottom: 2px;
  color: var(--j360-ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.j360-form .form-control,
.j360-form .custom-select,
.j360-form select,
.j360-form textarea,
.j360-form input[type="text"],
.j360-form input[type="password"],
.j360-form input[type="url"],
.j360-form input[type="file"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--j360-line);
  border-radius: var(--j360-radius-sm);
  color: var(--j360-ink);
  background: #fff;
  font-size: 0.92rem;
  box-shadow: none;
}

.j360-form input[type="file"] {
  padding: 6px 8px;
  cursor: pointer;
}

.j360-form .form-control:focus,
.j360-form .custom-select:focus,
.j360-form select:focus,
.j360-form textarea:focus,
.j360-form input:focus {
  border-color: var(--j360-primary-2);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

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

.j360-btn-primary,
.j360-btn-secondary,
.j360-btn-danger {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.j360-btn-primary {
  background: linear-gradient(135deg, var(--j360-primary), var(--j360-primary-2));
  color: #fff;
}

.j360-btn-secondary {
  background: #edf2f7;
  color: var(--j360-ink-soft);
}

.j360-refresh-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--j360-muted);
  align-self: center;
}

.j360-btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.j360-dropzone {
  border: 1px dashed var(--j360-line-strong);
  background: var(--j360-surface-soft);
  border-radius: 14px;
  padding: 18px;
}

.j360-file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.j360-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--j360-line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.j360-file-name {
  min-width: 0;
  color: var(--j360-ink);
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.j360-file-meta {
  color: var(--j360-muted);
  font-size: 12px;
}

.j360-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
}

.j360-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.j360-kpi {
  border: 1px solid var(--j360-line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--j360-shadow-sm);
}

.j360-kpi-label {
  color: var(--j360-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.j360-kpi-value {
  margin-top: 8px;
  color: var(--j360-ink);
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.j360-kpi-sub {
  margin-top: 8px;
  color: var(--j360-muted);
  font-size: 13px;
}

.j360-severity-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.j360-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--j360-surface-soft);
}

.j360-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.j360-critical { background: #dc2626; }
.j360-high { background: #f97316; }
.j360-medium { background: #f59e0b; }
.j360-low { background: #0ea5e9; }

.j360-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.j360-table th {
  color: var(--j360-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  background: var(--j360-surface-soft);
}

.j360-table th,
.j360-table td {
  border-bottom: 1px solid var(--j360-line);
  padding: 12px;
  vertical-align: middle;
}

.j360-table td {
  color: var(--j360-ink);
  font-size: 14px;
}

.j360-chart-box {
  min-height: 320px;
}

.j360-empty {
  border: 1px dashed var(--j360-line-strong);
  border-radius: 16px;
  background: var(--j360-surface-soft);
  color: var(--j360-muted);
  padding: 24px;
  text-align: center;
}

body.j360-login .login-container {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: stretch;
  padding: 0;
}

body.j360-login .login-container::before {
  content: "Jigphish 360";
  display: flex;
  align-items: flex-end;
  padding: 48px;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.98;
  font-weight: 900;
  background:
    linear-gradient(140deg, rgba(8, 33, 70, 0.92), rgba(15, 76, 129, 0.88) 52%, rgba(14, 165, 233, 0.82)),
    url("../images/jigphish/capa.png") center/cover no-repeat;
}

body.j360-login .login-card {
  width: auto;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 36px;
}

body.j360-login .login-form {
  width: 100%;
  max-width: 380px;
}

body.j360-login {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  line-height: 1.5;
  overflow-x: hidden;
}

body.j360-login .login-header {
  margin-bottom: 22px;
}

body.j360-login .neu-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 12px;
}

body.j360-login .login-logo {
  width: 56px !important;
  height: 56px !important;
}

body.j360-login .login-header h2 {
  color: var(--j360-ink);
  font-size: 1.65rem;
  font-weight: 850;
  margin-bottom: 4px;
}

body.j360-login .login-header p {
  color: var(--j360-muted);
  font-size: 14px;
  line-height: 1.45;
}

body.j360-login .form-group {
  margin-bottom: 18px;
}

body.j360-login .neu-input input {
  min-height: 54px;
  padding: 16px 48px 16px 54px;
}

body.j360-login .neu-input label {
  left: 54px;
}

body.j360-login .input-icon {
  left: 20px;
}

body.j360-login .form-options {
  gap: 10px;
  margin: -2px 0 18px;
}

body.j360-login .neu-button,
body.j360-login .login-btn {
  min-height: 50px;
  margin-bottom: 0;
  padding: 13px 24px;
}

body.j360-login .login-footer {
  padding-top: 18px;
}

body.j360-login .mfa-setup-panel {
  margin-bottom: 14px;
  padding: 10px;
}

body.j360-login .mfa-setup-panel img {
  width: 136px !important;
  height: 136px !important;
}

body.j360-login .neu-button,
body.j360-login .login-btn {
  background: linear-gradient(135deg, var(--j360-primary), var(--j360-primary-2)) !important;
  color: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 26px rgba(15, 76, 129, 0.20) !important;
}

body.j360-login .neu-input input {
  border-radius: 12px !important;
  background: #fff !important;
}

@media (max-width: 980px) {
  .j360-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .j360-grid-2 {
    grid-template-columns: 1fr;
  }

  .j360-grid-3 {
    grid-template-columns: 1fr;
  }

  body.j360-login .login-container {
    grid-template-columns: 1fr;
  }

  body.j360-login .login-container::before {
    display: none;
  }

  body.j360-login .login-card {
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px 20px;
  }
}

@media (max-width: 620px) {
  .j360-kpi-grid {
    grid-template-columns: 1fr;
  }

  body.j360-login .login-card {
    padding: 68px 16px 20px;
  }

  body.j360-login .login-header {
    margin-bottom: 18px;
  }

  body.j360-login .login-header h2 {
    font-size: 1.45rem;
  }
}

@media (max-height: 700px) and (min-width: 621px) {
  body.j360-login .login-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  body.j360-login .login-header {
    margin-bottom: 14px;
  }

  body.j360-login .neu-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 8px;
  }

  body.j360-login .login-logo {
    width: 48px !important;
    height: 48px !important;
  }

  body.j360-login .form-group {
    margin-bottom: 14px;
  }

  body.j360-login .mfa-setup-panel img {
    width: 112px !important;
    height: 112px !important;
  }
}

/* Risk badges for correlation table */
.j360-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.j360-badge-critical {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.j360-badge-high {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.j360-badge-medium {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.j360-badge-low {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.j360-badge-none {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.j360-badge-unmapped {
  background: var(--j360-surface-soft);
  color: var(--j360-muted);
  border: 1px solid var(--j360-line);
}

/* Correlation section */
.j360-corr-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--j360-surface-tint);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: var(--j360-radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--j360-ink-soft);
  line-height: 1.55;
}

.j360-corr-hint i {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--j360-primary-2);
  margin-top: 1px;
}

.j360-vuln-counts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.j360-table td.j360-td-email {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.j360-table td.j360-td-machine {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: var(--j360-ink-soft);
}
