:root {
  --om-green: #07c160;
  --om-green-dark: #05994c;
  --om-ink: #17181a;
  --om-muted: #8a8f98;
  --om-line: #eceef0;
  --om-surface: #ffffff;
  --om-soft: #f7f8f8;
  --om-blue: #576b95;
  --om-danger: #e45b67;
  --om-shadow: 0 12px 34px rgb(49 43 45 / 8%);
}

.one-mate-admin-page {
  min-width: 320px;
  min-height: 100vh;
  padding: 18px;
  background-color: #f4edef;
  background-image:
    linear-gradient(rgb(255 255 255 / 62%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 62%) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--om-ink);
}

.one-mate-window {
  width: min(1720px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  overflow: clip;
  border: 1px solid rgb(33 34 36 / 9%);
  border-radius: 30px;
  background: #f5f6f6;
  box-shadow: 0 28px 90px rgb(45 37 40 / 16%);
}

.one-mate-appbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 74px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  border-bottom: 1px solid rgb(17 24 39 / 7%);
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(20px);
}

.one-mate-brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--om-ink);
  text-decoration: none;
}

.one-mate-brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgb(7 193 96 / 18%);
}

.one-mate-brand span {
  display: grid;
  gap: 1px;
}

.one-mate-brand strong {
  font-size: 17px;
  letter-spacing: .01em;
}

.one-mate-brand small {
  color: var(--om-muted);
  font-size: 11px;
}

.one-mate-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid #eef0f1;
  border-radius: 16px;
  background: #f7f8f8;
}

.one-mate-nav a,
.one-mate-nav > span {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 12px;
  color: #747981;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.one-mate-nav svg,
.refresh-button svg,
.one-mate-bottom-nav svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.one-mate-nav .active {
  background: #fff;
  color: var(--om-green-dark);
  box-shadow: 0 5px 15px rgb(28 32 34 / 8%);
}

.one-mate-live {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #777d85;
  font-size: 12px;
}

.one-mate-live .dot,
.topbar .dot {
  background: var(--om-green);
  box-shadow: 0 0 0 4px rgb(7 193 96 / 10%);
}

.moments-admin.main {
  width: min(1500px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 24px 26px 40px;
}

.moments-admin .topbar {
  position: relative;
  min-height: 176px;
  margin: 0;
  overflow: hidden;
  padding: 34px 38px 66px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 75% 18%, rgb(251 210 161 / 75%), transparent 25%),
    radial-gradient(ellipse at 15% 34%, rgb(231 244 244 / 70%), transparent 29%),
    linear-gradient(145deg, #87a6ab 0%, #a8bec0 52%, #7f9995 100%);
  color: #fff;
}

.moments-admin .topbar::before,
.moments-admin .topbar::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.moments-admin .topbar::before {
  right: -4%;
  bottom: -80px;
  width: 58%;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background: rgb(43 72 60 / 46%);
}

.moments-admin .topbar::after {
  bottom: -105px;
  left: -8%;
  width: 58%;
  height: 170px;
  border-radius: 50% 50% 0 0;
  background: rgb(37 66 58 / 30%);
}

.moments-admin .topbar > * {
  position: relative;
  z-index: 2;
}

.moments-admin .topbar .eyebrow {
  margin-bottom: 7px;
  color: rgb(255 255 255 / 78%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.moments-admin .topbar h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  text-shadow: 0 2px 10px rgb(25 44 39 / 16%);
}

.moments-admin .topbar p {
  margin: 8px 0 0;
  color: rgb(255 255 255 / 88%);
  font-size: 14px;
}

.moments-admin .topbar .pill {
  border-color: rgb(255 255 255 / 38%);
  background: rgb(255 255 255 / 88%);
  color: #4c625e;
  backdrop-filter: blur(10px);
}

.refresh-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 12px;
  background: rgb(255 255 255 / 88%);
  color: #425854;
  box-shadow: 0 7px 20px rgb(38 65 58 / 10%);
}

.moments-metrics.metric-grid {
  position: relative;
  z-index: 4;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: -44px 22px 22px;
}

.moments-metrics .metric {
  min-height: 98px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 10px;
  padding: 15px;
  border: 1px solid rgb(22 27 29 / 7%);
  border-radius: 18px;
  box-shadow: var(--om-shadow);
}

.moments-metrics .metric i {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 12px;
  background: #ecfaf2;
  color: var(--om-green-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.moments-metrics .metric:nth-child(3) i {
  background: #edf2fb;
  color: var(--om-blue);
}

.moments-metrics .metric:nth-child(6) i {
  background: #fff6e8;
  color: #b37722;
}

.moments-metrics .metric span {
  align-self: end;
  color: #92979e;
  font-size: 11px;
}

.moments-metrics .metric b {
  align-self: start;
  margin: 2px 0 0;
  color: #222426;
  font-size: 23px;
  line-height: 1;
}

.moments-admin-layout {
  grid-template-columns: minmax(265px, 300px) minmax(0, 1fr);
  gap: 16px;
}

.moments-workspace {
  gap: 16px;
}

.moments-admin .panel {
  overflow: hidden;
  border: 1px solid rgb(23 29 31 / 7%);
  border-radius: 20px;
  box-shadow: 0 7px 24px rgb(44 48 50 / 5%);
}

.moments-admin .panel-head {
  min-height: 72px;
  padding: 16px 19px;
  border-bottom-color: var(--om-line);
}

.moments-admin .panel-head h2 {
  color: #202224;
  font-size: 17px;
}

.moments-admin .eyebrow {
  margin-top: 3px;
  color: #9a9fa5;
  font-size: 11px;
}

.moments-admin .pill {
  min-height: 28px;
  border-color: #e8ebed;
  background: #fafbfb;
  color: #7c8289;
  font-size: 11px;
}

.moments-users-panel {
  top: 94px;
  max-height: calc(100vh - 128px);
}

.user-search-box {
  padding: 12px 14px;
  background: #fafafa;
}

.user-search-box input,
.feed-filters input {
  padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.moments-admin input,
.moments-admin select,
.moments-admin textarea {
  border-color: #e4e7e9;
  border-radius: 11px;
  background-color: #f8f9f9;
  color: #26282a;
}

.moments-admin input:focus,
.moments-admin select:focus,
.moments-admin textarea:focus {
  border-color: rgb(7 193 96 / 62%);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgb(7 193 96 / 10%);
}

.moments-user-list {
  max-height: calc(100vh - 252px);
  padding: 6px 8px 10px;
}

.moments-user-card {
  grid-template-columns: 44px minmax(0, 1fr) 9px;
  gap: 11px;
  margin: 2px 0;
  padding: 11px 10px;
  border-radius: 14px;
}

.moments-user-card:hover,
.moments-user-card.active {
  border-color: transparent;
  background: #f0faf4;
}

.moments-user-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  border-radius: 0 4px 4px 0;
  background: var(--om-green);
}

.moments-user-card {
  position: relative;
}

.moments-user-card .user-avatar,
.admin-moment-head .user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, #d9eee4, #b8d2c5);
  color: #426758;
}

.user-card-main strong {
  color: #282a2c;
  font-size: 14px;
}

.user-card-main small,
.user-card-main span {
  color: #9ca1a7;
  font-size: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--om-green);
}

.selected-user-panel {
  background:
    linear-gradient(90deg, rgb(240 250 244 / 78%), transparent 40%),
    #fff;
}

.selected-user-panel .panel-head {
  min-height: 92px;
  padding: 18px 22px;
}

.selected-user-panel h2 {
  font-size: 20px;
}

.user-key {
  color: #a1a5aa;
  font-size: 10px;
}

.moments-control-grid {
  gap: 16px;
}

.moments-admin .panel-body {
  padding: 18px 19px;
}

.moments-settings-form {
  gap: 13px 12px;
}

.moments-admin label {
  color: #747980;
  font-size: 11px;
  font-weight: 600;
}

.toggle-field {
  border-color: #e8ecea;
  border-radius: 12px;
  background: #f4faf6;
  color: #466053;
}

.toggle-field input {
  accent-color: var(--om-green);
}

.moments-admin .btn {
  border-radius: 11px;
  background: #f0f1f1;
  color: #50555a;
  font-size: 12px;
}

.moments-admin .btn:hover {
  filter: brightness(.98);
}

.moments-admin .btn.primary {
  background: var(--om-green);
  color: #fff;
  box-shadow: 0 7px 16px rgb(7 193 96 / 18%);
}

.moments-admin .btn.danger {
  border-color: #f5dadd;
  background: #fff4f5;
  color: #c84e5b;
  box-shadow: none;
}

.manual-image-preview {
  border-color: #e4e9e6;
  border-radius: 14px;
  background: #f4f7f5;
}

.moments-feed-panel > .panel-head {
  background: #fff;
}

.feed-filters select,
.feed-filters input {
  height: 38px;
  border-radius: 10px;
  font-size: 11px;
}

.admin-moment-card {
  padding: 20px 22px;
  border-bottom-color: #eceeee;
}

.admin-moment-card:hover {
  background: #fdfefe;
}

.admin-moment-head > img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.admin-moment-head strong {
  color: var(--om-blue);
  font-size: 14px;
}

.admin-moment-head small {
  color: #a2a6ab;
  font-size: 10px;
}

.admin-moment-content {
  margin: 14px 0;
  color: #282a2c;
  font-size: 14px;
}

.admin-moment-images {
  grid-template-columns: repeat(auto-fill, minmax(120px, 176px));
}

.admin-moment-images img {
  border-radius: 7px;
}

.image-observation {
  border: 0;
  border-radius: 9px;
  background: #f3f5f6;
  color: #747a80;
}

.ai-like-controls {
  color: #999ea4;
}

.ai-like-controls .chip {
  border-color: #e4e7e9;
  background: #fff;
  color: var(--om-blue);
}

.ai-like-controls .chip.active {
  border-color: #d4e9db;
  background: #eef8f2;
  color: var(--om-green-dark);
}

.admin-comments {
  border-radius: 7px;
  background: #f4f5f6;
}

.admin-comment strong {
  color: var(--om-blue);
}

.ai-comment-composer {
  grid-template-columns: 118px minmax(0, 1fr) auto;
}

.task-panel table {
  min-width: 680px;
}

.task-panel th {
  background: #fafafa;
}

.task-panel td,
.task-panel th {
  border-bottom-color: #eef0f1;
}

.tag {
  background: #edf7f1;
  color: #4a7a61;
}

.toast {
  right: 34px;
  bottom: 34px;
  border-radius: 13px;
  background: rgb(29 31 32 / 92%);
  box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
  backdrop-filter: blur(10px);
}

.one-mate-bottom-nav {
  display: none;
}

@media (max-width: 1180px) {
  .one-mate-appbar {
    grid-template-columns: 1fr auto;
  }

  .one-mate-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-self: center;
    display: none;
  }

  .moments-metrics.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: -42px;
  }

  .moments-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .one-mate-admin-page {
    padding: 0;
    background: #fff;
  }

  .one-mate-window {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .one-mate-appbar {
    height: calc(62px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 16px 0;
  }

  .one-mate-brand img {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .one-mate-brand strong {
    font-size: 16px;
  }

  .one-mate-live span {
    display: none;
  }

  .moments-admin.main {
    padding: 0 13px calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .moments-admin .topbar {
    min-height: 190px;
    margin: 0 -13px;
    padding: 32px 22px 72px;
    border-radius: 0;
  }

  .moments-admin .topbar .status-row {
    align-self: flex-start;
  }

  .moments-admin .topbar p {
    max-width: 230px;
    font-size: 12px;
  }

  .moments-metrics.metric-grid {
    display: flex;
    margin: -47px -1px 16px;
    padding: 0 1px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .moments-metrics::-webkit-scrollbar {
    display: none;
  }

  .moments-metrics .metric {
    min-width: 128px;
    scroll-snap-align: start;
  }

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

  .moments-users-panel {
    position: static;
    max-height: none;
  }

  .moments-user-list {
    max-height: 300px;
  }

  .moments-workspace,
  .moments-admin-layout {
    gap: 12px;
  }

  .moments-admin .panel {
    border-radius: 16px;
  }

  .one-mate-bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid #eceeef;
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(18px);
  }

  .one-mate-bottom-nav a,
  .one-mate-bottom-nav > span {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 3px;
    color: #777c82;
    font-size: 10px;
    text-decoration: none;
  }

  .one-mate-bottom-nav .active {
    color: var(--om-green);
  }

  .one-mate-bottom-nav svg {
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 560px) {
  .moments-admin .topbar {
    align-items: flex-start;
    padding-top: 24px;
  }

  .moments-admin .topbar h1 {
    font-size: 28px;
  }

  .moments-admin .topbar .status-row {
    width: auto;
  }

  .moments-admin .topbar .pill {
    display: none;
  }

  .moments-admin .panel-head,
  .selected-user-panel .panel-head {
    align-items: flex-start;
    min-height: 0;
    padding: 15px 16px;
  }

  .selected-user-head .status-row {
    width: 100%;
  }

  .selected-user-head .btn {
    margin-left: auto;
  }

  .moments-admin .panel-body,
  .admin-moment-card {
    padding: 16px;
  }

  .moments-admin .form-grid {
    grid-template-columns: 1fr;
  }

  .feed-filters,
  .feed-filters input,
  .feed-filters select {
    width: 100%;
  }

  .admin-moment-head .delete-post {
    margin-left: 55px;
  }

  .ai-comment-composer {
    grid-template-columns: 1fr;
  }

  .admin-moment-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
