:root {
  --bg: #f4f6f8;
  --fg: #1a2634;
  --card: #ffffff;
  --accent: #0f5b94;
  --line: #d6e1eb;
}
body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--fg);
  background: radial-gradient(circle at top right, #d7e8f7, var(--bg) 45%);
}
.center-box {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 1.2rem;
}
.brand-logo {
  width: min(440px, 80vw);
  height: auto;
  justify-self: center;
}
.brand-logo-fullscreen {
  width: min(23vw, 360px);
  max-height: 14vh;
  object-fit: contain;
}
.login-page .panel {
  width: min(520px, 92vw);
  justify-self: center;
}
.login-title {
  text-align: center;
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
}
.header-logo {
  width: 120px;
  height: auto;
}
.panel {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 0.5rem;
  min-width: 320px;
}
input, button, textarea {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #bdd1e2;
  font: inherit;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.9rem;
  border-radius: 8px;
  background: #0f5b94;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn-link.secondary {
  background: #e7eef5;
  color: #16344f;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}
.grid.service-grid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.admin-intro {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #eff7fd 0%, #e0effa 100%);
  padding: 0.9rem 1rem;
  color: #123e60;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin: 0.7rem 0 0.8rem;
}
.summary-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.75rem;
}
.summary-label {
  color: #53718c;
  font-size: 0.8rem;
}
.summary-value {
  margin-top: 0.2rem;
  font-weight: 700;
  color: #14354f;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.labelled-grid {
  gap: 0.7rem;
}
.field-col {
  display: grid;
  gap: 0.32rem;
}
.field-col > span {
  font-size: 0.83rem;
  color: #44627d;
  font-weight: 600;
}
.field-help {
  margin: -0.2rem 0 0.4rem;
  color: #52708a;
  font-size: 0.85rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2e8ef;
  padding: 0.45rem 0.35rem;
  text-align: left;
  vertical-align: top;
}
.actions {
  display: flex;
  gap: 0.35rem;
}
.acl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.35rem;
  margin: 0.6rem 0;
}
.acl-owner {
  color: #e07b39;
  font-size: 0.82em;
  font-weight: 600;
}
.tab-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tab-btn {
  background: #e7eef5;
  color: #15344f;
}
.active-tab {
  background: #0f5b94;
  color: #fff;
}
.split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}
.list-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.list-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
  max-height: 460px;
  overflow: auto;
  padding: 0.3rem;
}
.list-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.45rem;
  background: #fff;
}
.list-item {
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  background: #fff;
  color: #17354f;
  border: 1px solid #d6e1eb;
}
.list-item.selected-item {
  border-color: #4b8fc4;
  box-shadow: inset 0 0 0 1px rgba(75, 143, 196, 0.35);
  background: #f1f8ff;
}
.service-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.service-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #d8e3ed;
  background: #edf3f9;
  flex: 0 0 40px;
}
.service-icon-preview {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #d8e3ed;
  background: #edf3f9;
}
.icon-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 0.35rem;
}
.status-ok { background: #17a35d; }
.status-degraded { background: #f1a312; }
.status-down { background: #d33d3d; }
.health-box, .icon-box {
  border: 1px solid #d6e1eb;
  background: #f8fbfe;
  border-radius: 10px;
  padding: 0.8rem;
}
.container-table-wrap {
  margin-top: 0.6rem;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d6e1eb;
  border-radius: 8px;
  background: #fff;
}
.muted {
  color: #4b6178;
  font-size: 0.86rem;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .rules-banner-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .rules-banner-grid {
    grid-template-columns: 1fr;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .tile-icon-box {
    width: min(100%, 240px);
  }
  .brand-logo-fullscreen {
    width: min(42vw, 260px);
    max-height: 20vh;
  }
}
.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.category-strip {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.category-chip {
  text-decoration: none;
  border: 1px solid #c8d9e8;
  color: #20425f;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: #eef5fb;
  font-size: 0.86rem;
  font-weight: 600;
}
.category-chip.active {
  background: #0f5b94;
  border-color: #0f5b94;
  color: #fff;
}
.tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--card);
  color: inherit;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: #bdd3e6;
  box-shadow: 0 14px 26px rgba(15, 64, 103, 0.12);
}
.tile-icon-box {
  width: min(100%, 336px);
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid #d8e3ed;
  background: #edf3f9;
  display: grid;
  place-items: center;
  margin: 0 auto 0.8rem;
  overflow: hidden;
}
.tile-icon {
  width: 88%;
  height: 88%;
  border-radius: 12px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}
.tile h3 {
  margin: 0.1rem 0 0.25rem;
}
.tile p {
  margin: 0;
  color: #48637c;
}
.tile small {
  display: block;
  margin-top: 0.45rem;
  color: #4b6178;
}
.tile-comment {
  display: block;
  max-height: calc(1.35em * 15);
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.35;
  padding-right: 0.2rem;
}
.tile-comment b,
.tile-comment strong {
  font-weight: 700;
}
.service-categories {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.service-cat-badge {
  border-radius: 999px;
  border: 1px solid #c7d9e8;
  background: #f0f6fc;
  color: #234662;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
}
.rules-banner {
  margin-top: 0.85rem;
  border: 1px solid #c5daec;
  border-radius: 12px;
  padding: 0.75rem;
  background: linear-gradient(180deg, #f2f8fd 0%, #e7f2fb 100%);
}
.rules-banner-title {
  font-weight: 700;
  color: #123c5d;
}
.rules-banner-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.rules-banner-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.55rem;
}
.rules-ack-btn {
  border: 1px solid #2c8c3f;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: linear-gradient(180deg, #41bb5a 0%, #2f9745 100%);
  color: #fff;
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.rules-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.rules-pill {
  border: 1px solid #c7dbed;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 0.48rem 0.55rem;
  color: #23465f;
  font-size: 0.86rem;
  line-height: 1.35;
}
.compact-grid {
  margin-bottom: 0.7rem;
}
.category-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.auth-error {
  background: #ffe8e8;
  border: 1px solid #f2b7b7;
  color: #7a1f1f;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  max-width: min(520px, 92vw);
  margin: 0 auto 0.3rem;
  font-weight: 600;
}

.session-notice {
  background: #e8f4ff;
  border: 1px solid #b8d8f2;
  color: #1f4868;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  max-width: min(520px, 92vw);
  margin: 0 auto 0.6rem;
  font-weight: 600;
}


.dashboard-page {
  background: transparent;
}
.dashboard-page .header,
.dashboard-page .admin-layout {
  position: relative;
  z-index: 5;
}
.parallax-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, #83bfe9 0%, #acd8f6 42%, #e5f4ff 100%);
}
.parallax-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(2400px, 160vw);
  max-width: none;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  user-select: none;
}
.layer-base {
  z-index: 1;
  width: max(1680px, 112vw);
}
.layer-lv {
  z-index: 2;
}
.layer-cy {
  z-index: 3;
}
.layer-de {
  z-index: 4;
}
.dashboard-page .panel,
.dashboard-page .tile,
.dashboard-page .header {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(3px);
}


.made-by-wrap {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: center;
  padding: 0.2rem 1rem 1rem;
}
.made-by {
  color: rgba(18, 48, 74, 0.9);
  text-decoration: none;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(255,255,255,.45);
  transition: transform .15s ease, opacity .15s ease;
}
.made-by:hover {
  transform: translateY(-1px) scale(1.02);
  opacity: 0.88;
}

/* Cloud-only dashboard background */
.dashboard-page {
  background: linear-gradient(180deg, #8fc7ef 0%, #b8ddf5 48%, #e6f4fd 100%);
}
.parallax-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, #83bfe9 0%, #acd8f6 42%, #e5f4ff 100%);
}
.cloud-layer {
  position: absolute;
  inset: -8% -18%;
  background-repeat: repeat-x;
  background-size: 760px 100%;
  will-change: transform;
}
.cloud-back {
  opacity: 0.42;
  filter: blur(2px);
  animation: cloudFloat 110s linear infinite;
  background-image:
    radial-gradient(ellipse 180px 75px at 11% 22%, rgba(255,255,255,.72) 0 67%, rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 200px 82px at 33% 30%, rgba(255,255,255,.7) 0 66%, rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 190px 76px at 61% 20%, rgba(255,255,255,.68) 0 65%, rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 220px 86px at 86% 27%, rgba(255,255,255,.74) 0 66%, rgba(255,255,255,0) 72%);
}
.cloud-mid {
  opacity: 0.56;
  animation: cloudFloat 80s linear infinite reverse;
  background-image:
    radial-gradient(ellipse 190px 80px at 16% 56%, rgba(255,255,255,.78) 0 68%, rgba(255,255,255,0) 74%),
    radial-gradient(ellipse 220px 88px at 43% 47%, rgba(255,255,255,.74) 0 67%, rgba(255,255,255,0) 74%),
    radial-gradient(ellipse 200px 80px at 66% 60%, rgba(255,255,255,.8) 0 68%, rgba(255,255,255,0) 74%),
    radial-gradient(ellipse 230px 90px at 90% 51%, rgba(255,255,255,.76) 0 67%, rgba(255,255,255,0) 74%);
}
.cloud-front {
  opacity: 0.66;
  animation: cloudFloat 52s linear infinite;
  background-image:
    radial-gradient(ellipse 240px 100px at 9% 82%, rgba(255,255,255,.92) 0 70%, rgba(255,255,255,0) 76%),
    radial-gradient(ellipse 260px 108px at 34% 78%, rgba(255,255,255,.9) 0 69%, rgba(255,255,255,0) 76%),
    radial-gradient(ellipse 250px 105px at 60% 85%, rgba(255,255,255,.92) 0 70%, rgba(255,255,255,0) 76%),
    radial-gradient(ellipse 270px 112px at 86% 79%, rgba(255,255,255,.9) 0 69%, rgba(255,255,255,0) 76%);
}
@keyframes cloudFloat {
  0% { transform: translate3d(-6%, 0, 0); }
  50% { transform: translate3d(4%, -1.2%, 0); }
  100% { transform: translate3d(-6%, 0, 0); }
}

/* Effects disabled per request: no parallax, no animated clouds, no hover motion */
.parallax-scene,
.parallax-layer,
.cloud-layer,
.cloud-back,
.cloud-mid,
.cloud-front {
  display: none !important;
  animation: none !important;
  transform: none !important;
}
.dashboard-page {
  background: linear-gradient(180deg, #a8d2ee 0%, #d8ecf9 100%) !important;
}
.dashboard-page .panel,
.dashboard-page .tile,
.dashboard-page .header {
  backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(198, 218, 235, 0.9) !important;
}
.dashboard-page .panel {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.tile,
.tile:hover,
.made-by,
.made-by:hover,
.category-chip,
.category-chip.active,
.btn-link,
.btn-link.secondary,
button {
  transition: none !important;
  transform: none !important;
}
.tile:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06) !important;
  border-color: transparent !important;
}

/* 4-up desktop grid with adaptive breakpoints */
.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1400px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* Stylish login page */
.login-page {
  position: relative;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.45) 0, rgba(255, 255, 255, 0) 32%),
    linear-gradient(145deg, #0f4c7c 0%, #1a77b8 48%, #5db2de 100%);
}
.login-shell {
  width: min(560px, 94vw);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  border-radius: 18px;
  padding: clamp(1.1rem, 2.4vw, 2rem);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 46px rgba(9, 44, 72, 0.28);
  backdrop-filter: blur(6px);
}
.login-title {
  color: #0f3553;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login-subtitle {
  margin: -0.35rem 0 0.85rem;
  text-align: center;
  color: #355a77;
  font-size: 0.96rem;
}
.login-panel {
  width: 100% !important;
  justify-self: center;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #d3e4f2;
  box-shadow: 0 10px 26px rgba(20, 66, 101, 0.12);
}
.login-panel label {
  font-size: 0.88rem;
  color: #234a68;
  font-weight: 600;
}
.login-panel input {
  background: #f8fbfe;
  border: 1px solid #bfd5e8;
}
.login-panel input:focus {
  outline: none;
  border-color: #2a82c0;
  box-shadow: 0 0 0 3px rgba(42, 130, 192, 0.16);
}
.login-panel button {
  margin-top: 0.3rem;
  font-weight: 700;
  background: linear-gradient(180deg, #1675b4 0%, #0f5b94 100%);
}
.login-page .auth-error {
  margin-bottom: 0.8rem;
}
@media (max-width: 700px) {
  .login-shell {
    border-radius: 14px;
    padding: 1rem;
    backdrop-filter: none;
  }
  .login-subtitle {
    font-size: 0.9rem;
  }
}

.login-corner-brand {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 20;
  color: #e8f4ff;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(9, 44, 72, 0.35);
}
.login-made-by-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 20;
  display: flex;
  justify-content: center;
}
.login-made-by {
  color: rgba(240, 248, 255, 0.95);
  text-shadow: 0 2px 10px rgba(9, 44, 72, 0.45);
}
