* {
  box-sizing: border-box;
}

:root {
  --bg: #0c0b0f;
  --bg-soft: #101116;
  --panel: #14151b;
  --panel-soft: #181920;
  --panel-hover: #1d1e25;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.13);
  --text: #f4f4f5;
  --text-soft: #d4d4d8;
  --muted: #92929c;
  --muted-2: #666671;
  --accent: #8672ea;
  --accent-strong: #4729dd;
  --accent-soft: rgba(71,41,221,.14);
  --user-bubble: #25262d;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(71,41,221,.08),
      transparent 38%
    ),
    var(--bg);
}

.topbar {
  height: 64px;
  background: rgba(12,11,15,.88);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 7px 22px rgba(71,41,221,.25);
}

.brand b {
  color: var(--accent);
  font-weight: 750;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #c6bcf6;
  background: var(--accent-soft);
  border: 1px solid rgba(134,114,234,.18);
  border-radius: 999px;
  padding: 6px 9px;
}

.layout {
  display: grid;
  grid-template-columns: 245px minmax(0,1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid var(--border);
  background: rgba(12,16,16,.72);
  min-height: calc(100vh - 64px);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-top {
  min-width: 0;
}

.new-chat-btn {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  text-align: left;
  transition:
    background .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.new-chat-btn:hover {
  background: var(--panel-hover);
  border-color: rgba(255,255,255,.18);
}

.new-chat-btn:active {
  transform: scale(.985);
}

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

.eyebrow {
  font-size: 10px;
  letter-spacing: .13em;
  font-weight: 800;
  color: var(--muted-2);
  margin: 0 0 9px;
}

.sidebar-section .eyebrow {
  padding: 0 7px;
}

.sidebar-bottom {
  padding-top: 18px;
}

.side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
}

.side-card strong {
  display: block;
  font-size: 12px;
}

.side-card p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 5px 0 0;
}

.side-icon {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.content {
  min-width: 0;
  width: 100%;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.chat-section {
  height: 100%;
  width: 100%;
}

.chat-layout {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
}

.chat-main {
  width: min(900px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  min-height: 76px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.chat-header .eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
}

.chat-header h1,
.chat-header h2 {
  font-size: 17px;
  line-height: 1.2;
  margin: 0;
  font-weight: 650;
  letter-spacing: -.015em;
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.ghost:hover {
  color: var(--text);
  background: var(--panel-soft);
  border-color: var(--border-strong);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 30px 24px 24px;
  scroll-behavior: smooth;
}

.chat-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 15px 100px;
}

.chat-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(134,114,234,.16);
  color: var(--accent);
  font-size: 25px;
  margin-bottom: 18px;
}

.chat-empty h2 {
  margin: 0 0 9px;
  font-size: 25px;
  letter-spacing: -.035em;
}

.chat-empty p {
  max-width: 510px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 700px;
  margin-top: 22px;
}

.suggestions button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: .18s ease;
}

.suggestions button:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.chat-message {
  width: 100%;
  display: flex;
  margin: 0 auto 22px;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.assistant {
  justify-content: flex-start;
}

.typing-message {
  margin-bottom: 18px;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  padding: 8px 0;
  color: var(--text-soft);
}

.typing-label {
  font-size: 12px;
  opacity: .8;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  animation: umairaTyping 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: .16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: .32s;
}

@keyframes umairaTyping {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: .3;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-bubble {
  max-width: min(760px, 88%);
  border-radius: 15px;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.user .chat-bubble {
  background: var(--user-bubble);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-message.assistant .chat-bubble {
  background: transparent;
  border: 0;
  color: var(--text-soft);
  padding-left: 0;
}

.chat-history-list {
  display: grid;
  gap: 3px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.chat-history-item {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  padding: 9px 9px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition:
    background .18s ease,
    border-color .18s ease;
}

.chat-history-item:hover {
  background: rgba(255,255,255,.045);
  border-color: var(--border);
}

.chat-history-item.active {
  background: rgba(255,255,255,.07);
  border-color: var(--border);
}

.chat-history-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.chat-history-time {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  margin-top: 3px;
}

.chat-history-empty {
  color: var(--muted-2);
  font-size: 11px;
  padding: 8px 7px;
}

.chat-composer {
  margin: 0 20px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  border-radius: 16px;
  min-height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 7px 7px 7px 14px;
  box-shadow: var(--shadow);
}

#chatInput {
  flex: 1;
  min-width: 0;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 0;
  line-height: 1.5;
  font-size: 13px;
}

#chatInput::placeholder {
  color: var(--muted-2);
}

#chatInput:focus {
  outline: 0;
}

#chatSendBtn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-strong);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition:
    filter .18s ease,
    transform .18s ease;
}

#chatSendBtn:hover {
  filter: brightness(1.08);
}

#chatSendBtn:active {
  transform: scale(.95);
}

.composer-note {
  text-align: center;
  color: var(--muted-2);
  font-size: 9px;
  margin: 8px 20px 13px;
}

.chat-bubble h3,
.chat-bubble h4,
.chat-bubble h5 {
  color: var(--text);
  margin-top: 18px;
  margin-bottom: 8px;
}

.chat-bubble h3 {
  font-size: 17px;
}

.chat-bubble h4 {
  font-size: 15px;
}

.chat-bubble h5 {
  font-size: 13px;
}

.chat-bubble strong {
  color: var(--text);
}

.chat-bubble em {
  color: var(--text-soft);
}

.chat-bubble ul {
  padding-left: 21px;
  margin: 9px 0;
}

.chat-bubble li {
  margin: 4px 0;
}

.chat-bubble code {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: .9em;
}

.chat-code-block {
  margin: 12px 0;
  border: 1px solid var(--border);
  background: #090c0c;
  border-radius: 11px;
  overflow: hidden;
}

.chat-code-header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}

.chat-code-copy {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
}

.chat-code-copy:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.chat-code-block pre {
  margin: 0;
  padding: 13px;
  overflow-x: auto;
  white-space: pre;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #e4e4e7;
}

.error {
  color: #f87171;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

@media (max-width: 850px) {

  .topbar {
    height: 58px;
    padding: 0 14px;
  }

  .layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 58px);
  }

  .sidebar {
    display: none;
  }

  .content {
    height: calc(100vh - 58px);
  }

  .chat-header {
    padding: 14px 15px;
    min-height: 66px;
  }

  .chat-messages {
    padding: 22px 15px 18px;
  }

  .chat-bubble {
    max-width: 94%;
  }

  .chat-empty h2 {
    font-size: 22px;
  }

  .chat-empty p {
    font-size: 12px;
  }

  .suggestions {
    flex-direction: column;
    align-items: stretch;
    width: min(360px, 100%);
  }

  .suggestions button {
    border-radius: 10px;
  }

  .chat-composer {
    margin: 0 10px;
    border-radius: 14px;
  }

  .composer-note {
    margin-left: 10px;
    margin-right: 10px;
  }
}


.chat-response-wrapper {
  max-width: min(760px, 88%);
  min-width: 0;
}

.chat-message-actions {
  display: flex;
  align-items: center;
  margin-top: 7px;
}

.copy-response-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: .18s ease;
}

.copy-response-button:hover {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--border-strong);
}

.regenerate-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: .18s ease;
}

.regenerate-button:hover {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--border-strong);
}

.regenerate-button:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 700px) {
  .chat-response-wrapper {
    max-width: 94%;
  }
}

/* =========================================
   UMAIRA BRAND LOGO
   ========================================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.umaira-logo {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
}


/* UMAIRA custom logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand-mark.umaira-logo {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
}


/* =========================================
   UMAIRA COMPOSER MENU
   ========================================= */

.chat-composer-wrap {
  position: relative;
  margin: 0 20px;
}

.chat-composer-wrap .chat-composer {
  margin: 0;
}

.composer-plus {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background .18s ease,
    transform .18s ease,
    border-color .18s ease;
}

.composer-plus:hover {
  background: var(--panel-2);
}

.composer-plus:active {
  transform: scale(.94);
}

.composer-plus.is-open {
  transform: rotate(45deg);
  background: var(--panel-2);
}

.composer-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  width: min(270px, calc(100vw - 40px));
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 50;
  
}

.composer-menu[hidden] {
  display: none;
}

.composer-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 11px;
  padding: 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
}

.composer-menu-item:hover {
  background: var(--panel-2);
}

.composer-menu-item:active {
  transform: scale(.98);
}

.composer-menu-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(55,32,167,.12);
  font-size: 17px;
}

.composer-menu-item span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.composer-menu-item strong {
  font-size: 12px;
  font-weight: 650;
}

.composer-menu-item small {
  color: var(--muted-2);
  font-size: 9px;
}



@media (max-width: 520px) {
  .chat-composer-wrap {
    margin: 0 12px;
  }

  .composer-menu {
    width: min(270px, calc(100vw - 24px));
  }
}


/* =========================================
   UMAIRA ATTACHMENT PREVIEW
   ========================================= */

.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 20px 8px;
}

.composer-attachments:empty {
  display: none;
}

.attachment-chip {
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--panel);
}

.attachment-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(55,32,167,.12);
  font-size: 14px;
}

.attachment-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
}

.attachment-size {
  color: var(--muted-2);
  font-size: 8px;
}

.attachment-remove {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.attachment-remove:hover {
  background: var(--panel-2);
  color: var(--text);
}


/* =========================================
   UMAIRA IMAGE ATTACHMENT
   ========================================= */

.attachment-chip.image-chip {
  position: relative;
  padding: 5px;
  overflow: hidden;
}

.attachment-image-preview {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--panel-2);
}

.image-chip .attachment-info {
  max-width: 130px;
}

.image-chip .attachment-remove {
  margin-right: 2px;
}


/* =========================================
   UMAIRA IMAGE ATTACHMENT
   ========================================= */

.attachment-chip.image-chip {
  position: relative;
  padding: 5px;
  overflow: hidden;
}

.attachment-image-preview {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--panel-2);
}

.image-chip .attachment-info {
  max-width: 130px;
}

.image-chip .attachment-remove {
  margin-right: 2px;
}


/* =========================================
   UMAIRA CAMERA CAPTURE
   ========================================= */

.camera-captured {
  position: relative;
}

.camera-badge {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 8px;
  pointer-events: none;
}


.chat-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.chat-attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
}

.chat-attachment-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(55,32,167,.12);
  font-size: 14px;
}

.chat-attachment-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-attachment-info strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.chat-attachment-info small {
  color: var(--muted-2);
  font-size: 8px;
}


.composer-mic {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background .18s ease,
    transform .18s ease,
    border-color .18s ease;
}

.composer-mic:hover {
  background: var(--panel-2);
}

.composer-mic:active {
  transform: scale(.94);
}

.composer-mic.is-recording {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .4);
}


/* =========================================
   UMAIRA — DRAG & DROP / PASTE ATTACHMENT
   ========================================= */

.chat-composer-wrap.is-dragover {
  border-radius: 16px;
}

.chat-composer-wrap.is-dragover .chat-composer {
  border-color: var(--border-strong);
  background: var(--panel-2);
  box-shadow: 0 0 0 2px rgba(55,32,167,.12);
}

.chat-composer-wrap.is-dragover::before {
  content: "Lepaskan file di sini";
  position: absolute;
  inset: -8px;
  z-index: 60;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(55,32,167,.55);
  border-radius: 16px;
  background: rgba(55,32,167,.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  pointer-events: none;
}

.chat-composer-wrap.is-paste {
  animation: umairaPasteFlash .35s ease;
}

@keyframes umairaPasteFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(55,32,167,.28);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(55,32,167,0);
  }
}


/* =========================================
   UMAIRA — MOBILE UX 3.10
   ========================================= */

@media (max-width: 600px) {
  .chat-composer-wrap {
    margin: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .chat-composer {
    min-height: 52px;
    gap: 7px;
    padding: 7px;
    border-radius: 16px;
  }

  .composer-plus,
  .composer-mic,
  #chatSendBtn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
  }

  .composer-plus {
    font-size: 23px;
  }

  .composer-mic {
    font-size: 17px;
  }

  #chatSendBtn {
    font-size: 18px;
  }

  #chatInput {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    max-height: 120px;
    padding: 9px 5px;
    font-size: 15px;
    line-height: 1.4;
  }

  .composer-menu {
    left: 0;
    bottom: calc(100% + 8px);
    width: min(290px, calc(100vw - 20px));
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .composer-menu-item {
    min-height: 54px;
    padding: 9px;
  }

  .composer-menu-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .composer-menu-item strong {
    font-size: 12px;
  }

  .composer-menu-item small {
    font-size: 9px;
  }

  .composer-attachments {
    margin: 0 10px 7px;
    max-height: 120px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .attachment-chip {
    max-width: calc(100vw - 20px);
  }

  .attachment-image-preview {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .attachment-remove {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .chat-attachment-info strong {
    max-width: min(190px, 48vw);
  }
}

@media (max-width: 380px) {
  .chat-composer {
    gap: 5px;
    padding: 6px;
  }

  .composer-plus,
  .composer-mic,
  #chatSendBtn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex-basis: 38px;
    border-radius: 10px;
  }

  #chatInput {
    font-size: 14px;
    padding-left: 3px;
    padding-right: 3px;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .composer-plus:hover,
  .composer-mic:hover,
  .composer-menu-item:hover,
  .attachment-remove:hover {
    background: transparent;
  }

  .composer-plus:active,
  .composer-mic:active,
  .composer-menu-item:active,
  .attachment-remove:active {
    opacity: .72;
  }
}

/* Prevent accidental text selection on touch controls */
.composer-plus,
.composer-mic,
.composer-menu,
.composer-menu-item,
.attachment-remove {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* =========================================
   UMAIRA — MODERN CHAT UI POLISH
   ========================================= */

/* Chat text */
.chat-bubble {
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Remove unwanted paragraph indentation / spacing */
.chat-bubble p {
  margin: 0 0 10px;
  padding: 0;
  text-indent: 0;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble br {
  line-height: 1.55;
}

/* Lists stay aligned naturally */
.chat-bubble ul,
.chat-bubble ol {
  margin: 8px 0 10px;
  padding-left: 20px;
}

.chat-bubble li {
  margin: 3px 0;
  padding-left: 1px;
}

/* Assistant message feels lighter and cleaner */
.chat-message.assistant .chat-bubble {
  padding: 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* User message stays compact */
.chat-message.user .chat-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  line-height: 1.5;
}

/* Modern headings inside responses */
.chat-bubble h3,
.chat-bubble h4,
.chat-bubble h5 {
  margin-left: 0;
  padding-left: 0;
  text-indent: 0;
  line-height: 1.35;
}

.chat-bubble h3 {
  margin-top: 10px;
  margin-bottom: 6px;
}

.chat-bubble h4,
.chat-bubble h5 {
  margin-top: 8px;
  margin-bottom: 5px;
}

/* Code */
.chat-bubble code {
  font-size: .88em;
  line-height: 1.45;
}

/* =========================================
   COMPACT MODERN COMPOSER
   ========================================= */

.chat-composer-wrap {
  margin-left: 16px;
  margin-right: 16px;
}

.chat-composer {
  min-height: 48px;
  padding: 5px 6px;
  gap: 6px;
  border-radius: 15px;
}

#chatInput {
  min-height: 34px;
  max-height: 100px;
  padding: 7px 5px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  resize: none;
}

#chatInput::placeholder {
  font-size: 13px;
}

/* Compact controls */
.composer-plus,
.composer-mic,
#chatSendBtn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-basis: 36px;
  border-radius: 10px;
}

.composer-plus {
  font-size: 21px;
}

.composer-mic {
  font-size: 15px;
}

#chatSendBtn {
  font-size: 16px;
}

/* Cleaner message spacing */
.chat-message {
  margin-bottom: 16px;
}

.chat-message:last-child {
  margin-bottom: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .chat-bubble {
    font-size: 14px;
    line-height: 1.55;
  }

  .chat-composer-wrap {
    margin-left: 10px;
    margin-right: 10px;
  }

  .chat-composer {
    min-height: 46px;
    padding: 5px;
    gap: 5px;
    border-radius: 14px;
  }

  #chatInput {
    min-height: 32px;
    max-height: 90px;
    font-size: 14px;
    padding: 6px 3px;
  }

  .composer-plus,
  .composer-mic,
  #chatSendBtn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }
}




/* ===== UMAIRA PREMIUM REDESIGN ===== */
:root {
  --bg: #0a090d;
  --bg-soft: #0f0e14;
  --panel: #16141c;
  --panel-soft: #1b1923;
  --panel-hover: #232f2f;
  --border: rgba(255,255,255,.075);
  --border-strong: rgba(255,255,255,.13);
  --text: #f6f5fc;
  --text-soft: #d8d6e1;
  --muted: #95a9a8;
  --muted-2: #728685;
  --accent: #b0a2f5;
  --accent-strong: #4729dd;
  --accent-soft: rgba(71,41,221,.14);
  --user-bubble: #25232f;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
}

html { color-scheme: dark; }
body { background: var(--bg); }
button { transition: background .18s ease, border-color .18s ease, transform .18s ease; }
button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  background:
    radial-gradient(ellipse at 70% 0%, rgba(55,32,167,.09), transparent 42%),
    var(--bg);
}

.topbar {
  height: 66px;
  padding: 0 24px;
  background: rgba(10,9,13,.9);
  border-bottom-color: var(--border);
}

.brand { letter-spacing: -.045em; }
.brand-mark { border-radius: 12px; }
.layout {
  grid-template-columns: 252px minmax(0,1fr);
  min-height: calc(100vh - 66px);
}

.sidebar {
  position: relative;
  min-height: calc(100vh - 66px);
  padding: 18px 13px 14px;
  background: rgba(13,12,18,.94);
  border-right: 1px solid var(--border);
}

.new-chat-btn {
  min-height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(71,41,221,.2), rgba(71,41,221,.07));
  border-color: rgba(134,114,234,.24);
}
.new-chat-btn:hover {
  background: rgba(71,41,221,.22);
  border-color: rgba(176,162,245,.48);
}

.primary-nav { margin-top: 25px; }
.nav-group-label {
  margin: 0 9px 10px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}
.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 3px 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 560;
}
.nav-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #a394ec;
  font-size: 18px;
  font-weight: 650;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,.045);
}
.nav-item.active {
  color: #f1effd;
  background: linear-gradient(90deg, rgba(71,41,221,.2), rgba(71,41,221,.075));
  border-color: rgba(134,114,234,.12);
}
.nav-item.active .nav-icon { color: #c6bcf8; }

.sidebar-section { margin-top: 24px; }
.chat-history-list { max-height: 35vh; overflow-y: auto; }
.side-card {
  background: linear-gradient(145deg, #1a1821, #121117);
  border-radius: 14px;
}

.content {
  height: calc(100vh - 66px);
  overflow: auto;
  min-width: 0;
}
.chat-section { min-height: 100%; }
.chat-layout { min-height: 100%; }
.chat-main { min-width: 0; }
.chat-header {
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.chat-header h1 { letter-spacing: -.04em; }
.chat-messages { scrollbar-width: thin; scrollbar-color: #344544 transparent; }
.chat-composer-wrap { position: relative; }
.chat-composer {
  border: 1px solid rgba(176,162,245,.16);
  background: rgba(24,22,31,.94);
  border-radius: 19px;
  box-shadow: 0 10px 35px rgba(0,0,0,.2);
}
.chat-composer:focus-within {
  border-color: rgba(134,114,234,.45);
  box-shadow: 0 0 0 3px rgba(71,41,221,.07);
}
.chat-composer textarea { color: var(--text); }
.primary {
  background: linear-gradient(135deg, #8672ea, #3720a7);
  border-color: transparent;
  color: white;
}
.primary:hover { filter: brightness(1.1); }

.feature-workspace {
  min-height: 100%;
  padding: clamp(24px, 5vw, 58px);
  max-width: 1120px;
  margin: 0 auto;
}
.feature-page-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.feature-page-header .eyebrow { color: #a394ec; }
.feature-page-header h1 {
  margin: 10px 0;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -.05em;
}
.feature-page-header p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}
.feature-page-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 15px;
  margin-top: 25px;
}
.feature-card {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(28,26,36,.92), rgba(17,16,23,.96));
}
.feature-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: #c6bcf8;
  font-size: 20px;
  margin-bottom: 17px;
}
.feature-card h2 { margin: 0 0 8px; font-size: 16px; }
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.feature-status {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(176,162,245,.16);
  background: rgba(71,41,221,.09);
  color: #c5bbf8;
  font-size: 11px;
}

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .topbar { height: 58px; padding: 0 14px; }
  .layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 58px);
  }
  .sidebar {
    min-height: 0;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-bottom, .sidebar-section { display: none; }
  .primary-nav {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-group-label { display: none; }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    gap: 7px;
    padding: 8px 11px;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-icon { width: auto; font-size: 15px; }
  .content {
    height: calc(100dvh - 150px);
    min-height: 420px;
  }
  .feature-workspace { padding: 25px 17px; }
  .feature-page-content { grid-template-columns: 1fr; }
  .feature-card { padding: 18px; }
}

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


/* ===== UMAIRA AI HORDE IMAGE STUDIO ===== */
.image-studio-panel {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--border, #283434);
  border-radius: 22px;
  background: var(--panel, #16141d);
  box-sizing: border-box;
}
.image-studio-panel h2 {
  margin: 0 0 8px;
  color: var(--text, #f6f5fe);
  font-size: 1.35rem;
}
.image-studio-intro {
  color: var(--muted, #a2b4b3);
  line-height: 1.6;
  margin: 0 0 24px;
}
.image-studio-form {
  display: grid;
  gap: 12px;
}
.image-studio-form label {
  font-weight: 600;
  color: var(--text, #f6f5fe);
}
.image-studio-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 120px;
  padding: 15px;
  border: 1px solid var(--border, #324140);
  border-radius: 14px;
  background: #0e0d13;
  color: #f6f5fe;
  font: inherit;
  line-height: 1.6;
}
.image-studio-form textarea:focus {
  outline: 2px solid #4729dd;
  outline-offset: 2px;
}
.image-studio-actions {
  display: flex;
  justify-content: flex-end;
}
.image-studio-submit {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #412ab4;
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.image-studio-submit:disabled {
  opacity: .6;
  cursor: wait;
}
.image-studio-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted, #b7b4c6);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.image-studio-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 18px;
}
.image-result-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border, #324140);
  border-radius: 16px;
  background: #0e0d13;
}
.image-result-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0a090d;
}
.image-result-card p {
  padding: 0 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--text, #f6f5fe);
}
.image-result-download {
  display: inline-block;
  margin: 0 14px 16px;
  color: #a899f4;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .image-studio-panel { padding: 16px; border-radius: 16px; }
  .image-studio-actions { justify-content: stretch; }
  .image-studio-submit { width: 100%; }
}

/* UMAIRA IMAGE HISTORY */
.image-history-section {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border, #324140);
}
.image-history-section > h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}
.image-history-clear {
  padding: 9px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border, #324140);
  border-radius: 10px;
  background: transparent;
  color: var(--text, #f6f5fe);
  cursor: pointer;
}
.image-history-clear:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== UMAIRA UI REDESIGN V2 ===== */
:root {
  --bg: #212121;
  --bg-soft: #262626;
  --panel: #2b2b2b;
  --panel-soft: #303030;
  --panel-hover: #383838;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #f5f5f5;
  --text-soft: #dedede;
  --muted: #a3a3a3;
  --muted-2: #858585;
  --accent: #b3a5f6;
  --accent-strong: #6752d0;
  --accent-soft: rgba(103,82,208,.13);
  --user-bubble: #303030;
  --shadow: 0 12px 35px rgba(0,0,0,.16);
}

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  background: var(--bg);
}

.topbar {
  height: 58px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.brand {
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.035em;
}

.brand-mark {
  border-radius: 10px;
}

.layout {
  grid-template-columns: 248px minmax(0,1fr);
  min-height: calc(100vh - 58px);
}

.sidebar {
  min-height: calc(100vh - 58px);
  padding: 16px 12px;
  background: #171717;
  border-right: 1px solid var(--border);
}

.new-chat-btn {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
}

.new-chat-btn:hover {
  background: #292929;
  border-color: var(--border-strong);
}

.primary-nav { margin-top: 22px; }

.nav-group-label {
  color: var(--muted-2);
  letter-spacing: .09em;
}

.nav-item {
  min-height: 40px;
  margin: 2px 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #c4c4c4;
  font-size: 13px;
}

.nav-icon {
  color: #978ad8;
  font-size: 17px;
}

.nav-item:hover {
  color: var(--text);
  background: #262626;
}

.nav-item.active {
  color: var(--text);
  background: #303030;
  border-color: transparent;
}

.nav-item.active .nav-icon { color: var(--accent); }

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

.chat-history-list { scrollbar-width: thin; }

.side-card {
  background: #222;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.content {
  height: calc(100vh - 58px);
  background: var(--bg);
}

.chat-section,
.chat-layout,
.chat-main {
  min-width: 0;
  min-height: 100%;
}

.chat-header {
  padding-top: 16px;
  border-bottom-color: transparent;
}

.chat-header .eyebrow { display: none; }

.chat-header h1 {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -.025em;
}

.chat-messages {
  scrollbar-color: #555 transparent;
}

.chat-composer-wrap {
  width: 100%;
}

.chat-composer {
  border: 1px solid #484848;
  border-radius: 24px;
  background: #303030;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease;
}

.chat-composer:focus-within {
  border-color: #666;
  background: #323232;
  box-shadow: 0 0 0 1px rgba(255,255,255,.025);
}

.chat-composer textarea {
  color: var(--text);
  line-height: 1.6;
}

.chat-composer textarea::placeholder {
  color: #a0a0a0;
}

.composer-plus,
.composer-mic {
  border-radius: 50%;
}

.primary {
  background: #f5f5f5;
  color: #202020;
  border: 0;
  border-radius: 50%;
}

.primary:hover {
  background: #dedede;
  filter: none;
}

.composer-note {
  color: #909090;
  font-size: 11px;
}

.chat-empty-icon {
  color: var(--accent);
}

.suggestions button {
  border-color: var(--border);
  border-radius: 13px;
  background: #292929;
  color: var(--text-soft);
}

.suggestions button:hover {
  background: #353535;
  border-color: var(--border-strong);
}

.feature-workspace {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(24px,4vw,48px);
}

.feature-page-header {
  border-bottom-color: var(--border);
}

.feature-page-header .eyebrow { color: var(--accent); }

.feature-page-header h1 {
  font-weight: 600;
  letter-spacing: -.04em;
}

.feature-page-header p {
  color: var(--muted);
}

.feature-page-content { gap: 14px; }

.feature-card {
  border-color: var(--border);
  border-radius: 15px;
  background: #292929;
  box-shadow: none;
  transition: background .18s ease, border-color .18s ease;
}

.feature-card:hover {
  background: #303030;
  border-color: var(--border-strong);
}

.feature-card-icon {
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-status {
  border-color: var(--border);
  background: var(--accent-soft);
  color: var(--accent);
}

.image-studio-panel {
  border-color: var(--border);
  border-radius: 18px;
  background: #292929;
  box-shadow: none;
}

.image-studio-form textarea,
.image-result-card {
  border-color: var(--border);
  border-radius: 12px;
  background: #212121;
}

.image-studio-form textarea:focus {
  outline-color: var(--accent-strong);
}

.image-studio-submit {
  border-radius: 12px;
  background: #e7e3fc;
  color: #232033;
}

.image-result-card img { background: #1c1c1c; }

.image-result-download { color: var(--accent); }

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .topbar {
    height: 54px;
    padding: 0 13px;
  }

  .layout {
    grid-template-columns: minmax(0,1fr);
    min-height: calc(100dvh - 54px);
  }

  .sidebar {
    min-height: 0;
    padding: 8px 10px;
    background: #171717;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav {
    gap: 4px;
    margin-top: 8px;
    padding-bottom: 3px;
  }

  .nav-item {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
  }

  .content {
    height: calc(100dvh - 140px);
    min-height: 400px;
  }

  .chat-header { padding: 12px 14px; }

  .feature-workspace { padding: 22px 14px; }

  .feature-page-content { grid-template-columns: 1fr; }

  .image-studio-panel { padding: 16px; }
}

@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .nav-item { gap: 5px; padding: 7px 8px; font-size: 11px; }
}


/* ===== UMAIRA AURORA: FINAL VISUAL LAYER ===== */

:root {
  --aurora: #9886f2;
  --aurora-bright: #ccc3f9;
  --aurora-deep: #3f21d5;
  --aurora-glow: rgba(77,45,233,.28);
}

.app-shell {
  background:
    radial-gradient(ellipse at 66% 38%, rgba(49,38,103,.105), transparent 44%),
    radial-gradient(ellipse at 95% 100%, rgba(49,38,103,.07), transparent 38%),
    #202024;
}

.topbar {
  position: relative;
  background: rgba(19,18,25,.96);
  border-bottom: 1px solid rgba(143,124,241,.14);
}

.brand-mark {
  filter: drop-shadow(0 0 9px rgba(99,72,236,.35));
}

.brand b {
  color: var(--aurora-bright);
  text-shadow: 0 0 15px rgba(104,78,236,.32);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(28,26,41,.52), transparent 40%),
    #161d1c;
  border-right: 1px solid rgba(129,107,240,.16);
  box-shadow: 8px 0 35px rgba(0, 0, 0, .08);
}

.new-chat-btn {
  position: relative;
  overflow: hidden;
  border-color: rgba(152,134,242,.34);
  background: linear-gradient(115deg, rgba(63,33,213,.18), rgba(63,33,213,.035));
  box-shadow: inset 0 0 18px rgba(77,45,233,.035);
}

.new-chat-btn:hover {
  border-color: rgba(174,160,245,.72);
  background: rgba(63,33,213,.18);
  box-shadow: 0 0 20px rgba(63,33,213,.12);
}

.nav-item {
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nav-item.active {
  position: relative;
  background: linear-gradient(100deg, rgba(65,34,220,.24), rgba(65,34,220,.07));
  border-color: rgba(143,124,241,.2);
  box-shadow: inset 2px 0 0 #9886f2, 0 0 22px rgba(64,42,171,.075);
}

.nav-item.active .nav-icon {
  color: #ccc3f9;
  filter: drop-shadow(0 0 6px rgba(152,134,242,.7));
}

.nav-item:hover {
  background: rgba(77,45,233,.105);
}

.nav-icon {
  transition: filter .2s ease, color .2s ease;
}

.chat-header h1 {
  color: #f9f7ff;
  text-shadow: 0 0 22px rgba(118,94,238,.08);
}

.chat-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border: 1px solid rgba(154,137,242,.28);
  border-radius: 18px;
  color: #d8d1fa;
  background: linear-gradient(145deg, rgba(77,45,233,.24), rgba(53,44,97,.12));
  box-shadow:
    0 0 18px rgba(77,45,233,.15),
    0 0 48px rgba(77,45,233,.08),
    inset 0 0 18px rgba(188,176,247,.06);
}

.chat-empty h2 {
  color: #f9f8ff;
  letter-spacing: -.035em;
}

.chat-empty p {
  color: #a5b6b5;
}

.chat-composer {
  border-color: rgba(131,111,228,.28);
  background: rgba(36,47,46,.96);
  box-shadow:
    0 0 0 1px rgba(79,48,234,.035),
    0 8px 35px rgba(0, 0, 0, .18);
}

.chat-composer:focus-within {
  border-color: rgba(158,141,243,.8);
  background: #25302f;
  box-shadow:
    0 0 0 3px rgba(77,45,233,.09),
    0 0 24px rgba(77,45,233,.12);
}

.composer-plus:hover,
.composer-mic:hover {
  border-color: rgba(158,141,243,.5);
  background: rgba(77,45,233,.16);
}

.primary {
  background: linear-gradient(145deg, #d6cffa, #7d67ef 58%, #4c2fdc);
  color: #181525;
  box-shadow:
    0 0 12px rgba(102,75,236,.32),
    0 0 28px rgba(63,33,213,.17);
  transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
}

.primary:hover {
  background: linear-gradient(145deg, #e5e0fc, #9f8ff3 58%, #7259ee);
  box-shadow:
    0 0 16px rgba(137,117,240,.52),
    0 0 34px rgba(63,33,213,.24);
  transform: translateY(-1px);
}

.primary:active { transform: scale(.96); }

.suggestions button {
  border-color: rgba(139,122,223,.17);
  background: rgba(36,48,47,.75);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.suggestions button:hover {
  border-color: rgba(158,141,243,.48);
  background: rgba(73,63,126,.17);
  box-shadow: 0 0 18px rgba(63,33,213,.08);
}

.feature-page-header {
  border-bottom-color: rgba(139,122,223,.16);
}

.feature-page-header .eyebrow {
  color: #aea0f5;
  text-shadow: 0 0 14px rgba(106,80,236,.22);
}

.feature-card {
  background: linear-gradient(145deg, rgba(44,42,57,.92), rgba(33,41,40,.97));
  border-color: rgba(139,122,223,.15);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(158,141,243,.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14), 0 0 22px rgba(63,33,213,.07);
}

.feature-card-icon {
  border: 1px solid rgba(158,141,243,.16);
  box-shadow: inset 0 0 15px rgba(77,45,233,.07);
}

.image-studio-panel {
  background: linear-gradient(145deg, #2d2a3a, #232c2b 75%);
  border-color: rgba(139,122,223,.23);
}

.image-studio-form textarea:focus {
  border-color: rgba(158,141,243,.72);
  box-shadow: 0 0 0 3px rgba(77,45,233,.09);
}

.image-studio-submit {
  background: linear-gradient(120deg, #d6cffa, #9886f2 58%, #7259ee);
  box-shadow: 0 0 18px rgba(77,45,233,.17);
}

.image-studio-submit:hover {
  box-shadow: 0 0 24px rgba(77,45,233,.3);
}

.image-result-card {
  border-color: rgba(139,122,223,.2);
}

.composer-menu {
  border: 1px solid rgba(139,122,223,.22);
  background: #242e2d;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .32), 0 0 24px rgba(63,33,213,.08);
}

.composer-menu-item:hover {
  background: rgba(77,45,233,.12);
}

@media (max-width: 760px) {
  .topbar {
    background: rgba(19,18,25,.98);
  }

  .sidebar {
    background: #171f1e;
    border-bottom-color: rgba(139,122,223,.18);
  }

  .nav-item.active {
    box-shadow: inset 0 -2px 0 #9886f2, 0 0 16px rgba(64,42,171,.07);
  }

  .chat-composer {
    border-radius: 22px;
  }

  .feature-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .nav-item,
  .primary,
  .suggestions button {
    transition: none;
  }
}

/* ===== END UMAIRA AURORA ===== */

/* ===== UMAIRA AURORA FINAL UI ===== */

/* 1. Times New Roman untuk seluruh antarmuka */
html,
body,
body *,
button,
input,
textarea,
select,
option {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* 2. Palet kosmik hitam, ungu, dan magenta */
:root {
  --aurora-black: #07060c;
  --aurora-panel: #100f19;
  --aurora-purple: #341bb0;
  --aurora-violet: #7259ee;
  --aurora-lavender: #c6bcf8;
  --aurora-border: rgba(146,127,242,.24);
}

/* 3. Background ambient */
html,
body,
.app-shell,
.content,
.chat-section,
.chat-layout,
.chat-main {
  background-color: var(--aurora-black);
}

body {
  color: #f4f3fd;
  background-image:
    radial-gradient(ellipse at 78% 45%,
      rgba(37,26,94,.30), transparent 46%),
    radial-gradient(ellipse at 45% 0%,
      rgba(29,22,66,.18), transparent 42%);
  background-attachment: fixed;
}

/* Workspace tetap gelap dan elegan */
.feature-workspace {
  background:
    radial-gradient(ellipse at 85% 5%,
      rgba(45,34,98,.17), transparent 42%),
    transparent;
}

/* 4. Sidebar */
.sidebar {
  background:
    radial-gradient(ellipse at 20% 0%,
      rgba(43,32,95,.16), transparent 48%),
    rgba(9,8,15,.98);
  border-right: 1px solid var(--aurora-border);
}

.brand,
.brand * {
  color: #f4f3fd;
}

.brand-mark {
  box-shadow:
    0 0 12px rgba(52,27,176,.48),
    0 0 28px rgba(52,27,176,.18);
}

.new-chat-btn {
  background: linear-gradient(
    110deg,
    rgba(52,27,176,.28),
    rgba(32,26,64,.12)
  );
  border: 1px solid rgba(146,127,242,.35);
  border-radius: 12px;
  color: #fff;
}

.new-chat-btn:hover {
  background: rgba(52,27,176,.28);
  border-color: var(--aurora-lavender);
  box-shadow: 0 0 20px rgba(52,27,176,.20);
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background .2s ease, box-shadow .2s ease;
}

.nav-item.active {
  background: linear-gradient(
    100deg,
    rgba(52,27,176,.30),
    rgba(38,31,77,.12)
  );
  border-color: rgba(146,127,242,.24);
  box-shadow:
    inset 3px 0 0 var(--aurora-violet),
    0 0 20px rgba(52,27,176,.09);
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  color: var(--aurora-lavender);
  filter: drop-shadow(0 0 6px rgba(114,89,238,.7));
}

/* 5. Beranda dan sambutan */
.chat-empty {
  position: relative;
}

.chat-empty-icon {
  color: var(--aurora-lavender);
  background: linear-gradient(
    145deg,
    rgba(52,27,176,.32),
    rgba(23,19,46,.72)
  );
  border: 1px solid rgba(198,188,248,.42);
  border-radius: 20px;
  box-shadow:
    0 0 16px rgba(52,27,176,.38),
    0 0 42px rgba(52,27,176,.17),
    inset 0 0 18px rgba(198,188,248,.10);
}

.chat-empty h1,
.chat-empty h2,
.chat-empty h3 {
  color: #fff;
  text-shadow: 0 0 24px rgba(114,89,238,.15);
}

.chat-empty p {
  color: #b3afc6;
}

/* 6. Prompt suggestion cards */
.suggestions button {
  color: #f1effd;
  background: linear-gradient(
    145deg,
    rgba(26,23,42,.88),
    rgba(14,13,22,.94)
  );
  border: 1px solid rgba(146,127,242,.23);
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease,
              transform .2s ease;
}

.suggestions button:hover {
  border-color: rgba(198,188,248,.7);
  box-shadow: 0 0 22px rgba(52,27,176,.18);
  transform: translateY(-2px);
}

/* 7. Chat composer */
.chat-composer {
  background: linear-gradient(
    135deg,
    rgba(24,22,36,.97),
    rgba(14,12,21,.98)
  );
  border: 1px solid rgba(114,89,238,.38);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(52,27,176,.07),
    0 8px 35px rgba(0, 0, 0, .28);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.chat-composer:focus-within {
  border-color: var(--aurora-lavender);
  box-shadow:
    0 0 0 3px rgba(52,27,176,.12),
    0 0 30px rgba(52,27,176,.19);
}

.chat-composer textarea {
  color: #fff;
  caret-color: var(--aurora-lavender);
}

.chat-composer textarea::placeholder {
  color: #a19db6;
}

.composer-plus,
.composer-mic {
  transition: background .2s ease, box-shadow .2s ease;
}

.composer-plus:hover,
.composer-mic:hover {
  background: rgba(52,27,176,.22);
  box-shadow: 0 0 15px rgba(52,27,176,.18);
}

/* Tombol utama bercahaya ungu */
.primary,
.image-studio-submit {
  color: #fff;
  background: linear-gradient(
    135deg,
    #8873f0,
    #341bb0 62%,
    #291c69
  );
  border: 1px solid rgba(208,200,249,.36);
  box-shadow:
    0 0 12px rgba(52,27,176,.35),
    0 0 26px rgba(52,27,176,.16);
  transition: box-shadow .2s ease, filter .2s ease;
}

.primary:hover,
.image-studio-submit:hover {
  filter: brightness(1.12);
  box-shadow:
    0 0 17px rgba(114,89,238,.52),
    0 0 34px rgba(52,27,176,.25);
}

/* 8. Semua halaman workspace */
.feature-page-header {
  border-bottom-color: var(--aurora-border);
}

.feature-page-header h1 {
  color: #fff;
  text-shadow: 0 0 20px rgba(52,27,176,.12);
}

.feature-page-header .eyebrow {
  color: var(--aurora-lavender);
}

.feature-page-header p {
  color: #b3afc6;
}

.feature-card,
.image-studio-panel,
.image-result-card,
.side-card {
  background: linear-gradient(
    145deg,
    rgba(26,23,40,.94),
    rgba(14,12,21,.97)
  );
  border-color: rgba(146,127,242,.22);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.feature-card:hover {
  border-color: rgba(198,188,248,.62);
  box-shadow: 0 0 24px rgba(52,27,176,.13);
}

.feature-card-icon {
  background: rgba(52,27,176,.18);
  color: var(--aurora-lavender);
  box-shadow: inset 0 0 16px rgba(52,27,176,.10);
}

.image-studio-form textarea,
input,
select {
  background-color: #12111a;
  color: #fff;
  border-color: rgba(146,127,242,.28);
}

.composer-menu {
  background: #12111a;
  border-color: var(--aurora-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .4),
              0 0 20px rgba(52,27,176,.12);
}

.composer-menu-item:hover {
  background: rgba(52,27,176,.18);
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--aurora-violet);
  outline-offset: 3px;
}

/* 9. Mobile */
@media (max-width: 760px) {
  body {
    background-attachment: scroll;
    background-image:
      radial-gradient(ellipse at 80% 35%,
        rgba(37,26,94,.23), transparent 55%),
      linear-gradient(#07060c, #0a0812);
  }

  .sidebar {
    background: rgba(9,8,15,.98);
  }

  .chat-composer {
    border-radius: 20px;
  }

  .feature-card:hover,
  .suggestions button:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ===== END UMAIRA AURORA FINAL UI ===== */

/* ===== UMAIRA TYPOGRAPHY REFINEMENT ===== */

/* Font lebih ringan dan ukuran lebih terkendali */
html,
body,
body *,
button,
input,
textarea,
select,
option {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* Navigasi dan sidebar */
.brand,
.brand *,
.nav-item,
.new-chat-btn,
.nav-group-label,
.sidebar-section,
.chat-history-list {
  font-size: 13px !important;
}

.brand,
.brand strong,
.brand b,
.nav-item.active {
  font-weight: 400 !important;
}

/* Judul halaman */
.chat-header h1 {
  font-size: 17px !important;
  font-weight: 400 !important;
}

.feature-page-header h1 {
  font-size: clamp(23px, 3vw, 30px) !important;
  font-weight: 400 !important;
  line-height: 1.25;
}

.feature-page-header p {
  font-size: 14px !important;
  line-height: 1.55;
}

.feature-page-header .eyebrow {
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: .08em !important;
}

/* Sambutan beranda */
.chat-empty h1 {
  font-size: clamp(23px, 4vw, 30px) !important;
  font-weight: 400 !important;
  line-height: 1.3;
}

.chat-empty h2 {
  font-size: 21px !important;
  font-weight: 400 !important;
}

.chat-empty h3 {
  font-size: 17px !important;
  font-weight: 400 !important;
}

.chat-empty p {
  font-size: 13px !important;
  line-height: 1.6;
}

/* Pesan dan kolom input */
.chat-messages {
  font-size: 15px;
  line-height: 1.7;
}

.chat-composer textarea {
  font-size: 15px !important;
  line-height: 1.55;
}

.composer-note {
  font-size: 11px !important;
}

/* Kartu, tombol, dan halaman Images */
.feature-card {
  font-size: 14px;
}

.feature-card h2,
.feature-card h3,
.feature-card strong,
.feature-card b {
  font-size: 15px !important;
  font-weight: 400 !important;
}

.feature-card p {
  font-size: 13px !important;
  line-height: 1.55;
}

button,
input,
select,
.image-studio-form textarea {
  font-size: 13px;
}

.image-studio-submit {
  font-weight: 400 !important;
}

/* Mobile: sedikit lebih ringkas */
@media (max-width: 760px) {
  .nav-item,
  .new-chat-btn {
    font-size: 12px !important;
  }

  .chat-empty h1 {
    font-size: 24px !important;
  }

  .chat-empty h2 {
    font-size: 19px !important;
  }

  .chat-composer textarea,
  .chat-messages {
    font-size: 14px !important;
  }

  .feature-page-header h1 {
    font-size: 25px !important;
  }
}

/* ===== END TYPOGRAPHY REFINEMENT ===== */







/* ===== UMAIRA SIDEBAR CONTROLS ===== */
.topbar { justify-content: flex-start !important; gap: 10px; }
.top-actions { margin-left: auto; }

.sidebar-toggle {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(146,127,242,.24);
  border-radius: 10px;
  background: transparent;
  color: #e2ddfb;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { background: rgba(85,55,234,.17); }

.sidebar-backdrop { display: none; }

@media (min-width: 761px) {
  body.sidebar-collapsed .layout { grid-template-columns: minmax(0,1fr) !important; }
  body.sidebar-collapsed .sidebar { display: none !important; }
}

.chat-search {
  width: 100%; box-sizing: border-box;
  min-height: 38px; margin: 0 0 8px; padding: 8px 11px;
  border: 1px solid rgba(146,127,242,.22);
  border-radius: 10px;
  background: rgba(66,43,177,.07);
  color: #eeebfd; font-size: 13px;
}
.chat-search::placeholder { color: #8f88b3; }
.chat-search:focus { outline: 2px solid #7259ee; outline-offset: 1px; }

.chat-history-list {
  max-height: calc(100vh - 470px) !important;
  min-height: 140px;
}
.chat-history-group {
  margin: 10px 4px 4px;
  color: #8f88b3; font-size: 10px !important;
  letter-spacing: .08em; text-transform: uppercase;
}
.chat-history-row {
  position: relative; display: flex; align-items: center;
  border: 1px solid transparent; border-radius: 10px;
}
.chat-history-row:hover { background: rgba(255,255,255,.04); }
.chat-history-row.active { background: rgba(85,55,234,.14); border-color: rgba(146,127,242,.25); }
.chat-history-item {
  flex: 1; min-width: 0; width: auto;
  display: flex; align-items: center; gap: 8px;
  border: 0 !important; background: transparent !important;
}
.chat-history-content { display: block; min-width: 0; flex: 1; }
.chat-history-meta { display: block; color: #8a84a8; font-size: 10px; margin-top: 2px; }

.chat-history-menu-btn {
  flex: 0 0 32px; width: 32px; height: 34px; margin-right: 3px;
  border: 0; border-radius: 9px; background: transparent;
  color: #bcb4e0; font: bold 20px/1 Arial, sans-serif;
  cursor: pointer; opacity: .55; touch-action: manipulation;
}
.chat-history-row:hover .chat-history-menu-btn,
.chat-history-row.active .chat-history-menu-btn,
.chat-history-menu-btn:focus-visible { opacity: 1; background: rgba(85,55,234,.17); }

.chat-history-menu {
  position: fixed; z-index: 300;
  width: min(230px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid rgba(153,135,242,.25);
  border-radius: 14px;
  background: #13111c;
  box-shadow: 0 12px 35px rgba(0,0,0,.5);
}
.chat-history-menu[hidden] { display: none !important; }
.chat-history-menu button {
  display: block; width: 100%; min-height: 40px; padding: 9px 12px;
  border: 0; border-radius: 9px; background: transparent;
  color: #ebe8f9; text-align: left; font-size: 13px; cursor: pointer;
}
.chat-history-menu button:hover, .chat-history-menu button:focus-visible { background: rgba(84,54,234,.17); }
.chat-history-menu button.danger { color: #ff9aaf; }
.chat-history-menu button.danger:hover { background: rgba(255,75,115,.12); }

.chat-archive-toggle {
  width: 100%; min-height: 36px; margin-bottom: 6px; padding: 7px 10px;
  border: 1px solid rgba(125,103,239,.2); border-radius: 10px;
  background: rgba(66,43,177,.08); color: #cfc8f5;
  font-size: 12px; text-align: left; cursor: pointer;
}

@media (max-width: 760px) {
  .layout { display: block !important; }

  .sidebar {
    position: fixed !important;
    top: var(--umaira-top, 56px); bottom: 0; left: -340px;
    width: min(300px, 86vw); height: auto;
    z-index: 60;
    display: flex !important; flex-direction: column; justify-content: flex-start;
    padding: 12px !important;
    overflow-y: auto;
    border-right: 1px solid rgba(146,127,242,.24) !important;
    border-bottom: 0 !important;
    transition: left .22s ease;
  }
  body.sidebar-open .sidebar { left: 0; }

  .sidebar-section, .sidebar-bottom { display: block !important; }
  .primary-nav { display: block !important; overflow: visible !important; }
  .nav-group-label { display: block !important; }
  .nav-item { width: 100% !important; }
  .chat-history-list { max-height: none !important; }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed; inset: var(--umaira-top, 56px) 0 0 0;
    z-index: 50; background: rgba(0,0,0,.55);
  }

  .content { height: calc(100dvh - var(--umaira-top, 56px)) !important; min-height: 0 !important; }
  .chat-history-menu button { min-height: 46px; font-size: 14px; }
  body.sidebar-open { overflow: hidden; }
  .chat-composer-wrap { box-sizing: border-box; width: auto !important; max-width: none; }
  .chat-composer {
    box-sizing: border-box; width: auto !important;
    margin-left: 0 !important; margin-right: 0 !important;
    max-width: 100%;
  }
}
/* ===== END UMAIRA SIDEBAR CONTROLS ===== */

/* ===== UMAIRA CHAT POLISH ===== */
.chat-bubble { text-indent: 0 !important; }
.chat-bubble ul, .chat-bubble ol,
.chat-attachments, .chat-attachment-item, .chat-attachment-info,
.chat-bubble h3, .chat-bubble h4, .chat-bubble h5 { white-space: normal; }
.chat-messages { padding-left: 14px; padding-right: 14px; }
.chat-message { margin-bottom: 18px !important; }
.chat-message:last-child { margin-bottom: 6px !important; }
.chat-response-wrapper { min-width: 0; max-width: 100%; }
.chat-message.user .chat-response-wrapper { max-width: 88%; }
.chat-message.assistant .chat-response-wrapper { width: 100%; }
.chat-message.user .chat-bubble {
  width: fit-content; max-width: 100%;
  padding: 10px 14px !important;
  border-radius: 18px 18px 5px 18px !important;
  line-height: 1.5;
}
.chat-message.assistant .chat-bubble { padding: 2px 0 !important; max-width: 100%; line-height: 1.65; }
#chatSendBtn { white-space: nowrap; }
.chat-code-block { white-space: normal; width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.chat-code-block pre { white-space: pre; overflow-x: auto; }
.chat-code-block pre code {
  display: inline; padding: 0 !important; border: 0 !important;
  background: none !important; white-space: pre; font-size: 12.5px;
}
@media (max-width: 760px) {
  .chat-composer-wrap { box-sizing: border-box; width: auto !important; max-width: none; }
  .chat-composer {
    box-sizing: border-box; width: auto !important;
    margin-left: 0 !important; margin-right: 0 !important; max-width: 100%;
  }
}
/* ===== END UMAIRA CHAT POLISH ===== */

/* ===== Umaira studio gambar v2 ===== */
.image-result-save {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(64,33,220,0.6);
  border-radius: 10px;
  background: rgba(55,32,167,0.25);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.image-result-save:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== Umaira pustaka gambar ===== */
.library-panel {
  width: 100%;
}
.library-status {
  opacity: 0.8;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.library-card img {
  display: block;
  width: 100%;
  height: auto;
}
.library-meta {
  margin: 0;
  font-size: 0.85em;
  opacity: 0.7;
}
.library-delete {
  margin-left: 12px;
}

/* UMAIRA: static center logo, without the animated robot */
.umaira-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  margin: 0 auto 18px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  animation: none;
  overflow: visible;
}

.umaira-orb img {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(55,32,167,.35));
  animation: none;
}

/* UMAIRA PROJECTS WORKSPACE V1 */
.projects-panel,.project-detail{display:grid;gap:16px;width:100%;min-width:0}
.projects-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.projects-intro{flex:1;min-width:180px}
.projects-intro h2,.project-card h3,.project-empty h3{margin:0 0 7px}
.projects-intro p,.project-card p,.project-empty p{margin:0;color:var(--muted,#a1a1aa);line-height:1.6;overflow-wrap:anywhere}
.projects-button{border:1px solid var(--border,#364141);border-radius:11px;padding:10px 14px;color:var(--text,#f4f4f5);background:var(--surface,#202727);cursor:pointer;font:inherit;font-size:13px}
.projects-secondary{background:transparent}
.projects-danger{color:#ff8e8e;border-color:#733b42;background:transparent}
.projects-form{display:grid;gap:16px;width:100%;max-width:720px;padding:18px;border:1px solid var(--border,#364141);border-radius:16px;background:var(--surface,#202727)}
.project-field{display:grid;gap:8px;min-width:0}
.project-field span{font-size:13px;font-weight:600}
.project-field input,.project-field textarea{box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid var(--border,#364141);border-radius:10px;color:var(--text,#f4f4f5);background:var(--background,#151b1b);font:inherit;font-size:14px}
.project-field textarea{resize:vertical;line-height:1.6}
.projects-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:14px}
.project-card{display:flex;flex-direction:column;justify-content:space-between;gap:16px;min-width:0;padding:16px;border:1px solid var(--border,#364141);border-radius:15px;background:var(--surface,#202727)}
.project-card-content{min-width:0}
.project-card h3{overflow-wrap:anywhere}
.project-card-actions{display:flex;flex-wrap:wrap;gap:8px}
.project-empty{padding:24px 16px;border:1px dashed var(--border,#364141);border-radius:15px;text-align:center}
.project-status{margin:0;color:var(--muted,#a1a1aa);font-size:13px}
@media(max-width:480px){.projects-toolbar{flex-direction:column}.projects-toolbar>.projects-button{width:100%}.projects-form{padding:13px}.project-card-actions .projects-button{flex:1 1 auto}}


/* UMAIRA CHAT PROJECT CONTEXT */
.chat-project-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 9px 12px;
  border: 1px solid var(--border-color, #444);
  border-radius: 12px;
  font-size: 13px;
}
.chat-project-indicator[hidden] {
  display: none !important;
}
.chat-project-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chat-project-detach {
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}


/* UMAIRA — project selection toast */
.umaira-toast {
  position: fixed;
  z-index: 99999;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid rgba(111, 190, 157, 0.28);
  border-radius: 15px;
  background: rgba(25, 32, 31, 0.97);
  color: #f1f5f3;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.umaira-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.umaira-toast-icon {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(91, 190, 145, 0.15);
  color: #83d7ae;
  font-size: 15px;
  font-weight: 700;
}
.umaira-toast-message {
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  .umaira-toast {
    transition: none;
  }
}


/* UMAIRA — project delete confirmation */
.umaira-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-sizing: border-box;
  background: rgba(8,7,11, .66);
  backdrop-filter: blur(5px);
}
.umaira-confirm-dialog {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--border-color, rgba(255,255,255,.12));
  border-radius: 22px;
  background: var(--panel-bg, #171b1a);
  color: var(--text-color, #f4f6f5);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  animation: umairaConfirmIn .18s ease-out;
}
.umaira-confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(224, 93, 93, .13);
  color: #ff9292;
  font-size: 22px;
  font-weight: 700;
}
.umaira-confirm-dialog h3 {
  margin: 18px 0 8px;
  font-size: 19px;
  font-weight: 650;
}
.umaira-confirm-dialog p {
  margin: 0;
  color: var(--muted-color, #a9b2ae);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.umaira-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.umaira-confirm-actions button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.umaira-confirm-cancel {
  border: 1px solid var(--border-color, rgba(255,255,255,.15));
  background: transparent;
  color: inherit;
}
.umaira-confirm-delete {
  border: 1px solid transparent;
  background: #bd4545;
  color: white;
}
.umaira-confirm-delete:active,
.umaira-confirm-cancel:active {
  transform: scale(.98);
}
@keyframes umairaConfirmIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .umaira-confirm-dialog { animation: none; }
}


/* UMAIRA — polished active project indicator */
#chatProjectIndicator.chat-project-indicator:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(98, 214, 160, .22);
  border-radius: 15px;
  background: rgba(45, 120, 86, .09);
}
#chatProjectIndicator .chat-project-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(98, 214, 160, .12);
  color: #62D6A0;
}
#chatProjectIndicator .chat-project-details {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
#chatProjectIndicator .chat-project-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-color, inherit);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#chatProjectIndicator .chat-project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #62D6A0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  padding: 3px 8px;
  border: 1px solid rgba(98, 214, 160, .2);
  border-radius: 999px;
  background: rgba(98, 214, 160, .1);
}
#chatProjectIndicator .chat-project-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62D6A0;
  box-shadow: 0 0 7px rgba(98, 214, 160, .35);
}
#chatProjectIndicator .chat-project-detach {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border-color, rgba(255,255,255,.15));
  border-radius: 10px;
  background: transparent;
  color: var(--muted-color, #a9b2ae);
  font-size: 12px;
  cursor: pointer;
}
#chatProjectIndicator .chat-project-detach:active {
  transform: scale(.97);
}


/* UMAIRA — polished active project indicator */
#chatProjectIndicator.chat-project-indicator:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(98, 214, 160, .22);
  border-radius: 15px;
  background: rgba(45, 120, 86, .09);
}
#chatProjectIndicator .chat-project-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(98, 214, 160, .12);
  color: #62D6A0;
}
#chatProjectIndicator .chat-project-details {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
#chatProjectIndicator .chat-project-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-color, inherit);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#chatProjectIndicator .chat-project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #62D6A0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  padding: 3px 8px;
  border: 1px solid rgba(98, 214, 160, .2);
  border-radius: 999px;
  background: rgba(98, 214, 160, .1);
}
#chatProjectIndicator .chat-project-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62D6A0;
  box-shadow: 0 0 7px rgba(98, 214, 160, .35);
}
#chatProjectIndicator .chat-project-detach {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border-color, rgba(255,255,255,.15));
  border-radius: 10px;
  background: transparent;
  color: var(--muted-color, #a9b2ae);
  font-size: 12px;
  cursor: pointer;
}
#chatProjectIndicator .chat-project-detach:active {
  transform: scale(.97);
}

/* UMAIRA — clean action chips without emoji */
.umaira-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.umaira-chip-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* UMAIRA NO ATTACHMENT ANIMATION */
.composer-menu {
  animation: none !important;
}
.composer-menu-item,
.composer-menu-item:active,
.composer-menu-item:hover {
  animation: none !important;
  transition: none !important;
}
.composer-menu-item:active {
  transform: none !important;
  opacity: 1 !important;
}
.composer-menu-icon {
  display: grid;
  place-items: center;
}
.composer-menu-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: none) and (pointer: coarse) {
  .composer-menu-item:active {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* UMAIRA FINAL FIX — no press animation on attachment menu */
#composerMenu,
#composerMenu *,
#composerMenu .composer-menu-item,
#composerMenu .composer-menu-item:hover,
#composerMenu .composer-menu-item:focus,
#composerMenu .composer-menu-item:focus-visible,
#composerMenu .composer-menu-item:active,
#composerMenu .composer-menu-icon {
  animation: none !important;
  transition: none !important;
}

#composerMenu .composer-menu-item,
#composerMenu .composer-menu-item:hover,
#composerMenu .composer-menu-item:focus,
#composerMenu .composer-menu-item:focus-visible,
#composerMenu .composer-menu-item:active {
  transform: none !important;
  scale: none !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}

#composerMenu .composer-menu-item:active {
  background: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
}


/* UMAIRA — menu lampiran tampil langsung tanpa animasi */
#composerMenu {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* UMAIRA FIX — tombol plus tetap lurus */
.composer-plus,
.composer-plus:hover,
.composer-plus:focus,
.composer-plus:focus-visible,
.composer-plus:active,
.composer-plus.is-open {
  transform: none !important;
  rotate: none !important;
  scale: none !important;
  transition: none !important;
  animation: none !important;
}

/* =====================================================
   UMAIRA FROSTED GLASS LIGHT THEME
   White glass + lavender accents
   ===================================================== */

:root {
  color-scheme: light;

  --bg: #f6f5fc;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-2: rgba(248,246,255,0.92);
  --text: #2c2a39;
  --muted: #6e8280;
  --muted-2: #8a9e9c;
  --border: rgba(111,98,174,0.18);
  --border-strong: rgba(98,84,168,0.28);
  --shadow: 0 10px 35px rgba(69,62,104,0.09);

  --aurora-lavender: #715dd1;
  --aurora-border: rgba(111,98,174,0.25);
}

/* Base */
html,
body {
  background-color: #f6f5fc !important;
  color: #2c2a39 !important;
}

body {
  background-image:
    radial-gradient(ellipse at 12% 5%,
      rgba(202,192,249,0.34), transparent 42%),
    radial-gradient(ellipse at 90% 28%,
      rgba(218,211,251,0.30), transparent 44%),
    linear-gradient(145deg, #fbfaff, #f3f1fa 55%, #f9f8ff) !important;
  background-attachment: fixed;
}

body,
button,
input,
textarea,
select {
  color: #2c2a39;
}

/* Shared glass surfaces */
.sidebar,
.topbar,
.chat-composer,
.composer-menu,
.feature-workspace,
.feature-page-header,
.umaira-suggest,
.umaira-feature,
.umaira-chip,
.umaira-confirm-dialog,
.umaira-toast,
.image-result-card,
.project-card,
.project-item,
.workspace-card,
.modal,
.dialog,
.dropdown-menu,
.popover,
.settings-panel,
.library-card,
.plugin-card {
  background-color: rgba(255, 255, 255, 0.76);
  border-color: rgba(111,98,174,0.22);
  color: #2c2a39;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

/* Main layout and workspace */
.app-shell,
.main-content,
.main-panel,
.workspace,
.workspace-content,
.chat-layout,
.chat-main,
#featureWorkspace {
  background-color: transparent;
  color: #2c2a39;
}

.sidebar {
  background-color: rgba(255, 255, 255, 0.70);
  border-right: 1px solid rgba(111,98,174,0.20);
  box-shadow: 8px 0 30px rgba(69,62,104,0.035);
}

.topbar {
  background-color: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(111,98,174,0.16);
}

.chat-composer {
  background-color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(111,98,174,0.27);
  box-shadow: 0 8px 28px rgba(69,62,104,0.075);
}

.chat-composer:focus-within {
  background-color: rgba(255, 255, 255, 0.94);
  border-color: rgba(94,74,196,0.68);
  box-shadow: 0 0 0 3px rgba(113,93,209,0.10);
}

/* Chat messages */
.chat-messages,
.chat-empty,
.umaira-empty {
  color: #2c2a39;
}

.chat-bubble {
  color: #343143;
}

.chat-message.user .chat-bubble {
  background: rgba(218,211,251,0.72);
  border: 1px solid rgba(113,93,209,0.22);
  color: #29253d;
}

.chat-message.assistant .chat-bubble {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(111,98,174,0.13);
  color: #2c2a39;
}

/* Sidebar navigation */
.sidebar button,
.sidebar a,
.nav-item,
.nav-link,
.workspace-nav button {
  color: #475e5b;
}

.sidebar button:hover,
.sidebar a:hover,
.nav-item:hover,
.nav-link:hover,
.workspace-nav button:hover {
  background-color: rgba(155,142,224,0.14);
  color: #453b76;
}

.sidebar .active,
.nav-item.active,
.nav-link.active,
.workspace-nav .active {
  background-color: rgba(147,131,224,0.22);
  color: #4a4080;
  border-color: rgba(113,93,209,0.25);
}

/* Attachment menu and icons */
.composer-menu {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(111,98,174,0.24);
  box-shadow: 0 14px 38px rgba(69,62,104,0.13);
}

.composer-menu-item {
  background-color: transparent;
  color: #343143;
}

.composer-menu-item:hover {
  background-color: rgba(155,142,224,0.14);
}

.composer-menu-icon,
.attachment-icon,
.chat-attachment-icon {
  background-color: rgba(155,142,224,0.18);
  color: #554a8e;
}

.composer-menu-icon svg,
.umaira-chip-icon {
  stroke: currentColor;
}

/* Inputs */
input,
textarea,
select,
#chatInput {
  color: #2c2a39;
  caret-color: #4b3b9c;
}

input:not([type="file"]),
textarea,
select {
  background-color: rgba(255, 255, 255, 0.82);
  border-color: rgba(111,98,174,0.25);
}

input::placeholder,
textarea::placeholder,
#chatInput::placeholder {
  color: #8a9e9c;
  opacity: 1;
}

/* Buttons */
.composer-plus,
.composer-mic,
.ghost,
.umaira-chip {
  color: #473f6f;
  border-color: rgba(111,98,174,0.24);
}

.composer-plus,
.composer-plus:hover,
.composer-plus:active,
.composer-plus.is-open {
  transform: none !important;
  rotate: none !important;
  scale: none !important;
}

.composer-plus:hover,
.composer-mic:hover,
.ghost:hover,
.umaira-chip:hover {
  background-color: rgba(155,142,224,0.15);
}

#chatSendBtn,
.primary,
.image-studio-submit {
  background: linear-gradient(135deg, #b4a6f6, #5944c2) !important;
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(81,65,161,0.18);
}

/* Cards, project panels and image workspace */
.umaira-suggest,
.umaira-feature,
.project-card,
.workspace-card,
.library-card,
.plugin-card,
.image-result-card {
  background-color: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(111,98,174,0.20);
  box-shadow: 0 8px 26px rgba(69,62,104,0.045);
}

.umaira-suggest:hover,
.umaira-feature:hover,
.project-card:hover,
.workspace-card:hover,
.library-card:hover,
.plugin-card:hover {
  border-color: rgba(113,93,209,0.42);
  box-shadow: 0 10px 28px rgba(69,62,104,0.09);
}

.umaira-orb {
  background-color: transparent;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
strong,
.feature-page-header h1,
.feature-page-header p {
  color: #2c2a39;
}

p,
small,
.caption,
.muted,
.eyebrow {
  color: #6e8280;
}

/* Dialogs, confirmation windows and popups */
.umaira-confirm-dialog,
.modal,
.dialog,
.dropdown-menu,
.popover,
[role="dialog"] {
  background-color: rgba(255, 255, 255, 0.94);
  border-color: rgba(111,98,174,0.24);
  color: #2c2a39;
  box-shadow: 0 18px 55px rgba(44,39,70,0.15);
}

.umaira-confirm-dialog button,
[role="dialog"] button {
  color: #46425e;
}

/* Code blocks stay readable */
.chat-bubble pre,
.chat-bubble code,
pre,
code {
  border-color: rgba(111,98,174,0.18);
}

.chat-bubble pre,
pre {
  background-color: #efedf6;
  color: #2e2b3e;
}

.chat-bubble pre code,
pre code {
  background-color: transparent;
  color: inherit;
}

/* Attachment preview */
.attachment-chip,
.chat-attachment-item {
  background-color: rgba(255, 255, 255, 0.78);
  border-color: rgba(111,98,174,0.20);
  color: #343143;
}

/* Scrollbars */
* {
  scrollbar-color: rgba(118,105,181,0.42) transparent;
}

/* Mobile glass surfaces */
@media (max-width: 760px) {
  body {
    background-attachment: scroll;
    background-image:
      radial-gradient(ellipse at 85% 5%,
        rgba(202,192,249,0.30), transparent 48%),
      linear-gradient(155deg, #fbfaff, #f3f1fa) !important;
  }

  .sidebar {
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
  }

  .topbar {
    background-color: rgba(255, 255, 255, 0.84);
  }
}

/* Preserve readable colors when reduced transparency is preferred */
@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .topbar,
  .chat-composer,
  .composer-menu,
  .feature-workspace,
  .umaira-suggest,
  .umaira-feature,
  .project-card,
  .workspace-card,
  .modal,
  .dialog {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: #ffffff;
  }
}


/* UMAIRA PASSWORD EYE */
.umaira-account-form .umaira-setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.umaira-password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.umaira-password-wrap input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-right: 48px;
}

.umaira-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 7px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  opacity: 0.78;
}

.umaira-password-toggle:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.12);
}

.umaira-password-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.umaira-password-toggle svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* UMAIRA ACCOUNT HIDDEN FIX */
/* Pastikan atribut hidden tidak dikalahkan aturan display lain. */
.umaira-account-form[hidden] {
  display: none !important;
}

.umaira-account-form:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.umaira-account-form .umaira-password-wrap {
  width: 100%;
  min-width: 0;
}

.umaira-account-form .umaira-password-wrap input {
  width: 100%;
  padding-right: 48px;
  box-sizing: border-box;
}

.umaira-account-form .umaira-password-toggle {
  z-index: 2;
}

/* UMAIRA GOOGLE SIGN-IN */
.umaira-google-login {
  width: 100%;
  max-width: 420px;
  margin: 14px 0 18px;
  padding: 18px;
  box-sizing: border-box;
  border: 1px solid var(--border-color, rgba(128,128,128,.24));
  border-radius: 16px;
  background: var(--surface-color, rgba(128,128,128,.045));
}
.umaira-google-login[hidden] {
  display: none !important;
}
.umaira-google-heading {
  margin: 0 0 14px;
  text-align: center;
  font-weight: 600;
}
.umaira-google-button {
  display: flex;
  justify-content: center;
  min-height: 42px;
  width: 100%;
}
.umaira-google-button[aria-busy="true"] {
  opacity: .65;
  pointer-events: none;
}
.umaira-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted, #777);
  font-size: 12px;
  text-align: center;
}
.umaira-login-divider::before,
.umaira-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color, rgba(128,128,128,.24));
}

/* UMAIRA FIX: logo topbar konsisten putih di desktop dan mobile */
.topbar .brand-mark.umaira-logo {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-filter: none !important;
}

/* ===== UMAIRA LOGO VISIBILITY FIX ===== */
.topbar .brand > img.brand-mark.umaira-logo {
  display: block !important;
  visibility: visible !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* UMAIRA: satu sumber SVG, pertahankan warna gradasi asli */
.topbar .brand-mark.umaira-logo,
.sb-brand .sb-logo,
.umaira-orb img {
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* UMAIRA WORKSPACE: CODEX DAN PLUGIN */
.umaira-codex,
.umaira-plugin-workspace {
  display: grid;
  gap: 16px;
  width: 100%;
}

.umaira-codex-toolbar,
.umaira-codex-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.umaira-workspace-select,
.umaira-code-editor {
  width: 100%;
  color: var(--text, #eee);
  background: var(--surface, rgba(26,24,37,.92));
  border: 1px solid var(--border, rgba(143,135,180,.35));
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

.umaira-workspace-select {
  width: auto;
  min-width: 150px;
}

.umaira-code-editor {
  min-height: 320px;
  resize: vertical;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.umaira-workspace-btn {
  border: 1px solid var(--border, rgba(143,135,180,.35));
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.umaira-workspace-btn.primary {
  color: white;
  background: var(--accent-strong, #51468a);
}

.umaira-workspace-btn.secondary {
  color: var(--text, inherit);
  background: var(--surface, rgba(112,105,146,.12));
}

.umaira-workspace-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.umaira-codex-result {
  margin: 0;
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--border, rgba(143,135,180,.35));
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 monospace;
}

.umaira-codex-note,
.umaira-plugin-note {
  margin: 0;
  opacity: .78;
  font-size: 13px;
  line-height: 1.6;
}

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

.umaira-plugin-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border, rgba(143,135,180,.35));
  border-radius: 16px;
  background: var(--surface, rgba(112,105,146,.10));
}

.umaira-plugin-body {
  min-width: 0;
}

.umaira-plugin-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.umaira-plugin-body p {
  margin: 0 0 12px;
  line-height: 1.55;
  font-size: 13px;
}

.umaira-plugin-status {
  display: inline-block;
  font-size: 12px;
  opacity: .85;
}

.umaira-plugin-status[data-enabled="true"] {
  color: #2eaa78;
}

@media (max-width: 640px) {
  .umaira-plugin-list {
    grid-template-columns: 1fr;
  }

  .umaira-plugin-card {
    flex-direction: column;
  }

  .umaira-codex-actions > button {
    flex: 1 1 auto;
  }

  .umaira-code-editor {
    min-height: 240px;
  }
}


/* UMAIRA ACCOUNT ADMIN DIRECTORY */
.umaira-admin-directory {
  display: grid;
  gap: 18px;
  width: 100%;
  margin-top: 28px;
  padding: clamp(16px, 3vw, 24px);
  color: var(--text, #2c2a39);
  background: var(--panel, rgba(255,255,255,.78));
  border: 1px solid var(--border, rgba(111,98,174,.22));
  border-radius: 20px;
  box-shadow: var(--shadow, 0 10px 35px rgba(69,62,104,.09));
}

.umaira-admin-directory[hidden] {
  display: none !important;
}

.umaira-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.umaira-admin-header h3,
.umaira-admin-list-heading {
  margin: 0;
  color: var(--text, inherit);
}

.umaira-admin-header h3 {
  font-size: 19px;
  letter-spacing: -.025em;
}

.umaira-admin-description {
  margin: 6px 0 0;
  color: var(--muted, #6e8280);
  font-size: 13px;
  line-height: 1.5;
}

.umaira-admin-refresh {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border, rgba(111,98,174,.25));
  border-radius: 11px;
}

.umaira-admin-refresh:disabled {
  cursor: wait;
  opacity: .65;
}

.umaira-admin-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--panel-2, rgba(248,246,255,.92));
  border: 1px solid var(--border, rgba(111,98,174,.18));
  border-radius: 15px;
}

.umaira-admin-stats span {
  color: var(--muted, #6e8280);
  font-size: 13px;
}

.umaira-admin-stats strong {
  color: var(--text, inherit);
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.umaira-admin-list-heading {
  font-size: 15px;
}

.umaira-admin-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.umaira-admin-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--bg-soft, rgba(128,128,128,.045));
  border: 1px solid var(--border, rgba(111,98,174,.18));
  border-radius: 13px;
}

.umaira-admin-user-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.umaira-admin-user-name {
  color: var(--text, inherit);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.umaira-admin-user-email {
  color: var(--muted, #6e8280);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.umaira-admin-login-method {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 5px 9px;
  color: var(--text, inherit);
  background: var(--accent-soft, rgba(71,41,221,.12));
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
  overflow-wrap: anywhere;
}

.umaira-admin-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted, #6e8280);
  border: 1px dashed var(--border, rgba(111,98,174,.25));
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .umaira-admin-directory {
    padding: 15px;
    border-radius: 16px;
  }

  .umaira-admin-header {
    align-items: flex-start;
  }

  .umaira-admin-user {
    align-items: flex-start;
    flex-direction: column;
  }

  .umaira-admin-login-method {
    max-width: 100%;
  }
}
