/* Wella OS · Gaya shell GNOME/Ubuntu
   Top bar gelap, dock kiri ala Ubuntu, jendela Adwaita, lock screen GDM.
   Font sistem saja (Cantarell/Ubuntu) — tanpa font eksternal. */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: "Cantarell", "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; color: #1e1e1e;
  overflow: hidden; background: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: #e95420; }
img { display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== Top bar ===================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 600;
  display: flex; align-items: center; gap: 2px;
  background: rgba(18, 18, 18, 0.92); color: #fff;
  padding: 0 8px; font-size: 13px; user-select: none;
}
.topbar .tb-left, .topbar .tb-right { display: flex; align-items: center; gap: 2px; flex: 1; }
.topbar .tb-right { justify-content: flex-end; }
.topbar .tb-center { flex: 0 0 auto; }
#activities-btn {
  padding: 4px 10px; border-radius: 6px; font-weight: 700; color: #fff;
}
#activities-btn:hover, #activities-btn.active { background: rgba(255,255,255,.16); }
#topbar-app { padding: 4px 8px; border-radius: 6px; color: rgba(255,255,255,.85); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar-clock { padding: 4px 10px; border-radius: 6px; font-weight: 600; cursor: default; }
#topbar-clock:hover { background: rgba(255,255,255,.16); }
.tb-status { display: flex; align-items: center; gap: 10px; padding: 4px 8px; color: #fff; }
.tb-status svg { display: block; }
#topbar-user { padding: 2px; border-radius: 50%; display: flex; }
#topbar-user:hover { background: rgba(255,255,255,.16); }
#topbar-user img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* Menu pengguna */
.user-menu {
  position: fixed; top: 36px; right: 8px; z-index: 400; width: 220px;
  background: #fff; color: #1e1e1e; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45); padding: 6px;
  display: none;
}
.user-menu.open { display: block; }
.user-menu .um-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #eee; margin-bottom: 4px; }
.user-menu .um-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-menu .um-head b { display: block; font-size: 14px; }
.user-menu .um-head span { font-size: 12px; color: #777; }
.user-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; }
.user-menu button:hover { background: #f0f0f0; }

/* ===================== Dock (kiri, ala Ubuntu) ===================== */
.dock {
  position: fixed; left: 0; top: 32px; bottom: 0; width: 64px; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0; background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(8px); user-select: none;
}
.dock-item {
  position: relative; width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dock-item:hover { background: rgba(255,255,255,.14); }
.dock-item.focused { background: rgba(255,255,255,.2); }
.dock-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.dock-icon img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.dock-icon.txt { font-size: 22px; color: #fff; }
.dock-item .dot {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #e95420;
  opacity: 0; transition: opacity .15s;
}
.dock-item.running .dot { opacity: 1; }
.dock-item .tip {
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  background: rgba(20,20,20,.92); color: #fff; font-size: 12px;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 200;
}
.dock-item:hover .tip { opacity: 1; }
.dock-sep { width: 36px; height: 1px; background: rgba(255,255,255,.25); margin: 6px 0; }
.dock-sp { flex: 1; }
#show-apps .dock-icon { display: grid; grid-template-columns: repeat(3, 7px); grid-auto-rows: 7px; gap: 3px; }
#show-apps .dock-icon i { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: block; }

/* ===================== Desktop ===================== */
.desktop {
  position: fixed; left: 64px; top: 32px; right: 0; bottom: 0; z-index: 1;
  background: #2b2b2b url("wallpaper/yukie-wallpaper.webp") center / cover no-repeat;
  overflow: hidden;
}

/* ===================== Jendela (Adwaita) ===================== */
.window {
  position: absolute; display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  opacity: 0; transform: scale(.96); transition: opacity .16s ease, transform .16s ease;
  min-width: 340px; min-height: 240px; max-height: 100%;
}
.window.open { opacity: 1; transform: scale(1); }
.window.max { border-radius: 0; }
.win-bar {
  flex: 0 0 auto; height: 44px; display: flex; align-items: center;
  background: linear-gradient(#f8f8f8, #ececec);
  border-bottom: 1px solid #d2d2d2; padding: 0 8px 0 14px;
  cursor: grab; user-select: none; position: relative;
}
.win-bar:active { cursor: grabbing; }
.win-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-weight: 700; font-size: 13px; color: #2e2e2e;
  max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  pointer-events: none;
}
.win-controls { margin-left: auto; display: flex; gap: 2px; }
.win-controls button {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; color: #444;
}
.win-controls button:hover { background: rgba(0,0,0,.1); }
.win-controls .wc-close:hover { background: #e01b24; color: #fff; }
.win-body { flex: 1; overflow: auto; position: relative; background: #fff; }
.app-term .win-bar { background: #2e2e2e; border-bottom-color: #1c1c1c; }
.app-term .win-title { color: #eee; }
.app-term .win-controls button { color: #ddd; }
.app-term .win-controls button:hover { background: rgba(255,255,255,.15); }
.app-term .win-controls .wc-close:hover { background: #e01b24; color: #fff; }

/* Pegangan resize */
.rz { position: absolute; z-index: 5; }
.rz-l { left: 0; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rz-r { right: 0; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rz-b { left: 8px; right: 8px; bottom: 0; height: 6px; cursor: ns-resize; }
.rz-bl { left: 0; bottom: 0; width: 12px; height: 12px; cursor: nesw-resize; }
.rz-br { right: 0; bottom: 0; width: 12px; height: 12px; cursor: nwse-resize; }

/* ===================== Layar kunci (GDM) ===================== */
.lockscreen {
  position: fixed; inset: 0; z-index: 1000;
  background: #111 url("wallpaper/yukie-wallpaper.webp") center / cover no-repeat;
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s ease; cursor: pointer;
}
.lockscreen::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(10,10,20,.45); backdrop-filter: blur(6px) brightness(.75);
}
.lockscreen.out { opacity: 0; pointer-events: none; }
.lockscreen > * { position: relative; z-index: 1; }
#lock-stage-clock { text-align: center; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.lock-time { font-size: 96px; font-weight: 300; line-height: 1; letter-spacing: 2px; }
.lock-date { font-size: 22px; font-weight: 500; margin-top: 10px; opacity: .95; }
.lock-hint { margin-top: 46px; font-size: 13px; opacity: .7; }
#lock-stage-user { text-align: center; }
.lock-user img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 8px 30px rgba(0,0,0,.5);
  margin: 0 auto 16px;
}
.lock-user p { font-size: 22px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.lock-enter {
  margin-top: 20px; padding: 10px 34px; border-radius: 999px;
  background: #e95420; color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.lock-enter:hover { background: #f2662f; }
.lock-clock-mini { text-align: center; margin-bottom: 26px; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.lock-clock-mini .lock-time { font-size: 44px; }
.lock-clock-mini .lock-date { font-size: 16px; }

/* ===================== Activities overview ===================== */
.overview {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(12,12,16,.82); backdrop-filter: blur(14px);
  color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: 90px 40px 40px; opacity: 0; transition: opacity .2s ease;
  visibility: hidden; pointer-events: none;
}
.overview.open { opacity: 1; visibility: visible; pointer-events: auto; }
.ov-search {
  width: min(480px, 90vw); padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  color: #fff; font-size: 15px; outline: none; text-align: center;
}
.ov-search::placeholder { color: rgba(255,255,255,.65); }
.ov-search:focus { border-color: #e95420; background: rgba(255,255,255,.16); }
.ov-workspaces { display: flex; gap: 16px; margin: 28px 0 10px; }
.ov-ws {
  width: 240px; height: 140px; border-radius: 10px; overflow: hidden;
  background: #222 url("wallpaper/yukie-wallpaper.webp") center / cover no-repeat;
  border: 2px solid rgba(255,255,255,.35); position: relative; cursor: pointer;
}
.ov-ws.on { border-color: #e95420; }
.ov-ws span {
  position: absolute; left: 10px; bottom: 8px; font-size: 12px;
  background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px;
}
.ov-grid {
  display: flex; flex-wrap: wrap; gap: 8px 4px; justify-content: center;
  max-width: 900px; margin-top: 22px;
}
.ov-app {
  width: 104px; padding: 12px 4px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff;
}
.ov-app:hover { background: rgba(255,255,255,.12); }
.ov-app img { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.ov-app .ov-ic { font-size: 30px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); border-radius: 12px; }
.ov-app span { font-size: 12px; text-align: center; line-height: 1.25; }
.ov-hint { margin-top: 26px; font-size: 12px; opacity: .55; }

/* ===================== Catatan layar kecil ===================== */
.small-note {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 600;
  background: rgba(20,20,20,.92); color: #fff; font-size: 13px;
  padding: 10px 14px; border-radius: 10px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 92vw;
}
.small-note .ss-close { font-size: 18px; line-height: 1; opacity: .8; }
.small-note .ss-close:hover { opacity: 1; }

@media (max-width: 740px) {
  #topbar-app { display: none; }
  .tb-status .tb-net { display: none; }
  .lock-time { font-size: 64px; }
  .ov-ws { width: 160px; height: 96px; }
}
