:root {
  color-scheme: light;
  --md-sys-color-primary: #00a8d5;
  --md-sys-color-primary-container: #d6f3fa;
  --md-sys-color-primary-strong: #008ab2;
  --md-sys-color-accent: #ffc846;
  --md-sys-color-surface: #f8fafd;
  --md-sys-color-surface-1: #ffffff;
  --md-sys-color-surface-2: #eef3fb;
  --md-sys-color-outline: #d5d9e3;
  --md-sys-color-muted: #939598;
  --md-sys-color-text: #282829;
  --md-sys-color-on-primary: #ffffff;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-1: 0 2px 6px rgba(17, 24, 39, 0.12);
  --shadow-2: 0 6px 16px rgba(17, 24, 39, 0.12);
  --shadow-3: 0 12px 28px rgba(17, 24, 39, 0.16);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-large: var(--radius-lg);
  --radius-medium: var(--radius-md);
  --radius-small: var(--radius-sm);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", "Google Sans", "Inter", "Manrope", "Google Sans Text",
    "Arial", system-ui, sans-serif;
  font-size: 16px;
  line-height: calc(1em + 5pt);
  letter-spacing: 0;
  background: var(--md-sys-color-surface);
  color: rgba(0, 0, 0, 0.95);
  text-align: left;
  font-weight: 400;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  line-height: calc(1em + 5pt);
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  text-transform: uppercase;
}

h3 {
  font-size: 18px;
  text-transform: uppercase;
}

h1 {
  text-transform: uppercase;
}

h4,
h5,
h6 {
  text-transform: none;
  font-weight: 600;
}

h4 {
  font-size: 20px;
}

h5 {
  font-size: 18px;
}

h6 {
  font-size: 18px;
}

p {
  margin: 0 0 12px;
  line-height: calc(1em + 5pt);
  letter-spacing: 0;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.95);
}

label,
input,
textarea,
select,
th,
td {
  letter-spacing: 0;
  text-align: left;
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--md-sys-color-muted);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  background: #f1f7fb;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--shadow-1);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-logo {
  height: 28px;
}

.topbar-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rail-toggle {
  display: inline-flex;
}

.rail-toggle-mobile {
  display: none;
}

.rail-scrim {
  display: none;
}

.icon-button {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--md-sys-color-muted);
  border-radius: var(--radius-pill);
  padding: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
  background: var(--md-sys-color-primary-container);
  transform: translateY(-1px);
}


.pill-button {
  border: 1px solid var(--md-sys-color-primary);
  border-radius: var(--radius-pill);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pill-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.pill-button:disabled,
.pill-button.disabled {
  background: var(--md-sys-color-outline);
  border-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.text-button {
  background: transparent;
  border: none;
  color: var(--md-sys-color-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: -8px;
  top: 28px;
  min-width: 160px;
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-md);
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--shadow-2);
  padding: var(--space-2);
  z-index: 1000;
}

.dropdown.open .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: var(--space-2);
  text-decoration: none;
  color: rgba(0, 0, 0, 0.8);
  font-family: "Roboto", "Google Sans", "Inter", "Manrope", "Google Sans Text",
    "Arial", system-ui, sans-serif;
  font-weight: 500;
}

.dropdown-content a:hover {
  background: var(--md-sys-color-primary-container);
  border-radius: var(--radius-md);
}

.global-menu {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: flex-end;
}

.global-menu-title {
  max-width: 260px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-menu-title:empty {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: var(--space-4);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 168, 213, 0.2);
  box-shadow: var(--shadow-3);
  padding: var(--space-5);
  width: min(420px, 92vw);
}

.modal-title {
  margin: 0 0 6px;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
}

.modal-body {
  color: rgba(0, 0, 0, 0.9);
  font-size: 0.95rem;
}

.modal-body input[type="text"] {
  width: 100%;
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--md-sys-color-outline);
  padding: 10px 12px;
  background: var(--md-sys-color-surface-2);
  font-family: "Roboto", "Google Sans", "Inter", "Manrope", "Google Sans Text",
    "Arial", system-ui, sans-serif;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: 100vh;
}

.left-rail {
  background: #e9f4f8;
  border-radius: 0;
  padding: var(--space-4);
  border: none;
  box-shadow: none;
  min-height: 100vh;
  transition: width 0.2s ease, padding 0.2s ease;
}

.left-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.left-rail-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: var(--space-3);
}

#new-chat {
  font-family: "Roboto", "Google Sans", "Inter", "Manrope", "Google Sans Text",
    system-ui, sans-serif;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.new-chat-icon {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.new-chat-label {
  margin-left: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.left-rail-title {
  font-weight: 600;
}

.chat-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: #f2f9fb;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  border: 1px solid var(--md-sys-color-outline);
  margin-bottom: var(--space-3);
}

.chat-search:focus-within {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(0, 168, 213, 0.15);
}

.chat-search input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
}

.search-icon {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  color: var(--md-sys-color-muted);
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chat-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chat-item {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--md-sys-color-surface-2);
  cursor: pointer;
  border: none;
  box-shadow: none;
  position: relative;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chat-item:hover {
  box-shadow: none;
}

.chat-item-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-pin-indicator {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  font-size: 16px;
  color: var(--md-sys-color-primary);
}

.chat-item-menu {
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.chat-item:hover .chat-item-menu,
.chat-item-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-menu-button {
  font-size: 18px;
}

.chat-item-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 24px;
  min-width: 140px;
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-md);
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--shadow-2);
  padding: var(--space-2);
  z-index: 1000;
}

.chat-item-menu.open .chat-item-dropdown {
  display: block;
}

.chat-item-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: rgba(0, 0, 0, 0.8);
  font-size: 0.9rem;
  font-family: "Roboto", "Google Sans", "Inter", "Manrope", "Google Sans Text",
    "Arial", system-ui, sans-serif;
  font-weight: 500;
}

.chat-item-dropdown button:hover {
  background: var(--md-sys-color-primary-container);
  border-radius: var(--radius-md);
}

.chat-item-dropdown button.danger {
  color: #b3261e;
}

.chat-item-dropdown button.danger:hover {
  background: rgba(179, 38, 30, 0.12);
}

.global-menu-dropdown .dropdown-content {
  right: 0;
}
.chat-item.active {
  border-color: transparent;
  box-shadow: none;
  background: var(--md-sys-color-primary-container);
}


.chat-empty {
  color: var(--md-sys-color-muted);
  padding: var(--space-3);
}

.chat-panel {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: #ffffff;
  padding: var(--space-5);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  background: transparent;
  border: none;
  box-shadow: none;
}

.chat-title {
  font-weight: 600;
  font-size: 2.1rem;
  color: rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  position: relative;
}

.impact-ribbon {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.impact-ribbon::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 1px;
  height: 0.4em;
  background: var(--md-sys-color-accent);
  z-index: -1;
  border-radius: 0;
  clip-path: polygon(0 0, 98% 0, 100% 100%, 2% 100%);
}

.prompt-card {
  background: #ffffff;
  border-radius: 38px;
  padding: var(--space-3);
  border: 1px solid #e2e7f1;
  box-shadow: var(--shadow-1);
  max-width: 760px;
  width: 100%;
  margin: 12px auto 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .global-menu {
    z-index: 500 !important;
  }

  body.rail-open .global-menu {
    z-index: 500 !important;
    display: none;
  }

  .page {
    padding: 0;
    gap: 0;
    min-height: 100dvh;
  }

  .topbar-title {
    font-size: 0.95rem;
  }

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

  .rail-toggle {
    display: inline-flex;
  }

  .rail-toggle-mobile {
    display: inline-flex;
  }

  .left-rail {
    position: fixed;
    top: 0;
    left: -110%;
    width: min(340px, 85vw);
    height: 100vh;
    z-index: 1001;
    transition: left 0.2s ease;
    overflow-y: auto;
  }

  body.rail-open .left-rail {
    left: var(--space-4);
  }

  .rail-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
  }

  body.rail-open .rail-scrim {
    display: block;
  }

  .chat-panel {
    padding: var(--space-4);
    min-height: 100dvh;
    height: 100dvh;
  }

  .chat-title-row {
    justify-content: flex-start;
    gap: var(--space-2);
  }

  .chat-title-row .topbar-actions {
    position: static;
    order: -1;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    background: var(--md-sys-color-surface-1);
    box-shadow: var(--shadow-1);
  }

  .data-table td {
    padding: 6px 0;
    border: none;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    color: var(--md-sys-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .data-table td[data-label=""]::before {
    display: none;
  }
}

@media (min-width: 901px) {
  body.rail-collapsed .left-rail,
  .left-rail.is-collapsed {
    width: 64px;
    min-width: 64px;
    padding: var(--space-4);
    overflow: hidden;
  }

  body.rail-collapsed .layout,
  .layout.is-collapsed {
    grid-template-columns: 64px 1fr;
  }

  body.rail-collapsed .left-rail-header,
  .left-rail.is-collapsed .left-rail-header {
    justify-content: flex-start;
    gap: 0;
  }

  body.rail-collapsed #new-chat,
  .left-rail.is-collapsed #new-chat {
    justify-content: flex-start;
  }

  body.rail-collapsed .new-chat-label,
  .left-rail.is-collapsed .new-chat-label {
    display: none;
  }

  body.rail-collapsed .chat-search,
  body.rail-collapsed .left-rail-title,
  .left-rail.is-collapsed .chat-search,
  .left-rail.is-collapsed .left-rail-title {
    display: none;
  }

  body.rail-collapsed .chat-list,
  .left-rail.is-collapsed .chat-list {
    display: none;
  }

  body.rail-collapsed .chat-row,
  body.rail-collapsed .chat-item,
  body.rail-collapsed .chat-empty,
  .left-rail.is-collapsed .chat-row,
  .left-rail.is-collapsed .chat-item,
  .left-rail.is-collapsed .chat-empty {
    display: none;
  }

  body.rail-collapsed .chat-list,
  .left-rail.is-collapsed .chat-list {
    gap: var(--space-2);
    align-items: center;
  }

  body.rail-collapsed .chat-row,
  .left-rail.is-collapsed .chat-row {
    justify-content: center;
  }

  body.rail-collapsed .chat-row .icon-button,
  .left-rail.is-collapsed .chat-row .icon-button {
    display: none;
  }

  body.rail-collapsed .chat-item,
  .left-rail.is-collapsed .chat-item {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
  }

  body.rail-collapsed .chat-item::before,
  .left-rail.is-collapsed .chat-item::before {
    content: attr(data-initial);
    color: var(--md-sys-color-text);
    font-weight: 600;
    font-size: 0.85rem;
  }
}

.chat-panel.full-width {
  margin: 0;
  overflow-y: auto;
  max-height: calc(100vh - 160px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 120px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.message {
  display: flex;
  margin: 10px 0;
}

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

.message .bubble {
  background: #ffffff;
  border-radius: 28px;
  padding: 14px 16px;
  max-width: 75%;
  border: 1px solid #e2e7f1;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.message .bubble > *:first-child {
  margin-top: 0;
}

.message .bubble > *:last-child {
  margin-bottom: 0;
}

.message.user .bubble {
  background: var(--md-sys-color-primary-container);
  border-color: transparent;
  border-top-right-radius: 4px;
}

.message.assistant .bubble {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 100%;
  color: rgba(0, 0, 0, 0.8);
}

.message.assistant .bubble * {
  color: rgba(0, 0, 0, 0.8);
}

.message.user .bubble * {
  color: #1f1f1f;
}

.bubble.typing {
  opacity: 0.7;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.source-panel {
  margin-top: var(--space-2);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-2);
  border: 1px solid var(--md-sys-color-outline);
}

.source-list {
  font-size: 0.8rem;
  color: var(--md-sys-color-muted);
}

.source-index {
  font-weight: 600;
}

.source-link {
  color: var(--md-sys-color-primary);
}

.chat-input-wrap {
  padding-top: var(--space-3);
}

.chat-input-wrap.disabled .chat-input-field {
  background: transparent;
  border-color: transparent;
}

.chat-input-wrap.disabled .chat-input-field input[type="text"] {
  color: rgba(0, 0, 0, 0.7);
}

.chat-input-wrap.disabled .chat-input-field input[type="text"]::placeholder {
  color: var(--md-sys-color-muted);
}

.studio-layout {
  grid-template-columns: 240px 1fr 260px;
}

.studio-rail {
  min-height: calc(100vh - 180px);
}

.studio-panel {
  padding: 24px;
}

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#studio-search-input {
  border-radius: 16px;
  border: 1px solid var(--md-sys-color-outline);
  padding: 8px 10px;
  background: var(--md-sys-color-surface-1);
  margin-bottom: 8px;
}

#studio-search-results {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant);
}

#studio-search-results div {
  padding: 6px 0;
  border-bottom: 1px solid var(--md-sys-color-outline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chat-input-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border-radius: 999px;
  padding: 10px 14px;
  border: none;
}

.chat-input-field input[type="text"] {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 17.5px;
  color: rgba(0, 0, 0, 0.7);
}

.chat-input-field input[type="text"]::selection {
  background: var(--md-sys-color-primary-container);
}

.prompt-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.upload-button input[type="file"] {
  display: none;
}

.file-upload-name {
  margin-top: var(--space-2);
  color: var(--md-sys-color-muted);
  font-size: 0.9rem;
}

.chat-options {
  margin-top: 6px;
  padding-left: 8px;
  display: flex;
  justify-content: flex-start;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--md-sys-color-muted);
}

.checkbox input[type="checkbox"] {
  accent-color: auto;
}

.status-bubble {
  background: var(--md-sys-color-surface-2);
}

.attachment-note {
  color: var(--md-sys-color-muted);
  font-size: 0.9rem;
}

.message-edit {
  margin-left: 8px;
}

.editing {
  outline: 2px solid var(--md-sys-color-primary);
}

.page-footer-note {
  text-align: right;
  color: var(--md-sys-color-muted);
  padding: var(--space-1) 0 0;
  margin-top: -14px;
  font-size: 0.75rem;
}

.page-footer-note.centered-footer {
  text-align: center;
  margin-top: 10px;
}

.metric-card {
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid rgba(0, 168, 213, 0.2);
  box-shadow: var(--shadow-2);
}

.search-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.search-row input {
  flex: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--md-sys-color-outline);
  padding: 10px 12px;
  background: var(--md-sys-color-surface-2);
}

.search-row input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(0, 168, 213, 0.15);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--md-sys-color-surface-1);
  box-shadow: var(--shadow-2);
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--md-sys-color-outline);
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #0c6a86;
  background: var(--md-sys-color-primary-container);
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.status-banner {
  background: var(--md-sys-color-primary-container);
  border: 1px solid rgba(0, 168, 213, 0.2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.permissions-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.permission-card {
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--shadow-2);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.form-row input,
.form-row select,
.prompt-textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--md-sys-color-outline);
  padding: 10px 12px;
  background: var(--md-sys-color-surface-2);
}

.form-row input:focus,
.form-row select:focus,
.prompt-textarea:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(0, 168, 213, 0.15);
  background: #ffffff;
}

.inline-form {
  display: inline;
}

.login-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-sys-color-surface);
  padding: var(--space-6);
}

.auth-card {
  background: var(--md-sys-color-surface-1);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--shadow-3);
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.auth-logo {
  height: 120px;
  margin-bottom: 12px;
  object-fit: contain;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 700;
}

.auth-subtitle {
  margin: 0 0 16px;
  color: var(--md-sys-color-muted);
  font-size: 13px;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: 1px solid var(--md-sys-color-primary);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-button:hover {
  background: var(--md-sys-color-primary-strong);
  border-color: var(--md-sys-color-primary-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.google-icon {
  display: inline-flex;
  align-items: center;
  width: 18px;
  height: 18px;
}

.card-surface {
  background: var(--md-sys-color-surface-1);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.text-muted {
  color: var(--md-sys-color-muted);
}

.pill-outline {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 168, 213, 0.35);
  background: transparent;
  padding: 6px 10px;
}

.pill-ghost {
  border-radius: var(--radius-pill);
  background: transparent;
  padding: 6px 10px;
}
