:root {
  --app-background: #f3f6fa;
  --app-surface: #ffffff;
  --app-surface-soft: #f8fafc;
  --app-border: #dce5ef;

  --app-primary: #17628f;
  --app-primary-dark: #103f5e;
  --app-primary-soft: #e7f2f8;

  --app-sidebar: #142d40;
  --app-sidebar-dark: #102636;
  --app-sidebar-text: #c9d7e2;
  --app-sidebar-muted: #8098aa;
  --app-sidebar-active: #1f5373;

  --app-text: #243444;
  --app-muted: #6a7b8c;

  --app-success: #21784e;
  --app-success-soft: #e2f4ea;

  --app-warning: #8a6616;
  --app-warning-soft: #fff2cc;

  --app-danger: #a33c3c;
  --app-danger-soft: #fce8e8;

  --app-info: #246b91;
  --app-info-soft: #e5f3fa;

  --app-neutral: #596777;
  --app-neutral-soft: #edf1f4;

  --sidebar-width: 274px;
  --topbar-height: 76px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--app-background);
  color: var(--app-text);
  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

a {
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  z-index: 1040;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  background:
    linear-gradient(
      180deg,
      var(--app-sidebar) 0%,
      var(--app-sidebar-dark) 100%
    );
  color: var(--app-sidebar-text);
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.sidebar-brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #2f789f;
  box-shadow: 0 6px 16px rgba(5, 20, 31, 0.28);
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-brand-text strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-text small {
  margin-top: 3px;
  color: var(--app-sidebar-muted);
  font-size: 0.76rem;
}

.sidebar-close-button {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
}

.sidebar-navigation {
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-top: 22px;
}

.sidebar-section-title {
  display: block;
  margin: 0 12px 8px;
  color: var(--app-sidebar-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-link {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  margin-bottom: 4px;
  padding: 10px 13px;
  border-radius: 11px;
  color: var(--app-sidebar-text);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.sidebar-link i {
  width: 22px;
  font-size: 1.05rem;
  text-align: center;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--app-sidebar-active);
  box-shadow: 0 6px 16px rgba(5, 20, 31, 0.22);
  color: #ffffff;
}

.sidebar-link.active::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -14px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #65b5dc;
  content: "";
}

.sidebar-link-badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 0.7rem;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-platform-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-status-dot,
.topbar-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #4bc285;
  box-shadow: 0 0 0 4px rgba(75, 194, 133, 0.12);
}

.sidebar-platform-status div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-platform-status strong {
  color: #ffffff;
  font-size: 0.76rem;
}

.sidebar-platform-status small {
  margin-top: 2px;
  color: var(--app-sidebar-muted);
  font-size: 0.7rem;
}

.sidebar-overlay {
  display: none;
}

.app-main {
  display: flex;
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

.app-topbar {
  position: sticky;
  z-index: 1020;
  top: 0;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 3px 14px rgba(25, 54, 82, 0.05);
  backdrop-filter: blur(8px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-right {
  gap: 24px;
}

.sidebar-toggle-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: var(--app-surface);
  color: var(--app-primary-dark);
  font-size: 1.3rem;
}

.topbar-title {
  display: flex;
  flex-direction: column;
}

.topbar-title strong {
  color: var(--app-primary-dark);
  font-size: 1rem;
}

.topbar-title span {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.76rem;
}

.topbar-clock,
.topbar-server,
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-clock {
  color: var(--app-muted);
}

.topbar-clock i {
  color: var(--app-primary);
  font-size: 1.05rem;
}

.topbar-clock div,
.topbar-server div,
.topbar-user-info {
  display: flex;
  flex-direction: column;
}

.topbar-clock strong,
.topbar-server strong,
.topbar-user-info strong {
  color: var(--app-text);
  font-size: 0.78rem;
}

.topbar-clock span,
.topbar-server span,
.topbar-user-info span {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.7rem;
}

.topbar-user-avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--app-primary-soft);
  color: var(--app-primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.app-content {
  flex: 1;
  padding: 30px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 30px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 0.78rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 0 0 7px;
  color: var(--app-primary-dark);
  font-size: 1.85rem;
  font-weight: 700;
}

.page-eyebrow,
.card-eyebrow {
  margin: 0 0 5px;
  color: var(--app-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-description {
  max-width: 850px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.91rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill-small {
  padding: 6px 10px;
  font-size: 0.69rem;
}

.status-indicator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-online {
  background: var(--app-success-soft);
  color: var(--app-success);
}

.status-warning,
.status-pending {
  background: var(--app-warning-soft);
  color: var(--app-warning);
}

.status-error {
  background: var(--app-danger-soft);
  color: var(--app-danger);
}

.status-info {
  background: var(--app-info-soft);
  color: var(--app-info);
}

.status-neutral {
  background: var(--app-neutral-soft);
  color: var(--app-neutral);
}

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

.executive-card,
.dashboard-card,
.coming-soon-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(25, 54, 82, 0.055);
}

.executive-card {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  padding: 20px;
}

.executive-card-health {
  border-color: #cde7d8;
  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f3fbf6 100%
    );
}

.executive-card-header {
  display: flex;
  align-items: center;
  gap: 11px;
}

.executive-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--app-success-soft);
  color: var(--app-success);
}

.executive-icon-server {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.executive-icon-service {
  background: var(--app-info-soft);
  color: var(--app-info);
}

.executive-icon-project {
  background: #f0ebfa;
  color: #6e4a9e;
}

.executive-label {
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.executive-value {
  margin-top: 17px;
  color: var(--app-primary-dark);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.executive-footer {
  margin-top: auto;
  padding-top: 15px;
  color: var(--app-muted);
  font-size: 0.78rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr);
  gap: 20px;
}

.dashboard-grid-secondary {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
  min-width: 0;
  overflow: hidden;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px;
  border-bottom: 1px solid var(--app-border);
}

.card-heading h2 {
  margin: 0;
  color: var(--app-primary-dark);
  font-size: 1.05rem;
  font-weight: 700;
}

.card-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.card-header-link,
.card-action-link {
  color: var(--app-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-header-link:hover,
.card-action-link:hover {
  color: var(--app-primary-dark);
}

.card-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--app-border);
}

.resource-list {
  padding: 22px;
}

.resource-item-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.resource-item-header div {
  display: flex;
  flex-direction: column;
}

.resource-label {
  margin-bottom: 6px;
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.resource-item-header strong {
  color: var(--app-primary-dark);
  font-size: 1.55rem;
}

.resource-item-header > span {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.resource-progress {
  height: 8px;
  margin: 14px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eff5;
}

.resource-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--app-primary),
      #3f93bc
    );
  transition: width 0.5s ease;
}

.resource-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-info {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface-soft);
}

.resource-info-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.resource-info div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.resource-info span {
  color: var(--app-muted);
  font-size: 0.69rem;
}

.resource-info strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--app-border);
}

.server-summary div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.server-summary span {
  color: var(--app-muted);
  font-size: 0.69rem;
}

.server-summary strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-list {
  padding: 10px 20px;
}

.operational-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--app-border);
}

.operational-item:last-child {
  border-bottom: 0;
}

.operational-item-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.operational-item-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.operational-item-content strong {
  color: var(--app-text);
  font-size: 0.82rem;
}

.operational-item-content span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-table {
  min-width: 900px;
}

.dashboard-table thead th {
  padding: 13px 20px;
  background: var(--app-surface-soft);
  border-bottom: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-table tbody td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
  font-size: 0.78rem;
  vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.project-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.project-cell-icon {
  display: inline-flex;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.project-cell div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.project-cell strong {
  color: var(--app-text);
  font-size: 0.8rem;
}

.project-cell span {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 0.68rem;
}

.code-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--app-neutral-soft);
  color: var(--app-neutral);
  font-family: monospace;
  font-size: 0.74rem;
}

.server-card,
.activity-card {
  min-height: 100%;
}

.server-detail-card {
  padding: 20px 22px;
}

.server-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-detail-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.server-detail-header div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.server-detail-header strong {
  color: var(--app-text);
  font-size: 0.88rem;
}

.server-detail-header span {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 0.72rem;
}

.server-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.server-detail-grid div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 12px;
  border-radius: 10px;
  background: var(--app-surface-soft);
}

.server-detail-grid span {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.server-detail-grid strong {
  margin-top: 5px;
  color: var(--app-text);
  font-size: 0.76rem;
}

.activity-list {
  padding: 10px 22px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--app-border);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.activity-success {
  background: var(--app-success-soft);
  color: var(--app-success);
}

.activity-info {
  background: var(--app-info-soft);
  color: var(--app-info);
}

.activity-neutral {
  background: var(--app-neutral-soft);
  color: var(--app-neutral);
}

.activity-item div {
  display: flex;
  flex-direction: column;
}

.activity-item strong {
  color: var(--app-text);
  font-size: 0.79rem;
}

.activity-item span {
  margin-top: 4px;
  color: var(--app-muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.coming-soon-card {
  display: flex;
  max-width: 980px;
  align-items: flex-start;
  gap: 28px;
  padding: 34px;
}

.coming-soon-icon {
  display: inline-flex;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
  font-size: 2rem;
}

.coming-soon-content {
  flex: 1;
}

.coming-soon-label {
  color: var(--app-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.coming-soon-content h2 {
  margin: 6px 0 10px;
  color: var(--app-primary-dark);
  font-size: 1.45rem;
}

.coming-soon-content > p {
  max-width: 700px;
  color: var(--app-muted);
  line-height: 1.65;
}

.planned-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.planned-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: var(--app-surface-soft);
  color: var(--app-text);
  font-size: 0.8rem;
}

.planned-feature-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--app-success-soft);
  color: var(--app-success);
}

.app-primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: var(--app-primary);
  background: var(--app-primary);
}

.app-primary-button:hover {
  border-color: var(--app-primary-dark);
  background: var(--app-primary-dark);
}

.empty-table {
  padding: 32px !important;
  color: var(--app-muted) !important;
  text-align: center;
}

.error-page {
  max-width: 680px;
  margin: 60px auto;
  padding: 42px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  text-align: center;
}

.error-code {
  display: block;
  color: var(--app-primary);
  font-size: 4rem;
  font-weight: 700;
}

.error-detail {
  margin: 20px 0;
  padding: 14px;
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  font-family: monospace;
  text-align: left;
}

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

  .dashboard-grid,
  .dashboard-grid-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 991px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-close-button,
  .sidebar-toggle-button {
    display: inline-flex;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 1030;
    inset: 0;
    display: block;
    pointer-events: none;
    background: rgba(10, 25, 36, 0.48);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .sidebar-overlay-visible {
    pointer-events: auto;
    opacity: 1;
  }

  .sidebar-body-locked {
    overflow: hidden;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .app-content {
    padding: 24px;
  }
}

@media (max-width: 767px) {
  .app-topbar {
    padding: 0 18px;
  }

  .app-content {
    padding: 20px 16px;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

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

  .resource-info-grid,
  .server-summary,
  .server-detail-grid,
  .planned-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .coming-soon-card {
    flex-direction: column;
    padding: 24px;
  }

  .coming-soon-icon {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
    border-radius: 18px;
    font-size: 1.6rem;
  }

  .app-footer {
    flex-direction: column;
    padding: 18px;
  }
}