.cloud-app {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: #f4f7ff;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(88, 150, 255, 0.35), transparent 60%),
    radial-gradient(720px 480px at 88% 0%, rgba(36, 92, 210, 0.45), transparent 62%),
    linear-gradient(160deg, #071633 0%, #0b2f78 46%, #071428 100%);
  font-family: var(--coms-font, Inter, ui-sans-serif, system-ui, sans-serif);
}

.cloud-app::before,
.cloud-app::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.cloud-app::before {
  width: 640px;
  height: 640px;
  left: -180px;
  bottom: -220px;
  background: radial-gradient(circle, rgba(70, 130, 255, 0.28), transparent 68%);
}

.cloud-app::after {
  width: 520px;
  height: 520px;
  right: -120px;
  top: 120px;
  background: radial-gradient(circle, rgba(120, 170, 255, 0.16), transparent 70%);
}

.cloud-bar,
.cloud-board { position: relative; }
.cloud-bar { z-index: 3; }
.cloud-board { z-index: 1; }
.cloud-launcher[hidden] { display: none !important; }

.cloud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 8px;
}

.cloud-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.cloud-mark {
  width: 28px;
  height: 18px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 8px 12px, #fff 7px, transparent 8px),
    radial-gradient(circle at 18px 8px, #fff 8px, transparent 9px),
    radial-gradient(circle at 26px 13px, #d7e6ff 6px, transparent 7px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.cloud-bar-actions,
.cloud-theme {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cloud-theme {
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 16, 40, 0.45);
}

.cloud-theme label {
  border-radius: 999px;
  padding: 6px 10px;
  color: #d5e2ff;
  font-size: 0.78rem;
}

.cloud-theme input { position: absolute; opacity: 0; }
.cloud-theme label:has(input:checked) { background: rgba(255, 255, 255, 0.16); color: #fff; }
.cloud-theme label:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }

.cloud-icon-button,
.cloud-open,
.cloud-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 16, 40, 0.45);
  color: #fff;
  text-decoration: none;
}

.cloud-icon-button,
.cloud-jump {
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
}

.cloud-open { min-height: 36px; padding: 0 14px; font-weight: 700; }

.cloud-icon-button:focus-visible,
.cloud-open:focus-visible,
.cloud-jump:focus-visible,
.cloud-brand:focus-visible,
.cloud-launcher a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cloud-launcher {
  position: absolute;
  top: 68px;
  right: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(320px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(8, 20, 48, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.cloud-launcher a,
.cloud-launcher span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.cloud-launcher a:hover { background: rgba(255, 255, 255, 0.08); }
.cloud-launcher span { color: #9eb0d4; }
.cloud-launcher small {
  margin-left: auto;
  color: #f0c36a;
  font-size: 0.72rem;
}

.cloud-board {
  display: grid;
  grid-template-columns: 280px minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 40px;
}

.cloud-profile { grid-column: 1; grid-row: 1 / span 2; }
.cloud-mail { grid-column: 2 / span 2; }
.cloud-drive { grid-column: 2; }
.cloud-chats { grid-column: 3; }
.cloud-soon { grid-column: 1 / -1; }

.cloud-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(190, 214, 255, 0.16);
  border-radius: 22px;
  background: rgba(8, 20, 48, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.cloud-profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 280px;
  padding-top: 28px;
  background:
    radial-gradient(120px 120px at 78% 18%, rgba(90, 150, 255, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(18, 48, 110, 0.9), rgba(8, 20, 48, 0.92));
}

.cloud-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #d7e4ff, #8eb0ee);
  color: #10284f;
  font-size: 2rem;
  font-weight: 700;
}

.cloud-profile h1,
.cloud-card h2,
.cloud-profile p { overflow-wrap: break-word; }
.cloud-profile h1,
.cloud-card h2 { margin: 0; letter-spacing: -0.03em; }
.cloud-profile h1 { font-size: 2rem; }
.cloud-profile p,
.cloud-card-head p,
.cloud-placeholder,
.cloud-row span,
.cloud-file small,
.cloud-chat-row small { color: #c5d4f5; }
.cloud-host { margin: 10px 0 0; color: #9eb6e8 !important; font-size: 0.92rem; }
.cloud-profile .cloud-open { margin-top: 16px; }

.cloud-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.cloud-card-head h2 { font-size: 1.35rem; }
.cloud-card-head p { margin: 2px 0 0; font-size: 0.86rem; }

.cloud-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #2f6fe0 center / 18px 18px no-repeat;
}

.cloud-app-icon-mail { background-color: #2f6fe0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 6.5A2.5 2.5 0 0 1 5.5 4h13A2.5 2.5 0 0 1 21 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 17.5v-11Zm2.2.3 6.8 4.6 6.8-4.6a.9.9 0 0 0-.5-.3h-13a.9.9 0 0 0-.5.3Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-drive { background-color: #3d7eef; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 7.5A2.5 2.5 0 0 1 6.5 5H10l2 2h5.5A2.5 2.5 0 0 1 20 9.5v7a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5v-9Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-chat { background-color: #1f9d68; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M5 5.5A2.5 2.5 0 0 1 7.5 3h9A2.5 2.5 0 0 1 19 5.5v7A2.5 2.5 0 0 1 16.5 15H11l-4.2 3.2A1 1 0 0 1 5 17.4V5.5Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-notes { background-color: #e2b340; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23331f00' d='M7 3h8.2L19 6.8V19a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm2 8h6v1.6H9V11Zm0 3.4h6V16H9v-1.6Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-calendar { background-color: #d4654a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M7 3h2v2h6V3h2v2h1.5A2.5 2.5 0 0 1 21 7.5v11a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 18.5v-11A2.5 2.5 0 0 1 5.5 5H7V3Zm12 8H5v7.5c0 .3.2.5.5.5h13c.3 0 .5-.2.5-.5V11Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-photos { background-color: #7a6adf; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M5 5.5A2.5 2.5 0 0 1 7.5 3h9A2.5 2.5 0 0 1 19 5.5v13a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 5 18.5v-13Zm3.2 10.8 2.1-2.6 1.6 1.8 2.3-3 2.6 3.8H8.2Z'/%3E%3C/svg%3E"); }
.cloud-app-icon-meet { background-color: #3c8f7a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 7.5A2.5 2.5 0 0 1 6.5 5h7A2.5 2.5 0 0 1 16 7.5v9a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 4 16.5v-9Zm12 1.8 3.2-1.8v9l-3.2-1.8v-5.4Z'/%3E%3C/svg%3E"); }

.cloud-mail-list,
.cloud-drive-list,
.cloud-chats-list { min-height: 120px; }

.cloud-mail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}

.cloud-row,
.cloud-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 8px 4px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.cloud-row:hover,
.cloud-chat-row:hover,
.cloud-file:hover { background: rgba(255, 255, 255, 0.06); }
.cloud-row strong,
.cloud-chat-row strong,
.cloud-file strong {
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cloud-row span,
.cloud-file small { grid-column: 1; overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.cloud-row time,
.cloud-file time { color: #9eb0d4; font-size: 0.75rem; }
.cloud-row[data-unread="true"] strong { color: #fff; }

.cloud-drive-list,
.cloud-chats-list { display: grid; gap: 8px; }
.cloud-drive-list { grid-template-columns: 1fr 1fr; }

.cloud-file {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(4, 12, 32, 0.45);
  color: inherit;
  text-decoration: none;
}

.cloud-chat-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.cloud-person {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #24508f;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.cloud-soon-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-soon-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(4, 12, 32, 0.35);
}

.cloud-soon-list small { margin-left: auto; color: #f0c36a; font-size: 0.75rem; }
.cloud-placeholder { margin: 8px 0 0; line-height: 1.45; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="light"] .cloud-app {
  color: #142033;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(120, 168, 255, 0.45), transparent 60%),
    linear-gradient(160deg, #e7f0ff 0%, #d5e4fb 48%, #eef3fb 100%);
}

html[data-theme="light"] .cloud-card { background: rgba(255, 255, 255, 0.82); border-color: rgba(30, 70, 140, 0.12); }
html[data-theme="light"] .cloud-profile { background: linear-gradient(180deg, #f7fbff, #e4eeff); }
html[data-theme="light"] .cloud-profile p,
html[data-theme="light"] .cloud-card-head p,
html[data-theme="light"] .cloud-placeholder,
html[data-theme="light"] .cloud-row span,
html[data-theme="light"] .cloud-file small { color: #3d5274; }
html[data-theme="light"] .cloud-theme,
html[data-theme="light"] .cloud-icon-button,
html[data-theme="light"] .cloud-open,
html[data-theme="light"] .cloud-jump,
html[data-theme="light"] .cloud-launcher { background: rgba(255, 255, 255, 0.9); color: #142033; border-color: rgba(30, 70, 140, 0.16); }
html[data-theme="light"] .cloud-theme label { color: #243656; }
html[data-theme="light"] .cloud-file,
html[data-theme="light"] .cloud-soon-list li { background: rgba(226, 236, 252, 0.7); }
html[data-theme="light"] .cloud-launcher span { color: #5c6e8c; }

@media (max-width: 980px) {
  .cloud-board { grid-template-columns: 1fr 1fr; }
  .cloud-profile { grid-column: 1 / -1; grid-row: auto; min-height: 0; }
  .cloud-mail,
  .cloud-drive,
  .cloud-chats,
  .cloud-soon { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .cloud-bar { align-items: flex-start; flex-wrap: wrap; padding-inline: 16px; }
  .cloud-bar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .cloud-theme label { padding: 6px 8px; }
  .cloud-board { padding-inline: 16px; }
  .cloud-mail-list,
  .cloud-drive-list,
  .cloud-soon-list { grid-template-columns: 1fr; }
  .cloud-launcher { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-app::before,
  .cloud-app::after { display: none; }
}
