@font-face {
  font-family: "Fixel";
  src: url("./assets/fonts/FixelText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Fixel";
  src: url("./assets/fonts/FixelText-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

/* Figma 1433:417 "Operations", 1440 × 856. Tokens follow the Team screen. */
:root {
  --team-bg: #e5e5e5;
  --team-ink: #2f2f31;
  --team-muted: #919192;
  --team-panel: #dadada;
  --team-white: #fff;
  --team-orange: #f0934f;
  --team-green: #3ab882;
  --team-green-dark: #2a9366;
  --team-blue: #4f8ff0;
  --ops-red: #c62828;
  --ops-violet: #5e4ac6;
  --ops-text: rgb(0 0 0 / 87%);
}

* { box-sizing: border-box; }
html, body { min-width: 1440px; min-height: 856px; margin: 0; background: var(--team-bg); }
body, button, input { font-family: "Fixel", sans-serif; }
button { border: 0; cursor: default; }
img { display: block; }

.ops-artboard {
  position: relative;
  width: 1440px;
  height: 856px;
  margin: 0 auto;
  overflow: hidden;
  color: var(--team-ink);
  background: var(--team-bg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.28px;
}

/* Sidebar: same component as the Team screen, account card 200 wide here. */
.team-sidebar { position: absolute; left: 44px; top: 24px; width: 200px; height: 781px; }
.team-account { width: 200px; height: 89px; overflow: hidden; border-radius: 12px; background: var(--team-panel); }
.team-workspace-row, .team-user-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.team-workspace-row { height: 48px; padding: 12px 8px; background: rgb(255 255 255 / 20%); }
.team-workspace-name { display: flex; align-items: center; gap: 8px; width: 138px; white-space: nowrap; }
.team-workspace-name img { width: 24px; height: 24px; border-radius: 8px; }
.team-workspace-name strong { overflow: hidden; font-size: 14px; font-weight: 600; letter-spacing: -.14px; text-overflow: ellipsis; }
.team-icon-16 { width: 16px; height: 16px; }
.team-user-row { height: 41px; padding: 8px; }
.team-user-pill { display: flex; align-items: center; gap: 4px; height: 25px; padding: 4px 8px; border-radius: 8px; background: var(--team-white); font-size: 14px; font-weight: 600; letter-spacing: -.14px; white-space: nowrap; }
.team-user-pill img { width: 16px; height: 16px; }

.team-menu { display: flex; flex-direction: column; width: 181px; margin-top: 15px; }
.team-menu a { display: flex; align-items: center; gap: 8px; width: 181px; height: 50px; padding: 0 20px; color: var(--team-ink); border-radius: 8px; text-decoration: none; white-space: nowrap; }
.team-menu a img { width: 24px; height: 24px; opacity: .72; }
.team-menu a.is-active { width: 180px; color: var(--team-orange); background: rgb(255 255 255 / 60%); }
.team-menu a.is-active img { opacity: 1; filter: invert(61%) sepia(72%) saturate(642%) hue-rotate(331deg) brightness(102%) contrast(88%); }

.help-pill {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 100px;
  background: rgb(255 255 255 / 60%);
}
.help-pill .icon-16 { width: 16px; height: 16px; }
.help-pill span { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6.5px; border-radius: 64px; color: #fff; background: var(--team-orange); font: 500 12px/20px "Fixel", sans-serif; letter-spacing: .14px; }

/* Main column: 1120 wide, vertical rhythm of 16px between blocks. */
.ops-main { position: absolute; left: 292px; top: 24px; display: flex; flex-direction: column; gap: 16px; width: 1120px; }

/* Shared small button: white pill, 16px icon, 12px semibold label. */
.ops-btn { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 4px 8px; border-radius: 8px; color: var(--team-ink); background: #fff; font-size: 12px; font-weight: 600; letter-spacing: -.24px; white-space: nowrap; }
.ops-btn img { width: 16px; height: 16px; }
.ops-btn--income { color: var(--team-green-dark); }
.ops-btn--expense { color: var(--ops-red); }
.ops-btn--exchange { color: var(--team-blue); }
.ops-btn--violet { color: var(--ops-violet); }
.ops-btn--orange { color: var(--team-orange); }

.ops-toolbar { display: flex; align-items: flex-start; justify-content: space-between; height: 32px; }
.ops-tabs { display: flex; gap: 4px; height: 32px; }
.ops-tab { display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; padding: 4px 16px; border: 1px solid rgb(47 47 49 / 20%); border-radius: 16px; color: var(--team-muted); background: transparent; font-size: 14px; font-weight: 500; letter-spacing: -.28px; white-space: nowrap; }
.ops-tab img { width: 16px; height: 16px; }
.ops-tab.is-active { color: #fff; border-color: var(--team-ink); background: var(--team-ink); }
.ops-add { display: flex; gap: 4px; }

.ops-period-row { display: flex; gap: 8px; height: 32px; }
.ops-period { display: flex; align-items: center; height: 32px; overflow: hidden; border-radius: 8px; }
.ops-period button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: #fff; }
.ops-period button img { width: 16px; height: 16px; }
.ops-period span { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; background: rgb(255 255 255 / 60%); font-size: 14px; font-weight: 600; letter-spacing: -.14px; white-space: nowrap; }
.ops-period span img { width: 16px; height: 16px; }
.ops-report { display: flex; align-items: center; gap: 4px; height: 32px; padding: 4px 12px; border: 1px solid rgb(255 255 255 / 80%); border-radius: 8px; background: #fff; font-size: 12px; font-weight: 600; letter-spacing: -.24px; white-space: nowrap; }
.ops-report img { width: 16px; height: 16px; }

.ops-search { position: relative; display: flex; align-items: center; gap: 4px; height: 40px; padding: 8px 12px; border-radius: 12px; background: rgb(255 255 255 / 60%); }
.ops-search img { width: 16px; height: 16px; }
.ops-search input { flex: 1; min-width: 0; height: 24px; padding: 0; border: 0; outline: 0; color: var(--team-ink); background: transparent; font-size: 14px; font-weight: 500; letter-spacing: -.28px; }
.ops-search input::placeholder { color: rgb(47 47 49 / 20%); opacity: 1; }

.ops-actions { display: flex; align-items: flex-start; justify-content: space-between; height: 24px; }
.ops-actions-left { display: flex; gap: 4px; }

/* Operations table for one day. */
.ops-table { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 12px; background: rgb(255 255 255 / 40%); }
.ops-day { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.ops-day-tag { display: flex; align-items: center; gap: 4px; height: 24px; padding: 4px 8px; border-radius: 8px; background: var(--team-panel); font-size: 12px; font-weight: 600; letter-spacing: -.24px; white-space: nowrap; }
.ops-day-tag img { width: 12px; height: 12px; }
.ops-day-count { display: flex; align-items: center; gap: 4px; height: 24px; padding: 4px 8px; border-radius: 8px; background: rgb(255 255 255 / 80%); font-size: 12px; font-weight: 600; letter-spacing: -.24px; }
.ops-day-count img { width: 16px; height: 16px; }

.ops-head, .ops-row { display: flex; align-items: center; width: 100%; }
.ops-head { height: 30px; padding-right: 16px; border-radius: 10px; background: rgb(218 218 218 / 70%); font-size: 12px; font-weight: 600; letter-spacing: -.24px; color: var(--ops-text); }
.ops-head .ops-col-account, .ops-head .ops-col-value { color: var(--team-ink); }
.ops-check { display: flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; }
.ops-check i { display: block; width: 12px; height: 12px; border: 1px solid var(--team-muted); border-radius: 4px; }
.ops-check--hidden i { opacity: 0; }

.ops-col-category, .ops-col-purpose, .ops-col-invoice { display: flex; align-items: center; flex: none; width: 170px; }
.ops-col-note { display: flex; align-items: center; gap: 4px; flex: none; width: 220px; }
.ops-col-account { display: flex; align-items: center; gap: 8px; flex: none; width: 155px; }
.ops-col-status { display: flex; align-items: center; gap: 4px; flex: none; width: 56px; }
.ops-col-value { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 1; min-width: 0; }
.ops-head .ops-col-status { width: 24px; }

.ops-rows { display: flex; flex-direction: column; gap: 12px; }
.ops-block { display: flex; flex-direction: column; gap: 8px; }
.ops-row { height: 25px; padding-right: 20px; color: var(--ops-text); font-size: 14px; font-weight: 600; letter-spacing: -.14px; }
.ops-row .ops-col-note { font-weight: 500; letter-spacing: -.28px; white-space: nowrap; }
.ops-row .ops-col-note img { width: 16px; height: 16px; }
.ops-row .ops-col-purpose { white-space: nowrap; }
.ops-chip { display: inline-flex; align-items: center; gap: 4px; height: 25px; padding: 4px 8px; border-radius: 8px; color: var(--team-ink); background: #fff; font-size: 14px; font-weight: 600; letter-spacing: -.14px; white-space: nowrap; }
.ops-chip img { width: 16px; height: 16px; }
.ops-chip--empty { color: #fff; background: rgb(47 47 49 / 20%); }
.ops-chip--toggle { padding: 4px; }
.ops-iso { display: inline-flex; align-items: center; height: 22px; padding: 4px 8px; border-radius: 8px; color: #fff; background: var(--team-ink); font-size: 12px; font-weight: 600; letter-spacing: -.24px; }
.ops-col-account em { font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: -.24px; white-space: nowrap; }
.ops-col-account--hidden { visibility: hidden; }
.ops-col-status img { width: 16px; height: 16px; }
.ops-col-value strong { font-size: 18px; font-weight: 600; line-height: 32px; letter-spacing: -.36px; white-space: nowrap; }
.ops-col-value strong small { font-size: 14px; line-height: 1.2; letter-spacing: -.14px; }
.ops-col-value img { width: 16px; height: 16px; }
.ops-col-value--small strong { font-size: 14px; line-height: 1.2; letter-spacing: -.14px; }
.ops-col-value--small strong small { font-size: 12px; letter-spacing: -.24px; }

.ops-rule { height: 1px; margin: 0 20px -1px; background: rgb(47 47 49 / 8%); }
.ops-rule--child { margin: 0; }

/* A split operation: the parent row sits on a lighter card with its children. */
.ops-group { display: flex; flex-direction: column; gap: 8px; margin: 0 8px 0 20px; padding-bottom: 8px; border-radius: 10px; background: rgb(255 255 255 / 60%); }
.ops-row--group-head { height: 41px; padding: 8px 12px 8px 0; border-radius: 8px 8px 0 0; background: rgb(255 255 255 / 80%); }
.ops-row--group-head .ops-col-category, .ops-row--child .ops-col-category { padding-left: 8px; }
.ops-row--group-head .ops-col-value { flex: 1; }
.ops-row--child { padding-right: 12px; }
.ops-group .ops-rule--child { margin: 0 0 -1px; }

/* Autocategorise: the button keeps its size, the icon gives way to a ring. */
.ops-btn .ops-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgb(94 74 198 / 20%); border-top-color: var(--ops-violet); border-radius: 50%; animation: ops-spin .8s linear infinite; }
.ops-btn.is-busy { cursor: default; }
.ops-btn.is-busy img { display: none; }
.ops-btn.is-busy .ops-spinner { display: block; }
.ops-btn.is-done { color: var(--team-green-dark); }
.ops-btn[data-autocategorise] { cursor: pointer; }
.ops-chip.is-filling { opacity: 0; transform: translateY(3px); }
.ops-chip.is-filled { transition: opacity .32s ease, transform .32s ease; }
@keyframes ops-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ops-btn .ops-spinner { animation: none; }
  .ops-chip.is-filled { transition: none; }
}
