* {
  box-sizing: border-box;
}

:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #f1f5ff;
  background: #060a12;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 20% 0,
      rgba(79, 70, 229, 0.16),
      transparent 30%
    ),
    #060a12;
}

button,
input,
textarea {
  font: inherit;
}

button,
.upload-button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 36px;
  border: 1px solid #26334e;
  border-radius: 26px;
  background: rgba(13, 20, 35, 0.97);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
}

.login-logo,
.brand-logo {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
}

.login-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 30px;
}

.login-card h1 {
  margin: 24px 0 8px;
}

.login-card p {
  margin: 0 0 28px;
  color: #94a3b8;
}

.login-card label {
  display: block;
  margin-bottom: 17px;
  color: #cbd5e1;
}

.login-card input {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #33415f;
  border-radius: 13px;
  outline: none;
  color: white;
  background: #090f1d;
}

.login-card input:focus {
  border-color: #6366f1;
}

.application {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 23px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #202b42;
  background: rgba(7, 12, 23, 0.97);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 10px 28px;
}

.brand-logo {
  width: 47px;
  height: 47px;
  border-radius: 14px;
  font-size: 23px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
}

.brand small {
  margin-top: 4px;
  color: #8190aa;
}

nav {
  display: grid;
  gap: 7px;
}

.nav,
.logout {
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 12px;
  text-align: left;
  color: #aab7ce;
  background: transparent;
}

.nav:hover,
.nav.active {
  color: white;
  background: #17223a;
}

.logout {
  margin-top: auto;
  color: #fda4af;
}

.main {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.topbar h1 {
  margin: 0 0 6px;
}

.topbar p {
  margin: 0;
  color: #8d9ab3;
}

.online {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid #293752;
  border-radius: 999px;
  background: #101829;
}

.online span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 14px #34d399;
}

.page {
  display: none;
}

.active-page {
  display: block;
}

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

.metric,
.panel {
  border: 1px solid #25324a;
  border-radius: 20px;
  background: rgba(16, 24, 41, 0.95);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.metric {
  padding: 21px;
}

.metric > span,
.metric small,
.panel p {
  color: #93a1ba;
}

.metric strong {
  display: block;
  margin: 14px 0;
  font-size: 29px;
}

.progress {
  height: 8px;
  overflow: hidden;
  margin-bottom: 11px;
  border-radius: 100px;
  background: #273247;
}

.progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  transition: width 0.35s ease;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 19px;
}

.panel h2 {
  margin: 0 0 6px;
}

.panel p {
  margin: 0;
}

.primary,
.secondary,
.action,
.modal-head button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: white;
}

.primary {
  padding: 11px 16px;
  background: #5865f2;
}

.secondary,
.upload-button {
  padding: 10px 13px;
  background: #263452;
}

.wide {
  width: 100%;
  padding: 14px;
  font-weight: 700;
}

.detail-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.detail-list > div,
.resource {
  padding: 14px;
  border: 1px solid #26344d;
  border-radius: 13px;
  background: #0b1221;
}

.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.detail-list span,
.resource-meta,
.file-meta {
  color: #8e9bb2;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.status-card {
  padding: 14px;
  border: 1px solid #26344d;
  border-radius: 13px;
  background: #0b1221;
}

.status-card strong,
.status-card span {
  display: block;
}

.status-card span {
  margin-top: 7px;
}

.status-active {
  color: #4ade80;
}

.status-inactive {
  color: #fb7185;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.network-card {
  padding: 14px;
  border-radius: 13px;
  background: #0b1221;
}

.resource {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
}

.resource-info {
  min-width: 0;
}

.resource-name {
  overflow-wrap: anywhere;
  font-weight: 750;
}

.resource-meta {
  margin-top: 5px;
  font-size: 13px;
}

.resource-actions,
.toolbar,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.action {
  padding: 8px 11px;
  background: #263452;
}

.action.start {
  background: #166534;
}

.action.stop {
  background: #991b1b;
}

.action.restart {
  background: #1d4ed8;
}

.roots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.root-button {
  padding: 9px 12px;
  border: 1px solid #33415f;
  border-radius: 10px;
  color: #cbd5e1;
  background: #0b1221;
}

.files-table {
  display: grid;
  gap: 7px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 170px;
  gap: 15px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #26344d;
  border-radius: 12px;
  background: #0b1221;
}

.file-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-name button {
  padding: 0;
  border: 0;
  color: #dbeafe;
  text-align: left;
  background: transparent;
}

.file-meta {
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.76);
}

.modal-card,
.editor-card {
  width: min(1150px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid #33415f;
  border-radius: 18px;
  background: #080d17;
}

.editor-card {
  height: min(850px, 90vh);
  display: flex;
  flex-direction: column;
}

.modal-head {
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #283650;
}

.modal-head button {
  padding: 8px 11px;
  background: #263452;
}

pre {
  min-height: 320px;
  max-height: 76vh;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b9fbc0;
  background: #05080e;
}

#editor-content {
  width: 100%;
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  padding: 18px;
  color: #dbeafe;
  background: #05080e;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  max-width: min(420px, calc(100% - 40px));
  padding: 13px 17px;
  border: 1px solid #33415f;
  border-radius: 12px;
  color: white;
  background: #17223a;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

.toast.error-toast {
  border-color: #7f1d1d;
  background: #450a0a;
}

.error {
  min-height: 22px;
  margin-top: 14px;
  color: #fb7185;
}

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

  .network-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 780px) {
  .application {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .logout {
    margin-top: 15px;
  }

  .main {
    padding: 20px 14px;
  }

  .resource {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .network-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
  }
}

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

.project-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #26344d;
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(23, 34, 58, 0.9),
      rgba(9, 16, 29, 0.96)
    );
}

.project-card h3 {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}

.project-card p {
  min-height: 38px;
  margin: 0 0 15px;
  font-size: 13px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.project-tag {
  padding: 6px 9px;
  border: 1px solid #33415f;
  border-radius: 999px;
  color: #b8c5dc;
  background: #0b1221;
  font-size: 12px;
}

.project-path {
  overflow-wrap: anywhere;
  margin-bottom: 15px;
  color: #8190aa;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
}

.project-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.project-dot.running {
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
}

.project-dot.stopped {
  background: #fb7185;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

@media (max-width: 680px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 18px;
}

.chart-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #25324a;
  border-radius: 18px;
  background: rgba(16, 24, 41, 0.95);
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.chart-head span {
  color: #8fa0ba;
  font-size: 13px;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background: #090f1d;
}

.file-row {
  grid-template-columns:
    minmax(0, 1fr)
    100px
    155px
    minmax(245px, auto);
}

.file-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-action {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: #dbeafe;
  background: #263452;
}

.mini-action.danger {
  color: white;
  background: #991b1b;
}

@media (max-width: 900px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: flex-start;
  }
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 18px;
}

.chart-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #25324a;
  border-radius: 18px;
  background: rgba(16, 24, 41, 0.95);
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.chart-head span {
  color: #8fa0ba;
  font-size: 13px;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background: #090f1d;
}

.file-row {
  grid-template-columns:
    minmax(0, 1fr)
    100px
    155px
    minmax(245px, auto);
}

.file-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-action {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: #dbeafe;
  background: #263452;
}

.mini-action.danger {
  color: white;
  background: #991b1b;
}

@media (max-width: 900px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: flex-start;
  }
}

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

.setting-field {
  display: block;
  margin-bottom: 16px;
  color: #cbd5e1;
}

.setting-field input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid #33415f;
  border-radius: 11px;
  outline: none;
  color: white;
  background: #090f1d;
}

.setting-field input:focus {
  border-color: #6366f1;
}

.metric.warning {
  border-color: #f59e0b;
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.22),
    0 18px 45px rgba(0, 0, 0, 0.2);
}

.metric.danger {
  border-color: #ef4444;
  box-shadow:
    0 0 20px rgba(239, 68, 68, 0.18),
    0 18px 45px rgba(0, 0, 0, 0.2);
}

#security-output {
  min-height: 500px;
  max-height: 70vh;
}

@media (max-width: 900px) {
  .database-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-state-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.project-state-badge.online {
  color: #86efac;
  background: rgba(22, 101, 52, 0.42);
  border: 1px solid #166534;
}

.project-state-badge.offline {
  color: #fda4af;
  background: rgba(153, 27, 27, 0.3);
  border: 1px solid #7f1d1d;
}

.project-actions-main {
  margin-top: 4px;
}

.project-actions-main .action {
  min-height: 34px;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

.mobile-menu-button {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #33415f;
  border-radius: 12px;
  color: white;
  background: #101829;
  font-size: 22px;
}

.sidebar-overlay {
  display: none;
}

.install-app,
.fullscreen-mode {
  width: 100%;
  margin-top: 9px;
  padding: 12px 14px;
  border: 0;
  border-radius: 11px;
  color: #cbd5e1;
  text-align: left;
  background: #111a2d;
}

.install-app {
  color: #a7f3d0;
}

.fullscreen-mode {
  margin-top: auto;
}

.logout {
  margin-top: 9px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1,
.topbar-title p {
  overflow-wrap: anywhere;
}

.metric,
.panel,
.project-card,
.chart-card,
.resource,
.file-row,
.status-card,
.network-card {
  min-width: 0;
}

.resource-name,
.resource-meta,
.project-path,
.file-name {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resource-actions button,
.project-actions button,
.toolbar button,
.upload-button {
  min-height: 42px;
}

@media (hover: hover) {
  button:hover,
  .upload-button:hover {
    filter: brightness(1.1);
  }
}

@media (max-width: 1023px) {
  .application {
    display: block;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: min(320px, 88vw);
    height: 100dvh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    box-shadow: 25px 0 70px rgba(0, 0, 0, 0.55);
  }

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

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.64);
    transition:
      opacity 0.24s ease,
      visibility 0.24s ease;
  }

  .application.sidebar-open .sidebar-overlay {
    visibility: visible;
    opacity: 1;
  }

  .main {
    width: 100%;
    padding: 20px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: -20px -20px 22px;
    padding: 14px 20px;
    align-items: center;
    border-bottom: 1px solid rgba(51, 65, 95, 0.65);
    background: rgba(6, 10, 18, 0.92);
    backdrop-filter: blur(16px);
  }

  .topbar-title {
    flex: 1;
  }

  .topbar-title h1 {
    font-size: 22px;
  }

  .online {
    padding: 9px 12px;
  }

  nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav,
  .logout,
  .install-app,
  .fullscreen-mode {
    min-height: 48px;
    font-size: 16px;
  }

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

  .dashboard-grid,
  .database-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

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

  .resource {
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .main {
    padding: 14px;
  }

  .topbar {
    margin: -14px -14px 18px;
    padding: 12px 14px;
  }

  .topbar-title h1 {
    margin-bottom: 2px;
    font-size: 19px;
  }

  .topbar-title p {
    max-width: 45vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  .online {
    padding: 8px 10px;
    font-size: 13px;
  }

  .metric-grid,
  .charts-grid,
  .projects-grid,
  .network-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .panel,
  .chart-card,
  .project-card {
    border-radius: 16px;
  }

  .panel {
    padding: 16px;
  }

  .metric {
    padding: 18px;
  }

  .metric strong {
    font-size: 26px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head > button {
    width: 100%;
  }

  .resource {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-actions,
  .project-actions,
  .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .resource-actions button,
  .project-actions button {
    flex: 1 1 calc(50% - 7px);
  }

  .toolbar button,
  .upload-button {
    flex: 1 1 calc(50% - 7px);
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: flex-start;
  }

  .file-actions button {
    flex: 1 1 calc(33.333% - 6px);
  }

  .detail-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .login-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .login-card h1 {
    font-size: 25px;
  }

  .modal {
    padding: 0;
  }

  .modal-card,
  .editor-card {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  pre {
    min-height: 0;
    max-height: none;
    height: calc(100dvh - 62px);
  }

  #editor-content {
    font-size: 13px;
  }
}

@media (max-width: 479px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .mobile-menu-button {
    width: 42px;
    height: 42px;
  }

  .online {
    font-size: 0;
  }

  .online span {
    width: 11px;
    height: 11px;
  }

  .resource-actions button,
  .project-actions button,
  .toolbar button,
  .upload-button,
  .file-actions button {
    flex: 1 1 100%;
  }

  .chart-card canvas {
    height: 150px;
  }
}

@media (min-width: 1440px) {
  .main {
    padding: 36px;
  }

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

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

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

@media (min-width: 1920px) {
  :root {
    font-size: 17px;
  }

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

  .sidebar {
    padding: 30px 20px;
  }

  .main {
    padding: 44px;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(5, minmax(260px, 1fr));
  }

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

  .chart-card canvas {
    height: 230px;
  }
}

@media
  (min-width: 1600px)
  and (min-height: 850px)
  and (hover: none) {
  :root {
    font-size: 21px;
  }

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

  .sidebar {
    padding: 34px 24px;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }

  .nav,
  .logout,
  .install-app,
  .fullscreen-mode {
    min-height: 64px;
    padding: 17px 20px;
    font-size: 21px;
  }

  .main {
    padding: 50px;
  }

  .topbar h1 {
    font-size: 38px;
  }

  .metric,
  .panel,
  .project-card,
  .chart-card {
    padding: 28px;
    border-radius: 24px;
  }

  .metric strong {
    font-size: 42px;
  }

  .primary,
  .secondary,
  .action,
  .upload-button {
    min-height: 56px;
    padding: 14px 19px;
    font-size: 19px;
  }
}

@media (display-mode: standalone) {
  .topbar {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .sidebar {
    padding-bottom: max(23px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* EmoVeoPro branding */
.brand-logo-image,
.login-logo-image {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.65);
  background: #05080e;
}

.brand-logo-image img,
.login-logo-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.brand-logo-image {
  width: 52px;
  height: 52px;
  border-radius: 15px;
}

.login-logo-image {
  width: 86px;
  height: 86px;
  border-radius: 22px;
}

@media (max-width: 767px) {
  .brand-logo-image {
    width: 46px;
    height: 46px;
  }

  .login-logo-image {
    width: 76px;
    height: 76px;
  }
}

/* FIX: sidebar logo only */
.sidebar .brand {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 8px 10px 28px !important;
}

.sidebar .brand-logo.brand-logo-image {
  position: relative !important;
  flex: 0 0 56px !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 15px !important;
  border: 1px solid #33415f !important;
  background: #05080e !important;
}

.sidebar .brand-logo.brand-logo-image img {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.sidebar .brand-text {
  min-width: 0 !important;
}

.sidebar .brand-text strong,
.sidebar .brand-text small {
  display: block !important;
}

.sidebar .brand-text strong {
  font-size: 19px !important;
}

.sidebar .brand-text small {
  margin-top: 4px !important;
  color: #8190aa !important;
  white-space: nowrap !important;
}

@media (max-width: 767px) {
  .sidebar .brand-logo.brand-logo-image {
    flex-basis: 50px !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
  }
}

.terminal-panel {
  min-height: calc(100vh - 150px);
}

.terminal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.terminal-status {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
}

.terminal-status.connected {
  color: #86efac;
  border: 1px solid #166534;
  background: rgba(22, 101, 52, 0.25);
}

.terminal-status.disconnected {
  color: #fda4af;
  border: 1px solid #7f1d1d;
  background: rgba(127, 29, 29, 0.22);
}

#live-terminal {
  width: 100%;
  height: min(70vh, 760px);
  min-height: 480px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #26344d;
  border-radius: 14px;
  background: #05080e;
}

#live-terminal .xterm {
  height: 100%;
}

#live-terminal .xterm-viewport {
  scrollbar-width: thin;
}

.terminal-note {
  margin-top: 12px !important;
  color: #94a3b8 !important;
  font-size: 13px;
}

@media (max-width: 767px) {
  .terminal-toolbar {
    width: 100%;
  }

  .terminal-toolbar button {
    flex: 1;
  }

  #live-terminal {
    height: calc(100dvh - 275px);
    min-height: 430px;
    padding: 7px;
  }
}

.services-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.services-search,
.services-filter {
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid #33415f;
  border-radius: 10px;
  outline: none;
  color: #f1f5ff;
  background: #090f1d;
}

.services-search {
  width: min(290px, 100%);
}

.services-filter {
  min-width: 155px;
}

.services-search:focus,
.services-filter:focus {
  border-color: #6366f1;
}

.services-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 17px;
}

.services-summary span {
  padding: 8px 11px;
  border: 1px solid #293752;
  border-radius: 999px;
  color: #aab7ce;
  background: #0b1221;
  font-size: 13px;
}

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

.service-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #26344d;
  border-radius: 16px;
  background: #0b1221;
}

.service-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
}

.service-title-wrap {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.service-title-wrap h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.service-title-wrap p {
  margin: 6px 0 0;
  color: #8e9bb2;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.service-indicator {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
}

.service-indicator.running {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.service-indicator.stopped {
  background: #fb7185;
}

.service-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.service-badge.online {
  color: #86efac;
  border: 1px solid #166534;
  background: rgba(22, 101, 52, 0.28);
}

.service-badge.offline {
  color: #fda4af;
  border: 1px solid #7f1d1d;
  background: rgba(127, 29, 29, 0.24);
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.service-meta span {
  padding: 6px 9px;
  border-radius: 8px;
  color: #94a3b8;
  background: #101829;
  font-size: 12px;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.service-actions button {
  flex: 1 1 90px;
}

.service-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  filter: none;
}

.services-empty {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #33415f;
  border-radius: 14px;
  color: #94a3b8;
  text-align: center;
  background: #0b1221;
}

@media (max-width: 1050px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .services-toolbar {
    width: 100%;
  }

  .services-search,
  .services-filter,
  .services-toolbar .primary {
    width: 100%;
  }

  .service-card-head {
    flex-direction: column;
  }

  .service-actions button {
    flex: 1 1 calc(50% - 7px);
  }
}

@media (max-width: 479px) {
  .service-actions button {
    flex-basis: 100%;
  }
}

/* Docker Manager enhanced UI */
.docker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.docker-summary span {
  padding: 8px 11px;
  border: 1px solid #293752;
  border-radius: 999px;
  color: #aab7ce;
  background: #0b1221;
  font-size: 13px;
}

.docker-summary-running {
  color: #86efac !important;
  border-color: #166534 !important;
}

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

.docker-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #26344d;
  border-radius: 16px;
  background: #0b1221;
}

.docker-card-head,
.docker-title {
  display: flex;
  align-items: flex-start;
}

.docker-card-head {
  justify-content: space-between;
  gap: 14px;
}

.docker-title {
  min-width: 0;
  gap: 11px;
}

.docker-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.docker-title p,
.docker-status-text {
  color: #8e9bb2;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.docker-title p {
  margin: 6px 0 0;
}

.docker-status-text {
  margin-top: 14px;
}

.docker-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
}

.docker-dot.running {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.docker-dot.stopped {
  background: #fb7185;
}

.docker-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.docker-state.online {
  color: #86efac;
  border: 1px solid #166534;
  background: rgba(22, 101, 52, 0.28);
}

.docker-state.offline {
  color: #fda4af;
  border: 1px solid #7f1d1d;
  background: rgba(127, 29, 29, 0.24);
}

.docker-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.docker-metrics > div {
  min-width: 0;
  padding: 11px;
  border-radius: 11px;
  background: #101829;
}

.docker-metrics span,
.docker-metrics strong {
  display: block;
}

.docker-metrics span {
  margin-bottom: 5px;
  color: #8e9bb2;
  font-size: 12px;
}

.docker-metrics strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.docker-memory {
  margin-top: 14px;
}

.docker-memory > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #aab7ce;
  font-size: 12px;
}

.docker-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #273247;
}

.docker-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  transition: width 0.4s ease;
}

.docker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.docker-actions button {
  flex: 1 1 90px;
}

.docker-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.docker-empty {
  padding: 30px;
  border: 1px dashed #33415f;
  border-radius: 14px;
  color: #94a3b8;
  text-align: center;
  background: #0b1221;
}

.docker-error {
  color: #fda4af;
  border-color: #7f1d1d;
}

@media (max-width: 1050px) {
  .docker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .docker-card-head {
    flex-direction: column;
  }

  .docker-metrics {
    grid-template-columns: 1fr;
  }

  .docker-actions button {
    flex-basis: calc(50% - 7px);
  }
}

@media (max-width: 420px) {
  .docker-actions button {
    flex-basis: 100%;
  }
}

/* Docker Live Logs */
.docker-logs-card {
  width: min(1400px, 100%);
  height: min(900px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #33415f;
  border-radius: 18px;
  background: #080d17;
}

.docker-logs-head > div:first-child {
  min-width: 0;
}

.docker-logs-head strong,
.docker-logs-head small {
  display: block;
}

.docker-logs-head small {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
}

.docker-logs-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.docker-logs-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #283650;
  background: #0b1221;
}

.docker-logs-toolbar input[type="search"] {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #33415f;
  border-radius: 10px;
  outline: none;
  color: #f1f5ff;
  background: #05080e;
}

.docker-logs-toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: #aab7ce;
}

.docker-logs-toolbar button {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: #263452;
}

#docker-logs-content {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b9fbc0;
  background: #05080e;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .docker-logs-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .docker-logs-top-actions {
    width: 100%;
  }

  .docker-logs-top-actions button {
    flex: 1 1 calc(50% - 7px);
  }

  .docker-logs-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .docker-logs-toolbar input[type="search"] {
    width: 100%;
  }
}

/* EmoVeo Live Monitor V3.5 */
.monitor-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
  margin-bottom: 17px;
}

.monitor-summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #25324a;
  border-radius: 16px;
  background: rgba(16, 24, 41, 0.95);
}

.monitor-summary-card > span,
.monitor-summary-card > small {
  display: block;
  color: #93a1ba;
}

.monitor-summary-card > strong {
  display: block;
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
  font-size: 21px;
}

.monitor-summary-card > small {
  min-height: 34px;
  font-size: 12px;
  line-height: 1.4;
}

.monitor-mini-progress {
  height: 6px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 999px;
  background: #273247;
}

.monitor-mini-progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #6366f1, #22d3ee);
  transition: width 0.35s ease;
}

.monitor-live-status {
  color: #facc15;
}

.monitor-live-status.active {
  color: #4ade80;
}

.monitor-live-status.error {
  color: #fb7185;
}

@media (max-width: 1450px) {
  .monitor-summary-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 480px) {
  .monitor-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* EmoVeo Processes Manager V3.6 */
.processes-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.processes-toolbar input,
.processes-toolbar select {
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid #33415f;
  border-radius: 10px;
  outline: none;
  color: #f1f5ff;
  background: #090f1d;
}

.processes-toolbar input {
  width: min(300px, 100%);
}

.processes-toolbar select {
  min-width: 145px;
}

.processes-toolbar input:focus,
.processes-toolbar select:focus {
  border-color: #6366f1;
}

.processes-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.processes-summary span {
  padding: 8px 11px;
  border: 1px solid #293752;
  border-radius: 999px;
  color: #aab7ce;
  background: #0b1221;
  font-size: 13px;
}

.processes-table-wrap {
  overflow: hidden;
  border: 1px solid #26344d;
  border-radius: 15px;
  background: #0b1221;
}

.processes-table-head,
.process-row {
  display: grid;
  grid-template-columns:
    minmax(280px, 2fr)
    90px
    130px
    130px
    130px;
  gap: 12px;
  align-items: center;
}

.processes-table-head {
  padding: 12px 15px;
  color: #8e9bb2;
  border-bottom: 1px solid #26344d;
  background: #101829;
  font-size: 12px;
  font-weight: 700;
}

.process-row {
  padding: 14px 15px;
  border-bottom: 1px solid #1d293e;
}

.process-row:last-child {
  border-bottom: 0;
}

.process-row:hover {
  background: rgba(99, 102, 241, 0.07);
}

.process-main {
  min-width: 0;
}

.process-main strong,
.process-main small {
  display: block;
}

.process-main strong {
  overflow-wrap: anywhere;
}

.process-main small {
  margin-top: 5px;
  overflow: hidden;
  color: #8390a7;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.process-cell {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.process-mobile-label {
  display: none;
  color: #8390a7;
  font-size: 11px;
}

.process-mini-bar {
  height: 5px;
  overflow: hidden;
  margin-top: 6px;
  border-radius: 999px;
  background: #273247;
}

.process-mini-bar div {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #6366f1, #22d3ee);
}

.processes-empty {
  padding: 32px;
  color: #94a3b8;
  text-align: center;
}

.processes-error {
  color: #fda4af;
}

@media (max-width: 1050px) {
  .processes-table-head {
    display: none;
  }

  .process-row {
    grid-template-columns:
      minmax(0, 1fr)
      repeat(2, minmax(90px, 0.35fr));
  }

  .process-cell:nth-child(2),
  .process-cell:nth-child(3) {
    display: none;
  }

  .process-mobile-label {
    display: block;
    margin-bottom: 4px;
  }
}

@media (max-width: 700px) {
  .processes-toolbar {
    width: 100%;
  }

  .processes-toolbar input,
  .processes-toolbar select,
  .processes-toolbar button {
    width: 100%;
  }

  .process-row {
    grid-template-columns: 1fr 1fr;
  }

  .process-main {
    grid-column: 1 / -1;
  }
}

/* EmoVeo Audit Center V3.7 */
.audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-toolbar input,
.audit-toolbar select {
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid #33415f;
  border-radius: 10px;
  outline: none;
  color: #f1f5ff;
  background: #090f1d;
}

.audit-toolbar input {
  width: min(310px, 100%);
}

.audit-toolbar input:focus,
.audit-toolbar select:focus {
  border-color: #6366f1;
}

.audit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.audit-summary span {
  padding: 8px 11px;
  border: 1px solid #293752;
  border-radius: 999px;
  color: #aab7ce;
  background: #0b1221;
  font-size: 13px;
}

.audit-table-wrap {
  overflow: hidden;
  border: 1px solid #26344d;
  border-radius: 15px;
  background: #0b1221;
}

.audit-table-head,
.audit-row {
  display: grid;
  grid-template-columns:
    165px
    minmax(170px, 1fr)
    minmax(180px, 1.2fr)
    160px
    100px;
  gap: 12px;
  align-items: center;
}

.audit-table-head {
  padding: 12px 15px;
  color: #8e9bb2;
  border-bottom: 1px solid #26344d;
  background: #101829;
  font-size: 12px;
  font-weight: 700;
}

.audit-row {
  padding: 14px 15px;
  border-bottom: 1px solid #1d293e;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row:hover {
  background: rgba(99, 102, 241, 0.07);
}

.audit-cell {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.audit-cell strong,
.audit-cell small {
  display: block;
}

.audit-cell small {
  margin-top: 5px;
  color: #8390a7;
  font-size: 11px;
}

.audit-result {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.audit-result.success {
  color: #86efac;
  border: 1px solid #166534;
  background: rgba(22, 101, 52, 0.28);
}

.audit-result.failed {
  color: #fda4af;
  border: 1px solid #7f1d1d;
  background: rgba(127, 29, 29, 0.24);
}

.audit-mobile-label {
  display: none;
  margin-bottom: 4px;
  color: #8390a7;
  font-size: 11px;
}

.audit-empty {
  padding: 32px;
  color: #94a3b8;
  text-align: center;
}

.audit-error {
  color: #fda4af;
}

@media (max-width: 1050px) {
  .audit-table-head {
    display: none;
  }

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

  .audit-mobile-label {
    display: block;
  }
}

@media (max-width: 700px) {
  .audit-toolbar {
    width: 100%;
  }

  .audit-toolbar input,
  .audit-toolbar select,
  .audit-toolbar button {
    width: 100%;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }
}

/* EmoVeo Backup Center V3.8 */
.backup-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.backup-toolbar input {
  width: min(300px, 100%);
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid #33415f;
  border-radius: 10px;
  outline: none;
  color: #f1f5ff;
  background: #090f1d;
}

.backup-toolbar input:focus {
  border-color: #6366f1;
}

.backup-toolbar button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.backup-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.backup-summary span {
  padding: 8px 11px;
  border: 1px solid #293752;
  border-radius: 999px;
  color: #aab7ce;
  background: #0b1221;
  font-size: 13px;
}

.backup-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #3730a3;
  border-radius: 13px;
  color: #c7d2fe;
  background: rgba(49, 46, 129, 0.22);
}

.backup-progress strong,
.backup-progress small {
  display: block;
}

.backup-progress small {
  margin-top: 4px;
  color: #a5b4fc;
}

.backup-spinner {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border: 3px solid rgba(165, 180, 252, 0.25);
  border-top-color: #a5b4fc;
  border-radius: 50%;
  animation: backup-spin 0.8s linear infinite;
}

@keyframes backup-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.backup-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid #26344d;
  border-radius: 15px;
  background: #0b1221;
}

.backup-card:hover {
  border-color: #3d4d6c;
  background: #0e1729;
}

.backup-file-icon {
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #17223a;
  font-size: 24px;
}

.backup-file-info {
  min-width: 0;
  flex: 1;
}

.backup-file-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.backup-file-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.backup-latest-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #166534;
  border-radius: 999px;
  color: #86efac;
  background: rgba(22, 101, 52, 0.28);
  font-size: 11px;
}

.backup-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: #aab7ce;
  font-size: 12px;
}

.backup-file-path {
  margin-top: 10px;
  overflow-wrap: anywhere;
  color: #64748b;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
}

.backup-empty {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed #33415f;
  border-radius: 14px;
  color: #94a3b8;
  text-align: center;
  background: #0b1221;
}

.backup-error {
  color: #fda4af;
  border-color: #7f1d1d;
}

@media (max-width: 1000px) {
  .backup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .backup-toolbar {
    width: 100%;
  }

  .backup-toolbar input,
  .backup-toolbar button {
    width: 100%;
  }

  .backup-file-title {
    flex-direction: column;
  }
}
