:root {
  --bg-top: #0b0b2a;
  --bg-mid: #0f1238;
  --bg-bottom: #0b0c22;
  --glass: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.18);
  --text: #e7e9f1;
  --muted: #a7adbc;
  --accent: #3cc2a1;
  --danger: #f97171;
  --accent-blue: #2d7cf0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
}

.desktop {
  position: relative;
  min-height: 100vh;
  background-image: url('Fond/fond.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.1));
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--stroke);
}

.apps-btn, .power-btn {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
}
.power-btn svg { width: 22px; height: 22px; }
.power-btn:hover { background: var(--glass); color: var(--danger); }
.apps-btn .grid {
  width: 16px;
  height: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.apps-btn .grid::before,
.apps-btn .grid::after {
  content: "";
}
.apps-btn .grid span,
.apps-btn .grid::before,
.apps-btn .grid::after {
  display: contents;
}
.apps-btn .grid {
  --dot: radial-gradient(circle at 50% 50%, currentColor 40%, transparent 41%);
  background:
    var(--dot) 0 0/6px 6px,
    var(--dot) 8px 0/6px 6px,
    var(--dot) 16px 0/6px 6px,
    var(--dot) 0 8px/6px 6px,
    var(--dot) 8px 8px/6px 6px,
    var(--dot) 16px 8px/6px 6px,
    var(--dot) 0 16px/6px 6px,
    var(--dot) 8px 16px/6px 6px,
    var(--dot) 16px 16px/6px 6px;
}

.status { display: flex; align-items: center; gap: 10px; }
.stat { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.icon-btn {
  height: 28px;
  width: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--text);
}
.avatar {
  height: 28px; width: 28px; border-radius: 50%;
  background-image: url('Avatar/pp.png');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--stroke);
}

.dock {
  position: fixed;
  left: 16px;
  top: 84px;
  display: grid;
  gap: 14px;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text);
  width: 76px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.icon {
  height: 48px; width: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  color: #ffffff;
}
.icon svg { width: 28px; height: 28px; }
.icon svg, .icon-btn svg, .power-btn svg { display: block; margin: auto; transform-origin: center; }
.soft.blue { background: linear-gradient(135deg, #78a7ff, #1b5cff); }
.soft.graphite { background: linear-gradient(135deg, #bfc3cb, #66707f); }
.soft.sand { background: linear-gradient(135deg, #e9cda5, #a77d3b); }
.soft.purple { background: linear-gradient(135deg, #c7a6ff, #6a36e2); }
.soft.slate { background: linear-gradient(135deg, #cfd7e6, #7a8aa0); }
.soft.cyan { background: linear-gradient(135deg, #94e9e1, #0ea7a1); }
.soft.dark { background: linear-gradient(135deg, #9bb2ff, #1e2b7a); }
.soft.sky { background: linear-gradient(135deg, #a3d9ff, #2a78d6); }

.label { font-weight: 600; font-size: 12px; text-align: center; color: var(--muted); }

.canvas { height: 100vh; }

.app:hover { background: transparent; box-shadow: none; }
.app:hover .icon { transform: scale(1.05); }
.app:hover .label { color: #ffffff; }
.app:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.apps-btn:hover, .icon-btn:hover, .power-btn:hover { background: rgba(255,255,255,.14); }

.shutdown { position: fixed; inset: 0; background: rgba(0,0,0,.92); backdrop-filter: blur(8px); display: none; z-index: 1000; color: var(--text); }
.shutdown.show { display: grid; place-items: center; animation: fadeIn .3s ease; }
.shutdown-inner { text-align: center; font-size: 14px; color: var(--muted); display: grid; gap: 10px; place-items: center; }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--danger); border-radius: 50%; animation: spin .9s linear infinite; }
.shutdown-text { font-size: 14px; }
.pwr-icon { display: none; color: var(--text); opacity: .92; filter: drop-shadow(0 0 10px rgba(255,255,255,.08)); animation: pulse 1.8s ease-in-out infinite; }
.shutdown.off .pwr-icon { display: block; }
.shutdown.off .shutdown-text { display: none; }
.shutdown.boot .spinner { border-top-color: var(--accent); }
.shutdown.boot .shutdown-text { display: block; }
.desktop.disabled { filter: grayscale(1) brightness(.2); pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); opacity: .85; } }

.window { position: fixed; inset: 160px 320px 160px 320px; display: none; z-index: 900; background: #0d1024; border: 1px solid var(--stroke); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.45); transform: translate(var(--win-x, 0px), var(--win-y, 0px)); }
.window.show { display: grid; grid-template-rows: 56px 1fr; animation: fadeIn .2s ease; }
.window-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--stroke); cursor: grab; }
.window-title { font-weight: 700; }
.window-close { height: 28px; width: 28px; border-radius: 999px; background: transparent; border: none; color: var(--muted); display: grid; place-items: center; }
.window-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
.window-close:active { background: rgba(255,255,255,.12); }
.window-close:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.window-body { padding: 16px; overflow: hidden; min-height: 0; }
.window-body.appcenter-layout { padding: 0; }

.appcenter-layout { display: grid; grid-template-columns: 160px 1fr; gap: 0; height: 100%; min-height: 0; }
.ac-sidebar { display: flex; flex-direction: column; gap: 0; align-items: stretch; padding: 0; border-right: 1px solid var(--stroke); background: transparent; }
.ac-nav { display: flex; align-items: center; gap: 10px; height: 36px; border-radius: 0; background: transparent; border: none; color: var(--muted); text-align: left; padding: 0 16px; width: 100%; }
.ac-nav .ac-icon { display: grid; place-items: center; color: var(--muted); }
.ac-nav.active { background: rgba(255,255,255,.10); color: var(--accent-blue); }
.ac-nav.active .ac-icon { color: var(--accent-blue); }
.ac-nav:hover { background: rgba(255,255,255,.08); color: var(--text); }
.ac-main { display: grid; gap: 12px; overflow: auto; min-height: 0; align-content: start; padding: 12px 16px 0; }
.ac-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 16px; }
.ac-controls { display: flex; gap: 6px; }
.btn.icon { width: 32px; height: 32px; padding: 0; }
.ac-actions { display: flex; gap: 8px; }
.ac-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--stroke); padding-bottom: 12px; justify-content: center; margin-top: 8px; }
.tab { position: relative; height: 30px; padding: 0 2px; border: none; background: transparent; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-blue); }
.tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -7px; height: 3px; width: 20px; border-radius: 2px; background: var(--accent-blue); }
.ac-list { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 12px; align-content: start; }
.app-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.app-row:hover { background: rgba(255,255,255,.10); }
.row-icon { height: 40px; width: 40px; border-radius: 10px; background: transparent; display: grid; place-items: center; }
.row-title { font-weight: 700; }
.row-sub { font-size: 12px; color: var(--muted); }
.btn { height: 30px; padding: 0 12px; border-radius: 8px; background: rgba(255,255,255,.10); border: 1px solid var(--stroke); color: var(--text); cursor: pointer; transition: background .15s ease, transform .08s ease, box-shadow .15s ease; }
.btn.small { height: 26px; padding: 0 10px; border-radius: 999px; }
.btn.primary { background: var(--accent-blue); color: #fff; border: none; }
.btn.primary:hover { background: #3182f6; box-shadow: 0 2px 8px rgba(49,130,246,.25); }
.btn.primary:active { background: #276ae6; transform: scale(.98); }
.btn:disabled { cursor: not-allowed; opacity: .6; box-shadow: none; }
.field { height: 32px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); border-radius: 8px; color: var(--text); padding: 0 10px; }
.field::placeholder { color: var(--muted); }
.ac-search { height: 28px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); border-radius: 8px; padding: 0 10px; margin: 0 8px; }
.ac-search:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(45,124,240,.15); }

.docker-layout { display: grid; grid-template-columns: 160px 1fr; gap: 16px; height: 100%; min-height: 0; }
.docker-nav { display: grid; gap: 8px; }
.nav-item { height: 34px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid var(--stroke); color: var(--text); text-align: left; padding: 0 10px; }
.nav-item.active { background: rgba(255,255,255,.16); }
.docker-main { display: grid; gap: 12px; overflow: auto; min-height: 0; align-content: start; }
.docker-toolbar { display: flex; gap: 8px; align-items: center; }
.docker-toolbar .spacer { flex: 1; }
.docker-table { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; gap: 8px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid var(--stroke); }
.row.header { font-weight: 700; background: rgba(255,255,255,.14); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.chip.ok { background: #3cc2a1; color: #06211a; }
.chip.stop { background: #f97171; color: #280808; }

@media (max-width: 960px) {
  .window { inset: 70px 12px 70px 12px; }
  .appcenter-layout, .docker-layout { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .app { width: 64px; }
  .label { font-size: 11px; }
}
.tab { font-size: 14px; font-weight: 600; height: 28px; }
.ac-nav { font-size: 15px; }
.btn { font-size: 14px; }
