:root {
  --slack-aubergine: #3f0e40;
  --slack-aubergine-dark: #350d36;
  --slack-hover: #350d36;
  --slack-selected: #1264a3;
  --ink: #1d1c1d;
  --muted: #616061;
  --line: #dddddd;
  --soft-line: #e8e8e8;
  --canvas: #f8f8f8;
  --white: #ffffff;
  --ziya-yellow: #ecbe1d;
  --ziya-blue: #32c5f4;
  --green: #007a5a;
  --amber: #d59b19;
  --blue: #1264a3;
  --shadow: 0 18px 55px rgba(29, 28, 29, 0.12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: "Lato", Arial, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* Slack-authenticated entry */
.login-view { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: var(--slack-aubergine); }
.login-panel { width: 100%; display: flex; flex-direction: column; justify-content: center; gap: 15px; }
.login-card { width: min(430px, 100%); margin: 0 auto; padding: 40px; border: 1px solid #e2dfe2; border-radius: 18px; background: white; box-shadow: var(--shadow); }
.card-logo { width: 155px; height: auto; margin-bottom: 30px; }
.channel-pill { display: block; width: fit-content; padding: 7px 10px; color: #4b334c; background: #f3eef3; border-radius: 6px; font-size: 12px; font-weight: 700; }.channel-pill b { color: var(--slack-aubergine); font-size: 16px; }
.login-card h1 { margin: 22px 0 9px; font: 800 26px "Manrope", sans-serif; letter-spacing: -.03em; }
.login-card > p { margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.slack-login { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 6px; color: white; background: #4a154b; display: flex; justify-content: center; align-items: center; gap: 12px; text-decoration: none; font-size: 16px; font-weight: 700; transition: background .15s, transform .15s; }
.slack-login:hover { background: #611f69; transform: translateY(-1px); }.slack-login svg { width: 22px; height: 22px; padding: 2px; border-radius: 3px; background: white; }
.login-foot { margin-top: 18px; color: #777; font-size: 11px; line-height: 1.45; text-align: center; }.lock { color: var(--green); font-size: 7px; }
.auth-error { margin: 0 0 15px; padding: 10px 12px; border: 1px solid #e7b3b3; border-radius: 6px; color: #8e1f1f; background: #fff4f4; font-size: 12px; }
.connect-card { width: min(430px, 100%); margin: 0 auto; padding: 16px 18px; border: 1px solid #e5d7b5; border-radius: 10px; background: #fffaf0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }.connect-card strong { font-size: 13px; }.connect-card p { margin: 4px 0 0; color: #725f39; font-size: 11px; }.connect-card a { flex: 0 0 auto; padding: 8px 11px; border-radius: 5px; color: white; background: var(--green); text-decoration: none; font-size: 12px; font-weight: 700; }

/* Authenticated Slack-style workspace */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 266px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; color: #fff; background: var(--slack-aubergine); display: flex; flex-direction: column; border-right: 1px solid #522653; }
.workspace-name { height: 72px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #522653; }
.workspace-name img { width: 145px; max-height: 54px; object-fit: contain; object-position: left; }
.sidebar-scroll { flex: 1; padding: 18px 0; }
.sidebar-section + .sidebar-section { margin-top: 25px; }
.section-title { padding: 0 18px 7px; color: #cfc3cf; font-size: 12px; font-weight: 700; }
.channel { display: flex; align-items: center; gap: 9px; padding: 6px 17px; color: #ddd1dd; text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.channel > span:first-child { font-size: 18px; font-weight: 400; }.channel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }.channel.active { color: white; background: var(--slack-selected); }
.sidebar-status { padding: 7px 18px; display: flex; align-items: center; gap: 8px; color: #ddd1dd; font-size: 12px; }.sidebar-status i, .sidebar-user span i { width: 8px; height: 8px; border-radius: 50%; background: #888; }.sidebar-status i.connected { background: #2eb67d; box-shadow: 0 0 0 3px rgba(46,182,125,.15); }.sidebar-status i.disconnected { background: #ecb22e; }
.sidebar-user { padding: 13px 16px; border-top: 1px solid #522653; background: var(--slack-aubergine-dark); display: flex; align-items: center; gap: 10px; }.sidebar-user img { width: 36px; height: 36px; border-radius: 7px; background: #704b71; object-fit: cover; }.sidebar-user div { min-width: 0; display: grid; gap: 3px; }.sidebar-user strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.sidebar-user span { display: flex; align-items: center; gap: 5px; color: #cfc3cf; font-size: 10px; }.sidebar-user span i { display: inline-block; width: 7px; height: 7px; background: #2eb67d; }
main { min-width: 0; background: var(--canvas); }
.channel-header { min-height: 72px; padding: 10px 24px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.channel-header h1 { margin: 0; font: 800 18px "Lato", sans-serif; }.channel-header h1 span { color: #777; font-weight: 400; }.channel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 8px; }.open-slack, .sync-button { padding: 8px 11px; border: 1px solid #cfcfcf; border-radius: 5px; color: #333; background: white; text-decoration: none; font-size: 11px; font-weight: 700; }.open-slack:hover, .sync-button:hover { background: #f8f8f8; }.sync-button { color: white; background: var(--slack-aubergine); border-color: var(--slack-aubergine); }.sync-button:hover { color: white; background: #522653; }.sync-button:disabled { opacity: .6; cursor: wait; }
.icon-button { width: 34px; height: 34px; border: 1px solid #cfcfcf; border-radius: 5px; color: #444; background: white; font-size: 18px; }.icon-button:hover { background: #f5f5f5; }
.user-menu { padding-left: 2px; display: flex; align-items: center; gap: 7px; }.user-menu img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: #eee; }.user-menu span { max-width: 110px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.user-menu a { color: #777; font-size: 10px; }
.channel-topic { min-height: 37px; padding: 8px 24px; color: #555; background: white; border-bottom: 1px solid var(--soft-line); font-size: 11px; }.channel-topic span { margin-right: 5px; }.channel-topic code { padding: 2px 5px; color: #4a154b; background: #f4eff4; border-radius: 3px; }
.content { padding: 27px clamp(20px, 4vw, 52px) 55px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric { min-width: 0; padding: 18px 20px; border: 1px solid var(--soft-line); border-radius: 9px; background: white; box-shadow: 0 2px 9px rgba(0,0,0,.03); }.metric-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }.dot { width: 7px; height: 7px; border-radius: 50%; }.dot.amber { background: var(--amber); }.dot.blue { background: var(--blue); }.dot.green { background: var(--green); }.metric strong { display: inline-block; margin-top: 7px; font: 800 24px "Manrope", sans-serif; letter-spacing: -.035em; }.metric-note { margin-left: 6px; color: #888; font-size: 11px; }
.queue { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 3px 14px rgba(0,0,0,.04); }
.queue-head { padding: 18px 20px; border-bottom: 1px solid var(--soft-line); display: flex; align-items: end; justify-content: space-between; gap: 18px; }.queue-head h2 { margin: 0; font: 800 15px "Lato", sans-serif; }.queue-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.queue-tools { display: flex; align-items: center; gap: 8px; }.search { height: 32px; min-width: 190px; padding: 0 9px; border: 1px solid #cfcfcf; border-radius: 6px; display: flex; align-items: center; gap: 6px; color: #777; background: white; }.search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }.filters { padding: 2px; border: 1px solid #ddd; border-radius: 6px; background: #f7f7f7; display: flex; }.filter { padding: 6px 9px; border: 0; border-radius: 4px; color: #616061; background: transparent; font-size: 10px; font-weight: 700; }.filter b { min-width: 16px; margin-left: 3px; padding: 1px 4px; border-radius: 8px; background: #e7e7e7; display: inline-block; font-size: 8px; }.filter.active { color: white; background: var(--slack-aubergine); }.filter.active b { color: var(--slack-aubergine); background: white; }
.request { padding: 20px; display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(185px, .28fr); gap: 12px; align-items: start; border-bottom: 1px solid #efefef; transition: background .12s; }.request:last-child { border-bottom: 0; }.request:hover { background: #fbfbfb; }.request.needs-review { box-shadow: inset 3px 0 #d59b19; }
.person { width: 42px; height: 42px; border-radius: 7px; background: #e7d7e8; object-fit: cover; }.request-body { min-width: 0; }.message-head { min-height: 20px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }.message-head strong { font-size: 14px; }.message-head a, .message-head span { color: #777; font-size: 10px; text-decoration: none; }.message-head a:hover { color: var(--blue); text-decoration: underline; }.request h3 { margin: 3px 0 8px; font-size: 13px; font-weight: 700; line-height: 1.35; }.source-copy { max-width: 780px; margin: 4px 0 0; color: #454245; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }.line-items { max-width: 720px; border: 1px solid #e2e2e2; border-radius: 6px; overflow: hidden; }.line-item { min-height: 30px; padding: 6px 10px; display: flex; justify-content: space-between; gap: 20px; color: #454245; background: #fff; font-size: 11px; }.line-item + .line-item { border-top: 1px solid #ededed; }.line-item > span { display: grid; gap: 2px; }.line-item small { color: #777; font-size: 9px; }.line-item strong { flex: 0 0 auto; color: var(--ink); font-family: "Manrope", sans-serif; font-size: 10px; }.receipts { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }.receipt { width: 126px; min-height: 40px; border: 1px solid #d6d6d6; border-radius: 7px; color: #1264a3; background: white; overflow: hidden; display: flex; text-decoration: none; }.receipt.image { height: 104px; position: relative; }.receipt.image img { width: 100%; height: 100%; object-fit: cover; }.receipt.image span { position: absolute; inset: auto 0 0; padding: 20px 7px 6px; color: white; background: linear-gradient(transparent, rgba(0,0,0,.78)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }.receipt.file { width: auto; max-width: 240px; padding: 8px 10px; align-items: center; gap: 7px; font-size: 10px; }.file-icon { width: 24px; height: 24px; border-radius: 5px; color: white; background: var(--blue); display: grid; place-items: center; }.audit { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px 10px; color: #6b6b6b; font-size: 9px; }.audit span:first-child { color: var(--green); }.deleted-note { margin-bottom: 8px; padding: 6px 8px; border-left: 3px solid #e01e5a; color: #7a263e; background: #fff4f7; font-size: 10px; }
.request-finance { min-width: 0; padding-left: 16px; border-left: 1px solid #ebebeb; display: grid; justify-items: end; gap: 6px; }.amount { font: 800 15px "Manrope", sans-serif; white-space: nowrap; }.amount.unresolved { color: #9a6500; font-size: 12px; }.category { color: var(--muted); font-size: 9px; text-align: right; }.status { width: fit-content; padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }.status.new { color: #805900; background: #fff1c7; }.status.seen { color: #07517e; background: #e2f2fb; }.status.paid { color: #006644; background: #dff6ec; }.actions { margin-top: 6px; display: flex; justify-content: flex-end; gap: 6px; }.action { min-width: 58px; padding: 7px 10px; border: 1px solid #b7b7b7; border-radius: 5px; color: #333; background: white; font-size: 10px; font-weight: 700; white-space: nowrap; }.action:hover { border-color: #777; background: #fafafa; }.action.primary { color: white; background: #007a5a; border-color: #007a5a; }.action.primary:hover { background: #148567; }.action:disabled { opacity: .55; cursor: wait; }
.amount-form { width: 100%; margin-top: 7px; }.amount-form label { margin-bottom: 4px; color: #765400; display: block; font-size: 9px; font-weight: 700; text-align: right; }.amount-form > div { height: 31px; border: 1px solid #c8a54c; border-radius: 5px; display: flex; overflow: hidden; }.amount-form span { padding: 8px 6px; color: #765400; background: #fff7df; font-size: 9px; font-weight: 800; }.amount-form input { min-width: 0; width: 76px; padding: 6px; border: 0; outline: 0; font-size: 10px; }.amount-form button { padding: 0 9px; border: 0; color: white; background: var(--slack-aubergine); font-size: 9px; font-weight: 800; }
.identity-hold { margin-top: 8px; padding: 7px 8px; border: 1px solid #e7c86f; border-radius: 5px; color: #765400; background: #fff8e5; font-size: 9px; line-height: 1.35; }
.notice { margin: 12px 18px 0; padding: 10px 12px; border: 1px solid #ecd89f; border-radius: 5px; color: #6f5620; background: #fff9e8; font-size: 11px; }.notice[data-tone="success"] { color: #006644; border-color: #9bd7c1; background: #effbf6; }.empty { padding: 70px 20px; text-align: center; color: var(--muted); }.empty-icon { width: 44px; height: 44px; margin: 0 auto 13px; border-radius: 9px; color: white; background: var(--green); display: grid; place-items: center; font-size: 20px; }.empty h3 { margin: 0; color: var(--ink); font: 800 14px "Lato", sans-serif; }.empty p { margin: 7px 0 0; font-size: 11px; }.loading { min-height: 180px; display: flex; justify-content: center; align-items: center; gap: 5px; }.loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--slack-aubergine); animation: pulse 1s infinite alternate; }.loading span:nth-child(2) { animation-delay: .2s; }.loading span:nth-child(3) { animation-delay: .4s; }@keyframes pulse { to { opacity: .25; transform: translateY(-4px); } }

@media (max-width: 980px) {
  .login-panel { padding: 45px 24px; }
  .app-shell { grid-template-columns: 214px minmax(0,1fr); }.workspace-name img { width: 105px; }.channel { font-size: 12px; padding-left: 13px; }.queue-head { align-items: flex-start; flex-direction: column; }.queue-tools { width: 100%; justify-content: space-between; }.request { grid-template-columns: 38px minmax(0, 1fr); }.person { width: 38px; height: 38px; }.request-finance { grid-column: 2; padding: 10px 0 0; border: 0; border-top: 1px solid #ededed; justify-items: start; }.category, .amount-form label { text-align: left; }.actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .login-card { padding: 28px 22px; }
  .app-shell { display: block; }.sidebar { display: none; }.channel-header { padding: 10px 14px; align-items: flex-start; }.channel-header h1 { font-size: 14px; }.channel-header p, .open-slack, .sync-button, .user-menu span, .user-menu a { display: none; }.channel-topic { padding: 8px 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.content { padding: 16px 10px 35px; }.summary { grid-template-columns: 1fr 1fr; }.metric:last-child { grid-column: 1/-1; }.queue-tools { align-items: stretch; flex-direction: column; }.search { width: 100%; }.filters { width: 100%; }.filter { flex: 1; padding-inline: 5px; }.request { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 15px 12px; }.person { width: 34px; height: 34px; }.request-finance { grid-column: 1/-1; }.line-item { gap: 8px; }.receipt.image { width: 105px; height: 88px; }.user-menu img { width: 31px; height: 31px; }
}

/* Finance reconciliation */
.identity-warning { padding: 2px 5px; border-radius: 4px; color: #8a5b00 !important; background: #fff4cf; font-weight: 700; }
.line-items-head { min-height: 25px; padding: 6px 10px; color: #777; background: #f8f8f8; border-bottom: 1px solid #e7e7e7; display: flex; justify-content: space-between; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.payment-detail { width: fit-content; max-width: 100%; margin-top: 9px; padding: 7px 9px; border: 1px solid #dfe7e4; border-radius: 6px; background: #f5faf8; display: flex; align-items: baseline; gap: 8px; font-size: 10px; }
.payment-detail span { color: #61706a; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.payment-detail strong { color: #143d31; overflow-wrap: anywhere; }
.receipts { align-items: flex-start; }
.receipts-label { width: 100%; color: #777; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.receipt { padding: 0; text-align: left; font: inherit; cursor: pointer; }
.receipt.image { width: 154px; height: 126px; border-color: #c9c9c9; }
.receipt.image span { z-index: 2; padding: 30px 9px 22px; font-size: 10px; font-weight: 800; }
.receipt.image small { position: absolute; z-index: 2; inset: auto 9px 7px; color: rgba(255,255,255,.82); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 8px; }
.receipt.image.preview-unavailable { padding: 16px 12px 28px; color: #1264a3; background: #f3f7fa; align-items: center; justify-content: center; }
.receipt.image.preview-unavailable::before { content: "↗"; width: 28px; height: 28px; margin-right: 7px; border-radius: 6px; color: white; background: var(--blue); display: grid; place-items: center; font-weight: 900; }
.receipt.image.preview-unavailable span { position: static; padding: 0; color: #1264a3; background: none; }
.receipt.image.preview-unavailable small { color: #617584; inset: auto 12px 9px; text-align: center; }
.reconciliation-card { width: 100%; min-width: 195px; border: 1px solid #e2e2e2; border-radius: 7px; overflow: hidden; background: white; }
.reconciliation-head, .money-row { min-height: 29px; padding: 6px 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reconciliation-head { background: #f7f7f7; border-bottom: 1px solid #e5e5e5; color: #555; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.money-row { color: #666; font-size: 9px; }
.money-row + .money-row { border-top: 1px solid #efefef; }
.money-row strong { color: var(--ink); font: 800 10px "Manrope", sans-serif; }
.money-row.difference { color: #8a3d00; background: #fff8ed; }
.money-row.difference strong { color: #a04400; }
.reconciliation-state { padding: 3px 5px; border-radius: 4px; font-size: 8px; }
.reconciliation-state.matched, .reconciliation-state.confirmed { color: #006644; background: #dff6ec; }
.reconciliation-state.mismatch { color: #9b2c00; background: #ffe8dc; }
.reconciliation-state.review { color: #805900; background: #fff1c7; }
.request-finance { min-width: 220px; }
.request-finance .amount { margin-bottom: 2px; }
.request-finance .category { max-width: 225px; line-height: 1.35; }
.amount-form > div { height: 34px; }
.amount-form input { flex: 1; width: auto; }
.actions:empty { display: none; }

/* Dialogs */
.modal { width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; color: var(--ink); background: transparent; box-shadow: 0 22px 75px rgba(0,0,0,.34); }
.modal::backdrop { background: rgba(20, 10, 21, .58); backdrop-filter: blur(2px); }
.modal-card { padding: 22px; background: white; }
.modal-head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 3px 0 0; font: 800 19px "Manrope", sans-serif; }
.eyebrow { color: #777; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 5px; color: #555; background: #f1f1f1; font-size: 20px; line-height: 1; }
.payment-summary { margin-bottom: 17px; padding: 14px; border-radius: 8px; background: #f5f1f5; display: grid; gap: 4px; }
.payment-summary strong { color: var(--slack-aubergine); font: 800 22px "Manrope", sans-serif; }
.payment-summary span { font-weight: 800; }
.payment-summary small { color: #666; }
.field { display: grid; gap: 7px; font-size: 11px; font-weight: 800; }
.field input { height: 42px; padding: 9px 11px; border: 1px solid #aaa; border-radius: 6px; outline: 0; font-size: 13px; }
.field input:focus { border-color: #1264a3; box-shadow: 0 0 0 3px rgba(18,100,163,.14); }
.field small { color: #777; font-size: 9px; font-weight: 400; line-height: 1.4; }
.modal-error { margin-top: 12px; padding: 9px 10px; border-radius: 5px; color: #8a1838; background: #fff0f4; font-size: 10px; }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions button, .button-link { min-height: 36px; padding: 9px 13px; border: 1px solid #aaa; border-radius: 5px; font-size: 11px; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.modal-actions .secondary { color: #333; background: white; }
.modal-actions .primary, .button-link.primary { color: white; border-color: var(--green); background: var(--green); }
.modal-actions button:disabled { opacity: .6; cursor: wait; }
.receipt-modal { width: min(850px, calc(100vw - 28px)); }
.receipt-stage { min-height: 300px; max-height: calc(100vh - 210px); border-radius: 8px; background: #222; overflow: auto; display: grid; place-items: center; }
.receipt-stage img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.receipt-stage > div { padding: 60px 20px; color: white; text-align: center; display: grid; gap: 7px; }
.receipt-stage > div span { color: #ccc; font-size: 11px; }

@media (max-width: 980px) {
  .request-finance { min-width: 0; width: 100%; }
  .reconciliation-card { width: min(360px, 100%); }
  .request-finance .category { max-width: 100%; text-align: left; }
}

@media (max-width: 700px) {
  .receipt.image { width: 130px; height: 110px; }
  .modal-card { padding: 18px; }
  .receipt-stage { min-height: 220px; }
}
