/* SAP Fiori Horizon — tema condiviso FtvConnect 4.0 */
:root {
  --sapBrand: #0070f2;
  --sapBrandHover: #0064d9;
  --sapBrandPress: #0055b8;
  --sapShell: #00144a;
  --sapShellHover: #0a2a6a;
  --sapBg: #f5f6f7;
  --sapBg2: #eaecee;
  --sapTile: #ffffff;
  --sapText: #1d2d3e;
  --sapTextAlt: #556b81;
  --sapBorder: #d9d9d9;
  --sapBorderLite: #e5e5e5;
  --sapPositive: #256f3a;
  --sapPositiveBg: #e5f5e6;
  --sapNegative: #aa0808;
  --sapNegativeBg: #ffeaea;
  --sapCritical: #e76500;
  --sapCriticalBg: #fff4e5;
  --sapInfo: #0070f2;
  --sapInfoBg: #e8f4ff;
  --sapShadow: 0 0.125rem 0.5rem rgba(34, 53, 72, 0.12), 0 0 0 1px rgba(34, 53, 72, 0.06);
  --sapRadius: 0.5rem;
  --sapFont: "72", "72full", "Segoe UI", Arial, Helvetica, sans-serif;
  --sapShellH: 2.75rem;
}

html { color-scheme: light; }
body.sap-app,
body.sap-login {
  margin: 0;
  font-family: var(--sapFont);
  background: var(--sapBg);
  color: var(--sapText);
  min-height: 100vh;
}

.sap-diamond {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-block;
  background: var(--sapBrand);
  transform: rotate(45deg);
  border-radius: 0.15rem;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
  flex-shrink: 0;
}
.sap-diamond--lg {
  width: 2.1rem;
  height: 2.1rem;
  background: linear-gradient(135deg, #4db1ff, #0070f2);
}

/* —— Login Fiori —— */
.sap-login {
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0,112,242,.18), transparent 50%),
    linear-gradient(180deg, #00144a 0%, #0a2a6a 42%, #f5f6f7 42%);
}
.sap-login-card {
  width: min(26.5rem, 92vw);
  background: var(--sapTile);
  border-radius: var(--sapRadius);
  box-shadow: 0 0.5rem 1.75rem rgba(0, 20, 74, 0.22);
  padding: 2rem 1.75rem 1.5rem;
}
.sap-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.sap-login-brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sapText);
  letter-spacing: 0;
}
.sap-login-brand p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--sapTextAlt);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sap-login .sap-field { margin: 0.85rem 0 0; }
.sap-login label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sapText);
  margin-bottom: 0.35rem;
}
.sap-login .sap-input-row { display: flex; gap: 0.4rem; }
.sap-login input[type="password"],
.sap-login input[type="text"] {
  flex: 1;
  width: 100%;
  height: 2.25rem;
  border: 1px solid var(--sapBorder);
  border-radius: 0.25rem;
  padding: 0 0.65rem;
  font: inherit;
  color: var(--sapText);
  background: #fff;
}
.sap-login input:focus {
  outline: none;
  border-color: var(--sapBrand);
  box-shadow: 0 0 0 1px var(--sapBrand);
}
.sap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 0.25rem;
  font: 700 0.875rem var(--sapFont);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.sap-btn-emph { background: var(--sapBrand); color: #fff; }
.sap-btn-emph:hover { background: var(--sapBrandHover); }
.sap-btn-ghost {
  background: #fff;
  color: var(--sapBrand);
  border: 1px solid var(--sapBrand);
}
.sap-btn-ghost:hover { background: var(--sapInfoBg); }
.sap-btn-neg { background: var(--sapNegative); color: #fff; }
.sap-btn-neg:hover { filter: brightness(1.05); }
.sap-btn-lite {
  background: #fff;
  color: var(--sapText);
  border: 1px solid var(--sapBorder);
}
.sap-login .sap-btn-emph { width: 100%; margin-top: 1.1rem; }
.sap-msg-err {
  background: var(--sapNegativeBg);
  border-left: 4px solid var(--sapNegative);
  color: var(--sapNegative);
  padding: 0.65rem 0.8rem;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}
.sap-msg-ok {
  background: var(--sapPositiveBg);
  border-left: 4px solid var(--sapPositive);
  color: var(--sapPositive);
  padding: 0.65rem 0.8rem;
  font-size: 0.8125rem;
}
.sap-msg-warn {
  background: var(--sapCriticalBg);
  border-left: 4px solid var(--sapCritical);
  color: #7a3b00;
  padding: 0.65rem 0.8rem;
  font-size: 0.8125rem;
}

/* —— Shell bar —— */
.navbar.sap-shell,
.sap-shell {
  background: var(--sapShell);
  color: #fff;
  min-height: var(--sapShellH);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 0.35rem 0 0.75rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 0.125rem 0.375rem rgba(0,0,0,.28);
}
.navbar.sap-shell a,
.navbar.sap-shell .dropdown-toggle,
.sap-shell a,
.sap-shell .dropdown-toggle {
  color: #fff !important;
  text-decoration: none;
  font-size: 0.8125rem !important;
  font-weight: 600;
  padding: 0.7rem 0.7rem !important;
  display: block;
  text-align: center;
  transition: background .15s ease;
  border-radius: 0.2rem;
}
.sap-shell a:hover,
.sap-shell .dropdown-toggle:hover { background: var(--sapShellHover) !important; }
.sap-brand {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem !important;
  margin-right: 0.35rem;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  letter-spacing: .01em;
}
.sap-brand:hover { background: transparent !important; }
.sap-shell .button,
.sap-shell a.button {
  background: var(--sapBrand) !important;
  border-radius: 0.25rem;
  margin: 0.35rem 0.35rem 0.35rem 0;
  padding: 0.4rem 0.85rem !important;
  line-height: 1.3;
  font-size: 0.8125rem !important;
}
.sap-shell .button:hover { background: var(--sapBrandHover) !important; }
.sap-shell .dropdown-menu {
  background: #fff !important;
  border: 1px solid var(--sapBorder) !important;
  border-radius: var(--sapRadius) !important;
  box-shadow: var(--sapShadow) !important;
  min-width: 14rem;
  overflow: hidden;
}
.sap-shell .dropdown-menu a {
  color: var(--sapText) !important;
  text-align: left !important;
  font-weight: 500 !important;
  border-bottom: 1px solid var(--sapBorderLite) !important;
  padding: 0.6rem 0.9rem !important;
}
.sap-shell .dropdown-menu a:hover { background: var(--sapInfoBg) !important; color: var(--sapBrand) !important; }
.sap-shell .dropdown-section-title {
  background: var(--sapBg) !important;
  color: var(--sapTextAlt) !important;
  font-size: 0.6875rem !important;
  letter-spacing: .08em;
  border-top: 1px solid var(--sapBorderLite) !important;
  border-bottom: 1px solid var(--sapBorderLite) !important;
}
.sap-shell .submenu {
  background: #fff !important;
  border: 1px solid var(--sapBorder) !important;
}
.sap-shell .submenu a { color: var(--sapText) !important; }
.sap-shell .menu-toggle {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.45rem 0.7rem;
  margin-left: auto;
}

/* —— Launchpad —— */
.sap-lp {
  max-width: 86rem;
  margin: 0 auto;
  padding: 5.25rem 1.25rem 2.5rem;
  text-align: left;
}
.sap-lp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.sap-lp-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sapText);
}
.sap-lp-head .sub {
  margin: 0.2rem 0 0;
  color: var(--sapTextAlt);
  font-size: 0.875rem;
}
.sap-lp-meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--sapTextAlt);
  line-height: 1.45;
}
.sap-lp-meta strong { color: var(--sapText); }
.sap-lp-meta a { color: var(--sapBrand); }
.sap-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sapPositive);
  font-weight: 700;
  font-size: 0.75rem;
}
.sap-status i { font-size: 0.45rem; }

.sap-group { margin-bottom: 1.75rem; }
.sap-group-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--sapText);
}
.sap-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
}
.sap-tile {
  display: flex;
  flex-direction: column;
  min-height: 9.5rem;
  background: var(--sapTile);
  border-radius: var(--sapRadius);
  box-shadow: var(--sapShadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sap-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.4rem 1rem rgba(34, 53, 72, 0.18);
}
.sap-tile-bar { height: 0.35rem; background: var(--sapBrand); }
.sap-tile-bar.teal { background: #07838f; }
.sap-tile-bar.green { background: var(--sapPositive); }
.sap-tile-bar.orange { background: var(--sapCritical); }
.sap-tile-bar.indigo { background: #5d36ff; }
.sap-tile-bar.slate { background: #354a5f; }
.sap-tile-body { padding: 0.85rem 0.9rem 0.75rem; flex: 1; display: flex; flex-direction: column; }
.sap-tile-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.35rem;
  display: grid;
  place-items: center;
  background: var(--sapInfoBg);
  color: var(--sapBrand);
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}
.sap-tile-icon.teal { background: #e1f6f6; color: #07838f; }
.sap-tile-icon.green { background: var(--sapPositiveBg); color: var(--sapPositive); }
.sap-tile-icon.orange { background: var(--sapCriticalBg); color: var(--sapCritical); }
.sap-tile-icon.indigo { background: #efeaff; color: #5d36ff; }
.sap-tile-title { font-weight: 700; font-size: 0.9375rem; line-height: 1.25; }
.sap-tile-sub { margin-top: 0.25rem; font-size: 0.75rem; color: var(--sapTextAlt); line-height: 1.35; }
.sap-tile-foot { margin-top: auto; padding-top: 0.6rem; font-size: 0.6875rem; color: var(--sapBrand); font-weight: 700; }
.sap-tile--wide { grid-column: span 2; min-height: 8rem; flex-direction: row; align-items: stretch; }
.sap-tile--wide .sap-tile-bar { width: 0.4rem; height: auto; }
.sap-tile--wide .sap-tile-body { flex-direction: row; align-items: center; gap: 1rem; }
.sap-tile--wide .sap-tile-icon { width: 3rem; height: 3rem; font-size: 1.35rem; margin: 0; }
@media (max-width: 640px) {
  .sap-tile--wide { grid-column: span 1; }
  .sap-lp { padding-top: 6rem; }
}

.sap-obj {
  background: var(--sapTile);
  border-radius: var(--sapRadius);
  box-shadow: var(--sapShadow);
  padding: 1.25rem 1.35rem;
}
.sap-obj h2 { margin: 0 0 0.35rem; font-size: 1.125rem; }
.sap-muted { color: var(--sapTextAlt); font-size: 0.875rem; }
.sap-pill {
  display: inline-block;
  background: var(--sapInfoBg);
  color: var(--sapBrand);
  border-radius: 0.25rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.sap-field input[type="text"] {
  width: 100%;
  height: 2.25rem;
  border: 1px solid var(--sapBorder);
  border-radius: 0.25rem;
  padding: 0 0.65rem;
  font: inherit;
}
.sap-field label { display: block; font-size: 0.8125rem; font-weight: 700; margin: 0.9rem 0 0.3rem; }
.sap-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  background: var(--sapBg);
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
}
.sap-stats { margin: 0.6rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; }
.sap-creds { background: var(--sapBg); border-radius: 0.35rem; padding: 0.75rem 0.9rem; font-size: 0.8125rem; margin-top: 0.85rem; }
