.is-hidden { display: none !important; }
.live-app .app-shell { min-height: 100vh; }
.live-app .sidebar { top: 0; }
.auth-screen { min-height: 100vh; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr); }
.auth-intro { position: relative; display: flex; flex-direction: column; min-height: 100vh; padding: 35px 45px; color: #fff; background: radial-gradient(circle at 90% 10%, #2b5797 0, transparent 42%), linear-gradient(145deg, #1a3a6b, #0f2345); overflow: hidden; }
.auth-intro::after { content: ""; position: absolute; right: -120px; bottom: -185px; width: 470px; height: 470px; border: 1px solid #ffffff21; border-radius: 50%; box-shadow: 0 0 0 53px #ffffff0a, 0 0 0 108px #ffffff08; }
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.auth-brand .corporate-logo { width: 98px; height: 82px; }
.auth-product-label { padding: 7px 10px; border-left: 3px solid #c1272d; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.auth-message { position: relative; z-index: 1; max-width: 430px; margin: auto 0; }
.auth-message .eyebrow { color: #f5c268; }
.auth-message h1 { max-width: 390px; font-size: clamp(33px, 3.3vw, 52px); line-height: 1.15; letter-spacing: -.06em; }
.auth-message p:last-child { max-width: 355px; margin-top: 18px; color: #d6e2f3; font-size: 13px; line-height: 1.7; }
.auth-foot { position: relative; z-index: 1; color: #b9cbe4; font-size: 11px; }
.auth-form-side { display: grid; place-items: center; padding: 36px 20px; }
.auth-card { width: min(390px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.035em; }
.auth-card > p, .auth-card form > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-card .field { margin-top: 18px; }
.auth-card .field label { font-size: 13px; }
.auth-card .field input { height: 48px; font-size: 15px; }
.auth-card .button { margin-top: 20px; }
.auth-card .form-error { min-height: 20px; font-size: 13px; }
.auth-card .auth-support { margin-top: 17px; color: #687386; font-size: 13px; text-align: center; }
.loading-spinner { width: 29px; height: 29px; margin: 0 auto 14px; border: 3px solid #e7eaf0; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-card:has(.loading-spinner) { text-align: center; }
.role-switch.is-hidden + .nav-section-label { margin-top: 18px; }
.top-logout { min-height: 28px; font-size: 9px; }
.loading-panel { display: grid; justify-items: center; gap: 8px; padding: 38px 18px; color: var(--muted); font-size: 14px; }
.loading-panel .loading-spinner { margin: 0 0 2px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.inbox-section-header { padding: 15px 16px 0; }
.item-sub { color: #687386; font-size: 12px; font-weight: 400; }
.back-link { border: 0; padding: 0; background: transparent; cursor: pointer; }
.list-controls { display: flex; gap: 8px; align-items: center; }
.list-controls .search-box { min-width: 220px; height: 34px; }
.list-controls .filter-select { height: 34px; }
.button-refresh { min-height: 34px; }
.request-card { cursor: default; }
.request-open { justify-self: end; }
.inbox-open { display: flex; justify-content: flex-end; gap: 7px; }
.inbox-card { grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(110px, .65fr) auto; }
.inbox-card .button { min-width: 63px; }
.live-app .line-head, .live-app .line-row { grid-template-columns: minmax(140px, 1fr) 75px 91px 28px; }
.line-item { border-top: 1px solid #eff2ef; }
.line-item .line-row { border-top: 0; }
.line-spec { margin: 0 8px 10px; color: #667386; font-size: 13px; }
.line-spec summary { width: fit-content; cursor: pointer; color: var(--green); }
.line-spec label { display: block; margin: 8px 0 5px; }
.line-spec input { width: 100%; border: 1px solid #dfe6e0; border-radius: 7px; padding: 10px 12px; color: var(--ink); background: #fff; font-size: 14px; }
.live-app .manual-form { grid-template-columns: 1.5fr .7fr .65fr auto; }
.status-line { color: #687386; font-size: 13px; }
.detail-reason strong { color: #42574b; }
.detail-warning { padding: 11px 12px; border-radius: 8px; color: #8a662e; background: #fff6e8; font-size: 13px; line-height: 1.55; }
.detail-warning.error { color: #ac564d; background: #fff0ee; }
.catalog-results { max-height: 260px; overflow-y: auto; }
.catalog-result:disabled { opacity: .65; cursor: not-allowed; }
.manual-add { min-height: 34px; }
.role-button:disabled { cursor: default; }
.role-button:disabled:hover { background: #fff; }
.status-chip.status-wait { color: #7d6d9b; background: #f1eef8; }
.status-chip.status-approved { color: #39765a; background: #eaf4eb; }
.status-chip.status-ordered { color: #396b91; background: #eaf2f9; }
.banner-note { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #dbe9dd; border-radius: 9px; color: #4d715a; background: #f0f7ee; font-size: 10px; }
.quantity-error { color: var(--red); font-size: 9px; margin-top: 5px; }
.form-error:empty, .quantity-error:empty { display: none; }
@media (max-width: 840px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { min-height: 230px; padding: 22px 23px; }
  .auth-message { margin: 33px 0 9px; }
  .auth-message h1 { font-size: 29px; }
  .auth-message p:last-child { margin-top: 10px; font-size: 11px; }
  .auth-foot { display: none; }
  .auth-form-side { padding: 22px 14px 36px; }
  .auth-card { padding: 23px; }
  .live-app .sidebar { padding-bottom: 12px; }
  .live-app .workspace-label, .live-app .nav-section-label { display: none; }
  .live-app .side-nav { display: flex; gap: 5px; overflow-x: auto; }
  .live-app .nav-link { flex: 0 0 auto; width: auto; justify-content: center; padding: 7px 8px; white-space: nowrap; font-size: 10px; }
  .live-app .nav-icon { width: auto; }
  .live-app .role-switch { margin: 0 0 8px; }
  .live-app .role-switch.is-hidden { display: none !important; }
  .top-logout { padding: 0 8px; }
  .list-controls { width: 100%; flex-wrap: wrap; }
  .list-controls .search-box { flex: 1; min-width: 140px; }
  .inbox-card { grid-template-columns: 1fr auto; }
  .inbox-card .inbox-open { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; }
  .live-app .line-head, .live-app .line-row { grid-template-columns: minmax(100px, 1fr) 60px 48px 25px; }
  .live-app .manual-form.open { grid-template-columns: 1fr 1fr; }
  .live-app .manual-form .field:first-child { grid-column: 1 / -1; }
  .live-app .manual-form .manual-add { grid-column: 2; }
}

/* Tahap 4 sourcing UI */
.stage4-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.stage4-card { padding: 1.1rem; display: grid; gap: .55rem; }
.stage4-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.stage4-card p, .stage4-card small { color: var(--muted, #667085); margin: 0; }
.stage4-card .button { margin-top: .5rem; }
.stage4-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.stage4-input { width: 100%; min-height: 2.55rem; border: 1px solid var(--line, #d9dee8); border-radius: .6rem; padding: .55rem .7rem; background: #fff; color: inherit; }
.stage4-list-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line, #e4e7ec); }
.stage4-list-row small { display: block; color: var(--muted, #667085); margin-top: .2rem; }
.stage4-quote { border: 1px solid var(--line, #e4e7ec); border-radius: .75rem; padding: 1rem; margin-bottom: .85rem; }
.stage4-quote-items { display: grid; gap: .55rem; margin: .8rem 0; }
.stage4-quote-items label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.stage4-quote-items .stage4-input { max-width: 130px; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.stage4-spaced { margin-top: .65rem; }
@media (max-width: 700px) { .stage4-list-row { grid-template-columns: 1fr auto; } .stage4-list-row .button { grid-column: 2; } .stage4-quote-items label { align-items: flex-start; flex-direction: column; } .stage4-quote-items .stage4-input { max-width: none; } }

/* Tahap 5 customer quotation and approval */
.stage5-quote-lines { display: grid; gap: .7rem; margin: 1rem 0; }
.stage5-quote-line { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 150px 32px; gap: .7rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line, #e4e7ec); }
.stage5-quote-line small { display: block; margin-top: .2rem; color: var(--muted, #667085); }
.stage5-total { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--line, #e4e7ec); }
.stage5-total strong { font-size: 1.15rem; color: var(--green, #386b4f); }
.stage5-hash { display: grid; gap: .35rem; margin-bottom: 1rem; padding: .8rem; border-radius: .65rem; background: #f0f7ee; color: #356449; }
.stage5-hash.invalid { background: #fff0ee; color: #a33e34; }
.stage5-hash code { overflow-wrap: anywhere; color: inherit; font-size: .72rem; }
.mfa-panel { display: grid; gap: .75rem; max-width: 460px; }
.mfa-panel h3, .mfa-panel p { margin: 0; }
.mfa-panel code { overflow-wrap: anywhere; padding: .65rem; border-radius: .5rem; background: #f4f6f8; }
.mfa-qr { width: min(220px, 100%); aspect-ratio: 1; background: #fff; }
.button-danger { color: #fff; border-color: #a43b34; background: #a43b34; }
@media (max-width: 700px) { .stage5-quote-line { grid-template-columns: 1fr 90px; } .stage5-quote-line .stage4-input:nth-of-type(2) { grid-column: 1; } }
@media print { .sidebar, .topbar, .app-footer, .no-print { display: none !important; } .main-area, .content-wrap { margin: 0 !important; padding: 0 !important; } .panel { box-shadow: none !important; } }
@media (max-width: 480px) { .topbar .environment-tag { display: none; } .topbar .breadcrumbs { min-width: 0; } .topbar .breadcrumbs strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

@media (max-width: 840px) {
  .corporate-logo { width: 84px; height: 70px; }
  .brand { padding-bottom: 15px; }
  .auth-brand .corporate-logo { width: 80px; height: 67px; }
}
.notification-menu { position: relative; }
.notification-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line, #d8dee8); border-radius: 12px; background: var(--surface, #fff); color: var(--ink, #1b2b44); font-size: 1.35rem; cursor: pointer; }
.notification-toggle:hover { background: var(--surface-muted, #f4f7fb); }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--surface, #fff); border-radius: 999px; background: #cf3f52; color: #fff; font-size: .65rem; font-weight: 800; line-height: 14px; text-align: center; }
.notification-panel { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: min(390px, calc(100vw - 32px)); max-height: 440px; overflow: auto; padding: 12px; border: 1px solid var(--line, #d8dee8); border-radius: 16px; background: var(--surface, #fff); box-shadow: 0 18px 45px rgb(25 43 70 / 18%); }
.notification-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line, #e5e9f0); }
.notification-panel-head span, .notification-item small { color: var(--muted, #65748b); font-size: .75rem; }
.notification-list { display: grid; gap: 2px; }
.notification-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line, #eef1f5); }
.notification-item:last-child { border-bottom: 0; }
.notification-item > div { min-width: 0; display: grid; gap: 4px; }
.notification-item strong { font-size: .86rem; }
.notification-item.is-read { opacity: .62; }
.notification-read { flex: 0 0 auto; border: 0; background: transparent; color: var(--accent, #1a5c9e); font: inherit; font-size: .73rem; cursor: pointer; }
.notification-empty { padding: 24px 12px; color: var(--muted, #65748b); text-align: center; font-size: .86rem; }
@media (max-width: 640px) { .notification-panel { position: fixed; top: 68px; right: 16px; } }
.receipt-entry { display: grid; gap: 10px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
