.instrument-booking-root {
  /* This class is applied to the window body itself. Keep it in the window
     manager's flex layout so it cannot cover the native title bar/controls. */
  position: relative;
  inset: auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f4f5f7;
  color: #172027;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ib-app { position: absolute; inset: 0; display: flex; flex-direction: column; background: #f5f6f7; }
.ib-header { min-height: 68px; padding: 0 24px; display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); align-items: center; gap: 20px; background: #fff; border-bottom: 1px solid #e4e7e8; flex: 0 0 auto; }
.ib-brand { display: flex; align-items: center; gap: 10px; }
.ib-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #112f2c; color: #d7f36c; font: 800 17px/1 Georgia, serif; }
.ib-brand > div:last-child { display: grid; line-height: 1.15; }
.ib-brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; letter-spacing: -.01em; }
.ib-brand span { color: #7b8488; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; margin-top: 3px; }
.ib-top-nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.ib-nav { position: relative; height: 100%; padding: 0 15px; display: inline-flex; align-items: center; gap: 7px; color: #697378; font-size: 12.5px; font-weight: 600; background: transparent; }
.ib-nav:hover { color: #1c2928; }
.ib-nav.active { color: #0f3732; }
.ib-nav.active::after { content: ""; position: absolute; height: 3px; border-radius: 3px 3px 0 0; background: #a8c942; bottom: 0; left: 13px; right: 13px; }
.ib-nav-icon { font-size: 15px; }
.ib-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ib-demo-badge,.ib-live-badge { padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.ib-demo-badge { background: #fff4d6; color: #8b5d00; border: 1px solid #efd89a; }
.ib-live-badge { background: #e5f5ec; color: #1c6a46; border: 1px solid #bddfc9; }
.ib-btn { min-height: 34px; padding: 7px 13px; border-radius: 7px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; transition: .14s ease; white-space: nowrap; }
.ib-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ib-btn:disabled { opacity: .45; cursor: not-allowed; }
.ib-btn.primary { background: #143f3a; color: #fff; box-shadow: 0 2px 8px rgba(20,63,58,.14); }
.ib-btn.primary:hover:not(:disabled) { background: #0c312d; }
.ib-btn.secondary { background: #fff; color: #31403f; border-color: #d7dddc; }
.ib-btn.secondary:hover:not(:disabled) { border-color: #aab7b4; background: #fafbfb; }
.ib-btn.danger { background: #fff; color: #ad3636; border-color: #e9bcbc; margin-right: auto; }
.ib-main { flex: 1; min-height: 0; overflow: auto; padding: 28px clamp(20px, 3vw, 46px) 40px; }
.ib-page-title { max-width: 1500px; margin: 0 auto 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ib-page-title h1 { font: 500 clamp(27px, 2.6vw, 39px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 3px 0 7px; color: #172c2a; }
.ib-page-title p { color: #6c777b; font-size: 13px; margin: 0; }
.ib-eyebrow { display: block; color: #789026; font-size: 9px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.ib-title-actions { display: flex; gap: 6px; }
.ib-notice { max-width: 1500px; margin: -8px auto 14px; padding: 10px 13px; display: flex; gap: 9px; align-items: center; background: #fcf9ed; border: 1px solid #e9dfb5; color: #6f622e; border-radius: 8px; font-size: 11.5px; }
.ib-notice > span:first-child { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #aa9439; font: 700 11px Georgia; }
.ib-controls { max-width: 1500px; min-height: 54px; margin: 0 auto 12px; padding: 9px; display: flex; gap: 9px; align-items: center; background: #fff; border: 1px solid #e1e5e5; border-radius: 10px; }
.ib-search { min-width: 240px; flex: 1; height: 34px; border: 1px solid #dfe4e4; border-radius: 7px; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: #fafbfb; color: #7b8588; }
.ib-search input { border: 0; outline: 0; min-width: 0; flex: 1; background: transparent; color: #172027; font: inherit; font-size: 12px; }
.ib-filter { height: 34px; min-width: 175px; max-width: 265px; padding: 0 30px 0 10px; border: 1px solid #dfe4e4; border-radius: 7px; background: #fff; color: #394544; font-size: 11.5px; }
.ib-result-count { color: #7b8588; font-size: 11px; padding: 0 7px; }
.ib-legend { display: flex; gap: 14px; color: #778084; font-size: 10.5px; padding: 0 7px; }
.ib-legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.ib-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: #476d68; }
.ib-legend i.pending { background: #e7b44d; }
.ib-legend i.maintenance { background: repeating-linear-gradient(135deg,#c6cbcd,#c6cbcd 2px,#edf0f0 2px,#edf0f0 4px); }
.ib-calendar { max-width: 1500px; min-width: 930px; margin: 0 auto; background: #fff; border: 1px solid #dfe4e4; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(34,54,50,.035); }
.ib-calendar-head,.ib-calendar-row { display: grid; grid-template-columns: 245px repeat(5, minmax(135px,1fr)); }
.ib-calendar-head { min-height: 54px; border-bottom: 1px solid #dfe4e4; }
.ib-resource-head { padding: 0 16px; display: flex; align-items: center; color: #8a9396; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ib-day-head { display: flex; align-items: center; justify-content: center; gap: 7px; border-left: 1px solid #edf0f0; color: #778084; text-transform: uppercase; font-size: 9.5px; letter-spacing: .06em; }
.ib-day-head strong { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #30403e; font: 600 15px Georgia; }
.ib-day-head.today strong { background: #d9ed7e; color: #1b3f3a; }
.ib-calendar-row { min-height: 86px; border-bottom: 1px solid #edf0f0; }
.ib-calendar-row:last-child { border-bottom: 0; }
.ib-resource { padding: 11px 13px; display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center; text-align: left; background: #fff; }
.ib-resource:hover { background: #fafcfa; }
.ib-resource-color { width: 5px; height: 34px; border-radius: 4px; background: var(--instrument); display: inline-block; flex: 0 0 auto; }
.ib-resource > span:nth-child(2),.ib-detail-instrument > div { min-width: 0; display: grid; gap: 3px; }
.ib-resource strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #253231; }
.ib-resource small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #859093; font-size: 9.5px; }
.ib-status { padding: 3px 6px; border-radius: 999px; font-style: normal; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #edf1f1; color: #677274; }
.ib-status.available { background: #e8f4e9; color: #367343; }
.ib-status.maintenance { background: #fff0d8; color: #945c0a; }
.ib-status.offline { background: #f1e9e9; color: #8b4c4c; }
.ib-day-cell { position: relative; min-height: 86px; border-left: 1px solid #edf0f0; cursor: crosshair; background-image: linear-gradient(90deg, transparent 49.5%, #f1f3f3 50%, transparent 50.5%); }
.ib-day-cell:hover:not(.unavailable) { background-color: #fbfdf9; }
.ib-day-cell.unavailable { cursor: not-allowed; background: repeating-linear-gradient(135deg,#f7f8f8,#f7f8f8 6px,#eef1f1 6px,#eef1f1 8px); display: grid; place-items: center; }
.ib-unavailable-label { color: #899295; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.ib-event { position: absolute; z-index: 2; left: 5px; right: 5px; min-height: 25px; overflow: hidden; padding: 4px 6px; border-left: 3px solid var(--instrument); border-radius: 4px; text-align: left; background: color-mix(in srgb, var(--instrument) 13%, #fff); color: #233431; }
.ib-event:hover { filter: saturate(1.3) brightness(.98); z-index: 3; }
.ib-event.pending { border-left-style: dashed; background: #fff8e8; }
.ib-event strong,.ib-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-event strong { font-size: 9.5px; }
.ib-event span { margin-top: 2px; font-size: 8.5px; color: #64716f; }
.ib-instrument-grid { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 14px; }
.ib-instrument-card { padding: 17px; background: #fff; border: 1px solid #dfe4e4; border-radius: 11px; box-shadow: 0 6px 22px rgba(27,51,47,.03); }
.ib-instrument-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.ib-instrument-icon { width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb,var(--instrument) 13%,#fff); color: var(--instrument); font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.ib-code { display: block; margin: 15px 0 4px; color: #8c9699; font-size: 8.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.ib-instrument-card h3 { margin: 0; color: #233432; font: 600 18px/1.2 Georgia, serif; }
.ib-model { color: #61706e; font-size: 10.5px; margin: 5px 0 10px; }
.ib-description { min-height: 34px; color: #7d878a; font-size: 10.5px; line-height: 1.5; }
.ib-card-meta { display: grid; gap: 6px; margin: 13px 0; color: #687573; font-size: 10px; }
.ib-card-meta span { display: flex; gap: 6px; }
.ib-card-next { margin: 0 -17px; padding: 10px 17px; display: grid; gap: 3px; background: #f8f9f9; border-block: 1px solid #edf0f0; }
.ib-card-next span { color: #8a9396; font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; }
.ib-card-next strong { font-size: 10px; color: #45514f; }
.ib-card-actions { display: grid; grid-template-columns: 1fr .7fr; gap: 8px; margin-top: 14px; }
.ib-stats { max-width: 1500px; margin: 0 auto 22px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.ib-stats > div { padding: 15px 18px; display: grid; gap: 4px; background: #fff; border: 1px solid #e0e5e4; border-radius: 9px; }
.ib-stats span { color: #7c8789; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.ib-stats strong { color: #21403b; font: 500 24px Georgia,serif; }
.ib-section-title { max-width: 1500px; margin: 0 auto 10px; font: 600 16px Georgia,serif; color: #243b37; }
.ib-booking-list { max-width: 1500px; margin: 0 auto 20px; display: grid; gap: 8px; }
.ib-booking-row { padding: 12px 14px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; background: #fff; border: 1px solid #e0e5e4; border-radius: 9px; }
.ib-date-tile { width: 45px; height: 49px; display: grid; place-items: center; align-content: center; border-radius: 8px; background: #eef3db; color: #315049; }
.ib-date-tile span { font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ib-date-tile strong { font: 600 20px Georgia; }
.ib-booking-info { min-width: 0; }
.ib-booking-info > div { display: flex; align-items: center; gap: 8px; }
.ib-booking-info h3 { margin: 0; font: 600 15px Georgia; color: #263936; }
.ib-booking-info p { margin: 3px 0; color: #394946; font-size: 11px; }
.ib-booking-info > span { color: #818b8d; font-size: 9.5px; }
.ib-booking-state { padding: 3px 6px; border-radius: 4px; background: #e7f4e9; color: #347142; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.ib-booking-state.pending { background: #fff1ce; color: #8a5c00; }
.ib-past { max-width: 1500px; margin: 0 auto; color: #63706e; font-size: 11px; }
.ib-past summary { padding: 10px 0; cursor: pointer; font-weight: 700; }
.ib-empty { max-width: 1500px; min-height: 150px; margin: 18px auto; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: #7d888a; background: #fff; border: 1px dashed #ccd3d2; border-radius: 10px; font-size: 11px; }
.ib-empty strong { color: #344542; font: 600 17px Georgia; }
.ib-admin-callout { max-width: 1500px; margin: 0 auto 14px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #f7f5e9; border: 1px solid #e3ddbd; border-radius: 9px; }
.ib-admin-callout strong { font: 600 14px Georgia; color: #4f4a2c; }
.ib-admin-callout p { margin: 4px 0 0; color: #766f48; font-size: 10.5px; }
.ib-admin-callout > span { padding: 5px 8px; border-radius: 5px; background: #fff; color: #76640d; font-size: 9px; font-weight: 800; white-space: nowrap; }
.ib-admin-grid { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.ib-panel { background: #fff; border: 1px solid #e0e5e4; border-radius: 10px; overflow: hidden; }
.ib-panel-head { min-height: 50px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f0; }
.ib-panel-head h2 { margin: 0; font: 600 15px Georgia; }
.ib-panel-head span { color: #8a9496; font-size: 9px; }
.ib-admin-row { min-height: 59px; padding: 8px 15px; display: grid; grid-template-columns: 5px 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid #f0f2f2; }
.ib-admin-row:last-child { border: 0; }
.ib-admin-row > div { display: grid; gap: 3px; }
.ib-admin-row strong { font-size: 10.5px; }
.ib-admin-row span:not(.ib-resource-color):not(.ib-status) { color: #818b8d; font-size: 9px; }
.ib-checklist { list-style: none; margin: 0; padding: 7px 15px 15px; }
.ib-checklist li { padding: 10px 0; display: grid; grid-template-columns: 24px 1fr; gap: 8px; border-bottom: 1px solid #f0f2f2; }
.ib-checklist li:last-child { border: 0; }
.ib-checklist li > span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: #eef1f1; color: #7a8587; font-size: 10px; }
.ib-checklist li.done > span { background: #e9f4e6; color: #4d813f; }
.ib-checklist li div { display: grid; gap: 3px; }
.ib-checklist strong { font-size: 10px; }
.ib-checklist small { color: #818b8d; font-size: 9px; }
.ib-loading { flex: 1; display: grid; place-items: center; align-content: center; gap: 13px; color: #556360; font: 500 14px Georgia; }
.ib-loader { width: 28px; height: 28px; border: 3px solid #dce3e2; border-top-color: #8cae29; border-radius: 50%; animation: ib-spin .8s linear infinite; }
@keyframes ib-spin { to { transform: rotate(360deg); } }
.ib-modal-backdrop { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px; background: rgba(16,30,28,.48); backdrop-filter: blur(3px); }
.ib-modal { width: min(590px, 96vw); max-height: min(850px, 94vh); overflow: auto; background: #fff; color: #172027; border-radius: 13px; box-shadow: 0 30px 90px rgba(13,31,28,.3); }
.ib-modal-head { padding: 20px 22px 15px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #e8ebeb; }
.ib-modal-head h2 { margin: 4px 0 0; font: 500 25px Georgia; color: #19332f; }
.ib-icon-btn { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; color: #6d7779; background: #f2f4f4; font-size: 19px; }
.ib-modal-body { padding: 18px 22px; }
.ib-modal-foot { padding: 13px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.ib-field { display: grid; gap: 5px; margin-bottom: 13px; }
.ib-field > span { color: #596562; font-size: 10px; font-weight: 700; }
.ib-input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #d6dcdb; border-radius: 7px; background: #fbfcfc; color: #1c2928; outline: 0; font: inherit; font-size: 11.5px; }
.ib-input:focus { border-color: #789b31; box-shadow: 0 0 0 3px rgba(134,166,50,.12); }
.ib-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ib-booking-summary { min-height: 55px; margin: -3px 0 14px; padding: 10px 11px; display: grid; grid-template-columns: 5px 1fr auto; align-items: center; gap: 10px; background: #f6f8f7; border: 1px solid #e6e9e9; border-radius: 8px; }
.ib-summary-mark { width: 5px; height: 31px; border-radius: 3px; background: var(--instrument); }
.ib-booking-summary > div:nth-child(2) { display: grid; gap: 3px; }
.ib-booking-summary strong { font-size: 10.5px; }
.ib-booking-summary span { color: #778184; font-size: 9px; }
.ib-summary-rules { display: grid; justify-items: end; gap: 3px; }
.ib-summary-rules span { padding: 2px 5px; border-radius: 4px; background: #fff; border: 1px solid #dfe4e3; font-size: 8px; }
.ib-check { margin: 7px 0; display: flex; align-items: flex-start; gap: 8px; color: #5c6966; font-size: 10px; line-height: 1.4; }
.ib-check input { margin-top: 1px; accent-color: #547427; }
.ib-form-error { min-height: 16px; margin-top: 6px; color: #b03838; font-size: 10px; }
.ib-detail-modal { width: min(510px,96vw); }
.ib-detail-instrument { padding: 11px; display: flex; align-items: center; gap: 10px; background: #f6f8f7; border-radius: 8px; }
.ib-detail-instrument strong { font-size: 11px; }
.ib-detail-instrument span:not(.ib-resource-color) { color: #7e898b; font-size: 9.5px; }
.ib-detail-list { margin: 17px 0 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #e6e9e9; border-radius: 8px; overflow: hidden; }
.ib-detail-list > div { padding: 10px; border-bottom: 1px solid #edf0f0; }
.ib-detail-list > div:nth-child(odd) { border-right: 1px solid #edf0f0; }
.ib-detail-list dt { color: #879194; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.ib-detail-list dd { margin: 4px 0 0; color: #344441; font-size: 10px; }
.dark .instrument-booking-root,.dark .ib-app { background: #151a1a; color: #edf1f0; }
.dark .ib-header,.dark .ib-controls,.dark .ib-calendar,.dark .ib-instrument-card,.dark .ib-stats>div,.dark .ib-booking-row,.dark .ib-panel { background: #1c2222; border-color: #303838; }
.dark .ib-page-title h1,.dark .ib-instrument-card h3,.dark .ib-resource strong,.dark .ib-section-title,.dark .ib-booking-info h3 { color: #edf1f0; }
.dark .ib-search,.dark .ib-filter { background: #171c1c; color: #e8eeee; border-color: #35403e; }
.dark .ib-resource { background: #1c2222; }
.dark .ib-day-cell,.dark .ib-day-head { border-color: #303838; }
@media (max-width: 900px) {
  .ib-header { grid-template-columns: auto 1fr auto; padding: 0 12px; }
  .ib-brand > div:last-child { display: none; }
  .ib-top-nav { overflow-x: auto; justify-content: center; }
  .ib-nav { padding: 0 9px; font-size: 0; }
  .ib-nav-icon { font-size: 16px; }
  .ib-demo-badge,.ib-live-badge { display: none; }
  .ib-main { padding: 20px 14px 32px; }
  .ib-controls { flex-wrap: wrap; }
  .ib-search { flex-basis: 100%; }
  .ib-legend { width: 100%; overflow-x: auto; padding: 4px; }
  .ib-calendar { overflow-x: auto; }
  .ib-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ib-header-actions .ib-btn { width: 36px; padding: 0; font-size: 0; }
  .ib-header-actions .ib-btn span { font-size: 20px; }
  .ib-page-title { align-items: flex-start; flex-direction: column; }
  .ib-form-grid,.ib-stats { grid-template-columns: 1fr; }
  .ib-instrument-grid { grid-template-columns: 1fr; }
  .ib-booking-row { grid-template-columns: 45px 1fr; }
  .ib-booking-row > .ib-btn { grid-column: 1 / -1; }
  .ib-summary-rules { display: none; }
  .ib-booking-summary { grid-template-columns: 5px 1fr; }
}
