[hidden] {
  display: none !important;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 5px;
  color: #000000;
  background: transparent;
  border: 0;
  text-align: left;
}

.user-menu-trigger:hover {
  background: #eef7f8;
}

.user-menu-trigger > i {
  width: 14px;
  color: #000000;
}

.top-popover {
  position: fixed;
  top: 66px;
  z-index: 25;
  display: none;
  width: 330px;
  color: #000000;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 50px #0b6f9326;
}

.top-popover.show {
  display: block;
}

.notification-panel {
  right: 118px;
  padding: 10px;
}

.user-panel {
  right: 54px;
  width: 280px;
  padding: 14px;
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px 10px;
  border-bottom: 1px solid var(--line);
}

.popover-head strong {
  font-size: 14px;
}

.popover-head .text-btn {
  height: 28px;
  color: #08768d;
}

.notification-item {
  display: flex;
  gap: 11px;
  padding: 13px 7px;
  border-bottom: 1px solid #edf3f4;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item > i {
  width: 18px;
  color: var(--accent-dark);
}

.notification-item strong,
.notification-item span {
  display: block;
}

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

.notification-item span {
  margin-top: 4px;
  color: #66777b;
  font-size: 12px;
}

.user-panel-head {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.user-panel-head strong,
.user-panel-head span {
  display: block;
}

.user-panel-head strong {
  font-size: 14px;
}

.user-panel-head span {
  margin-top: 3px;
  color: #6f8084;
  font-size: 12px;
}

.user-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px;
  font-size: 14px;
}

.user-access-row span {
  color: #71868c;
}

.user-access-row strong {
  font-size: 14px;
}

.popover-action {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 32px;
  padding: 0 7px;
  font-size: 12px;
  color: #000000;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.popover-action:hover {
  background: #edf7f8;
}

.popover-action i,
.popover-action svg {
  width: 14px;
  height: 14px;
  color: var(--accent-dark);
}

.account-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 17px 19px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 10px;
}

.account-policy > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-policy i {
  width: 22px;
}

.account-policy strong,
.account-policy small {
  display: block;
}

.account-policy strong {
  font-size: 14px;
}

.account-policy small {
  margin-top: 4px;
  color: #ffffff;
  font-size: 12px;
}

.account-stats {
  display: flex;
  gap: 22px;
  font-size: 12px;
}

.account-stats b {
  font-size: 18px;
  margin-right: 4px;
}

.account-table-card {
  overflow-x: auto;
}

.account-table-card table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.account-table-card th:last-child,
.account-table-card td:last-child {
  width: 104px;
  min-width: 104px;
  padding-right: 18px;
}

.account-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-row-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.account-drag-handle {
  display: inline-grid;
  width: 28px;
  height: 32px;
  flex: 0 0 28px;
  padding: 0;
  place-items: center;
  color: #7b9297;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
}

.account-drag-handle:hover,
.account-drag-handle:focus-visible { color: #127f91; background: #eaf8fa; outline: 0; }
.account-drag-handle i { width: 16px; height: 16px; pointer-events: none; }

.account-table-card tbody tr[draggable="true"] { cursor: grab; transition: opacity 180ms, background-color 180ms; }
.account-table-card tbody tr[draggable="true"]:active { cursor: grabbing; }
.account-table-card tbody tr.is-dragging { opacity: .42; }
.account-table-card tbody tr.is-drop-before { box-shadow: inset 0 3px 0 #1bb1c8; }
.account-table-card tbody tr.is-drop-after { box-shadow: inset 0 -3px 0 #1bb1c8; }

.account-contact span,
.account-contact small {
  display: block;
}

.account-contact small {
  margin-top: 4px;
  color: #71868c;
  font-size: 12px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: var(--accent-dark);
  border-radius: 50%;
  font-weight: 700;
}

.access-pill,
.account-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.access-pill {
  color: #08768d;
  background: #def5f8;
}

button.access-pill {
  border: 0;
  cursor: pointer;
  gap: 4px;
  align-items: center;
}

button.access-pill:hover {
  color: #075f73;
  background: #c8eef3;
}

button.access-pill svg {
  width: 13px;
  height: 13px;
}

.access-pill.root {
  color: #ffffff;
  background: var(--blue);
}

.permission-preview-modal {
  width: min(900px, 100%);
}

.permission-preview-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.permission-preview-summary strong,
.permission-preview-summary small {
  display: block;
}

.permission-preview-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.permission-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  max-height: 52vh;
  padding: 1px;
  overflow: auto;
  background: var(--line);
}

.permission-preview-list.is-saving {
  pointer-events: none;
  opacity: .68;
}

.permission-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px;
  background: var(--panel);
}

.permission-preview-name > span {
  color: var(--ink);
  font-weight: 700;
}

.permission-preview-name {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.permission-toggle-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.permission-toggle {
  display: grid;
  grid-template-columns: auto 34px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.permission-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.permission-toggle i {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: #d9e1e2;
  transition: background 180ms ease;
}

.permission-toggle i::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 36, 38, .2);
  transition: transform 180ms ease;
}

.permission-toggle input:checked + i { background: var(--accent); }
.permission-toggle input:checked + i::after { transform: translateX(14px); }
.permission-toggle input:focus-visible + i { outline: 2px solid rgba(27, 177, 203, .35); outline-offset: 2px; }
.permission-toggle input:disabled + i { opacity: .55; }
.permission-toggle:has(input:disabled) { cursor: default; }

.permission-preview-foot > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.permission-state {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 12px;
}

.permission-state.edit { color: #08768d; background: #def5f8; }
.permission-state.view { color: #45656c; background: #edf5f6; }
.permission-state.denied { color: #8b9699; background: #f1f3f3; }

@media (max-width: 760px) {
  .permission-preview-list { grid-template-columns: 1fr; }
  .permission-preview-foot > span { display: none; }
  .permission-preview-foot { flex-wrap: wrap; }
}

.account-status.active {
  color: #198754;
  background: #e8f5ed;
}

.account-status.disabled {
  color: #7d858b;
  background: #eef0f1;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.account-actions .icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.account-actions .icon-btn:disabled {
  cursor: not-allowed;
  opacity: .3;
}

.notice-modal .modal-head h2 {
  font-size: 22px;
}

.notice-modal .eyebrow {
  font-size: 12px;
}

.notice-modal .notice-fields {
  gap: 20px;
}

.notice-modal .notice-fields label {
  color: #405358;
  font-size: 14px;
  font-weight: 600;
}

.notice-modal .notice-fields input,
.notice-modal .notice-fields select {
  height: 44px;
  font-size: 14px;
  font-weight: 500;
}

.notice-modal .notice-fields textarea {
  min-height: 96px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.notice-modal .notice-fields input::placeholder,
.notice-modal .notice-fields textarea::placeholder {
  color: #8a9699;
  font-size: 14px;
}

.notice-modal .project-form-note {
  font-size: 12px;
  line-height: 1.6;
}

.notice-modal .modal-foot .primary-btn,
.notice-modal .modal-foot .outline-btn {
  font-size: 14px;
}

.link-btn {
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  border: 0;
  font-size: 12px;
}

.login-note.is-error {
  color: #d13c36;
  font-weight: 700;
}

.search-backdrop {
  align-items: flex-start;
  padding-top: 11vh;
}

.search-dialog {
  width: min(620px, 100%);
  overflow: hidden;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 22px 70px #071f2638;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 12px 0 18px;
  border-bottom: 1px solid var(--line);
}

.search-box > i {
  width: 20px;
  color: var(--accent-dark);
}

.search-box input {
  flex: 1;
  height: 100%;
  color: #000000;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search-results {
  max-height: 420px;
  overflow: auto;
  padding: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 22px 1fr 18px;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  color: #000000;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.search-result:hover {
  background: #edf7f8;
}

.search-result > i {
  width: 18px;
  color: var(--accent-dark);
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  font-size: 12px;
}

.search-result small {
  margin-top: 4px;
  color: #71868c;
  font-size: 12px;
}

.search-empty {
  padding: 44px;
  color: #71868c;
  text-align: center;
}

@media (max-width: 700px) {
  .user-menu-trigger .user-meta {
    display: none;
  }

  .notification-panel,
  .user-panel {
    right: 12px;
    left: 12px;
    width: auto;
  }

  .account-policy {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .search-backdrop {
    padding-top: 18px;
  }
}

/* iOS + ColorOS Fusion UI theme: visual-only overrides. */
:root {
  --ink: #1A2426;
  --muted: #546467;
  --caption: #88999C;
  --line: rgba(27, 177, 200, .08);
  --panel: rgba(255, 255, 255, .88);
  --paper: #F7FCFD;
  --accent: #1BB1CB;
  --accent-dark: #1BB1CB;
  --green: #208D72;
  --blue: #1BB1CB;
  --sidebar: #1BB1CB;
  --sidebar-muted: #D7F1F4;
  --theme-shadow: 0 2px 12px rgba(27, 177, 200, .07);
  --theme-modal-shadow: 0 8px 32px rgba(27, 177, 200, .11);
  --theme-spring: cubic-bezier(.34, 1.56, .64, 1);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.sidebar {
  background: var(--sidebar);
  box-shadow: 5px 0 22px rgba(27, 177, 200, .10);
}

.sidebar .brand-name,
.sidebar .brand-sub,
.sidebar .nav-item,
.sidebar .nav-item span,
.sidebar .nav-item kbd,
.sidebar .nav-label,
.sidebar .workspace-switcher,
.sidebar .workspace-switcher *,
.sidebar .sync-card,
.sidebar .sync-card * {
  color: #FFFFFF;
}

.sidebar .brand-sub,
.sidebar .nav-label,
.sidebar .nav-item kbd {
  color: rgba(255, 255, 255, .72);
}

.sidebar .workspace-switcher,
.sidebar .sync-card {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .18);
}

.sidebar .nav-item:hover,
.sidebar .nav-item.active {
  background: rgba(255, 255, 255, .16);
}

.topbar {
  background: #FFFFFF;
  border-color: var(--line);
}

.main-content,
.main-content h1,
.main-content h2,
.main-content h3,
.main-content strong,
.main-content td,
.main-content p,
.main-content span,
.main-content small,
.main-content label,
.main-content th,
.login-panel,
.login-panel label,
.login-lead,
.login-note,
.login-footer {
  color: var(--ink);
}

.main-content p,
.main-content td,
.main-content th,
.main-content small,
.main-content .section-head span,
.main-content .project-card p,
.main-content .project-foot,
.main-content .activity span,
.main-content .budget-summary span,
.main-content .budget-summary small,
.main-content .settle-card span,
.main-content .settle-card small,
.main-content .person-card span,
.main-content .template-card span,
.main-content .template-card small,
.login-lead,
.login-note,
.login-footer {
  color: var(--muted);
}

.main-content .eyebrow,
.main-content .text-btn,
.link-btn {
  color: var(--accent-dark);
}

.metric-card,
.project-card,
.activity-panel,
.table-card,
.settle-card,
.person-card,
.template-card,
.budget-summary {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--theme-shadow);
}

.metric-card.accent,
.notice-panel,
.account-policy {
  color: #FFFFFF;
  background: var(--blue);
  border-color: var(--blue);
}

.metric-card.accent *,
.notice-panel *,
.account-policy * {
  color: #FFFFFF;
}

.project-card.featured {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(27, 177, 200, .22);
}

.primary-btn,
.outline-btn,
.text-btn,
.login-btn,
.oauth-btn,
.icon-btn,
.notice-fields input,
.notice-fields textarea,
.notice-fields select,
.login-form input,
.popover-action,
.search-result {
  border-radius: 10px;
  transition: transform 180ms var(--theme-spring), background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.primary-btn,
.login-btn {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(27, 177, 200, .09);
}

.primary-btn:hover,
.login-btn:hover {
  background: var(--accent-dark);
}

.primary-btn:active,
.outline-btn:active,
.login-btn:active,
.oauth-btn:active,
.icon-btn:active {
  transform: scale(.96);
}

.outline-btn {
  background: #FFFFFF;
  border-color: rgba(27, 177, 200, .22);
  color: var(--ink);
}

.outline-btn:hover,
.icon-btn:hover,
.popover-action:hover,
.search-result:hover {
  background: rgba(27, 177, 200, .08);
  border-color: rgba(27, 177, 200, .35);
  color: var(--accent-dark);
}

.table-card,
.budget-summary,
.account-table-card {
  overflow: auto;
}

.table-card th {
  color: var(--caption);
  border-color: var(--line);
}

.table-card td {
  border-color: var(--line);
}

.table-card td strong,
.money,
.total-label,
.total-cell {
  color: var(--ink) !important;
}

.project-tag {
  background: #FFFFFF;
  border: 1px solid currentColor;
  border-radius: 8px;
}

.project-tag.not-started,
.project-tag.review {
  color: #B27B00;
}

.project-tag.live {
  color: #198754;
}

.project-tag.ended {
  color: #D13C36;
}

.project-tag.draft {
  color: #7D858B;
}

.role-pill,
.access-pill,
.account-status {
  border-radius: 8px;
}

.modal-backdrop {
  background: rgba(17, 27, 29, .42);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notice-modal,
.search-dialog {
  border-radius: 22px;
  box-shadow: var(--theme-modal-shadow);
}

/* Keep every dialog inside the viewport. Long content scrolls inside the dialog. */
.notice-modal {
  display: flex;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.notice-modal > .modal-head,
.notice-modal > .modal-foot {
  flex: 0 0 auto;
}

.notice-modal > form {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notice-modal > form > .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #FFFFFF;
}

.member-preview-content,
.website-credential-preview-content,
.trash-preview-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.metric-card,
.project-card,
.settle-card,
.person-card,
.template-card,
.website-credential-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.project-card h3,
.project-card p,
.settle-card strong,
.settle-card span,
.settle-card small,
.person-card strong,
.person-card span,
.template-card strong,
.template-card span,
.template-card small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.call-sheet-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.call-sheet-card:hover {
  border-color: rgba(27, 177, 203, .42);
  box-shadow: 0 8px 24px rgba(27, 177, 203, .11);
  transform: translateY(-2px);
}

.call-sheet-card-icon {
  display: grid !important;
  width: 42px;
  height: 42px;
  margin: 0 0 22px !important;
  place-items: center;
  border-radius: 10px;
  background: rgba(27, 177, 203, .12);
  color: var(--accent-dark) !important;
}

.call-sheet-card-icon svg {
  width: 20px;
  height: 20px;
}

.call-sheet-card-meta {
  margin-top: auto !important;
  padding-top: 18px;
}

.notice-fields input,
.notice-fields textarea,
.notice-fields select,
.login-form input {
  background: #FFFFFF;
  border-color: rgba(27, 177, 200, .16);
  color: var(--ink);
}

.notice-fields input:focus,
.notice-fields textarea:focus,
.notice-fields select:focus,
.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 177, 200, .12);
}

.login-panel {
  background: var(--paper);
}

.login-visual {
  background-color: #147F95;
}

.visual-shade {
  background: rgba(17, 27, 29, .48);
}

.visual-quote em {
  color: #80D8E6;
}

.toast {
  background: #1C2A2D;
  border-radius: 10px;
}

.admin-badge,
.permission-strip {
  color: #FFFFFF;
  background: var(--blue);
  border-color: var(--blue);
  border-radius: 10px;
}

.admin-badge *,
.permission-strip * {
  color: #FFFFFF !important;
}

#settingsView .permission-strip,
#settingsView .permission-strip * {
  color: #FFFFFF !important;
}

#settingsView .account-policy,
#settingsView .account-policy * {
  color: #FFFFFF !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111B1D;
    --panel: rgba(255, 255, 255, .10);
    --ink: #E6F4F6;
    --muted: #94B3B8;
    --caption: #607C81;
    --line: rgba(27, 177, 200, .12);
    --accent: #28C3DC;
    --accent-dark: #53D0E4;
  }

  body,
  .topbar,
  .login-panel,
  .outline-btn,
  .notice-fields input,
  .notice-fields textarea,
  .notice-fields select,
  .login-form input,
  .search-dialog,
  .notice-modal,
  .table-card td strong,
  .money,
  .total-label,
  .total-cell {
    color: var(--ink) !important;
    background-color: #1C2A2D;
  }

  .topbar {
    border-color: var(--line);
  }

  .notice-modal > form > .modal-foot {
    background: #1C2A2D;
  }

  .metric-card,
  .project-card,
  .activity-panel,
  .table-card,
  .settle-card,
  .person-card,
  .template-card,
  .budget-summary {
    background: var(--panel);
  }
}
