/* Shared controls: buttons, text boxes, drop-downs, chips, switches, grids. */

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 4px; cursor: pointer; white-space: nowrap; flex: none; }
.btn.primary { background: var(--gray-700); color: #fff; }
.btn.primary:hover { background: var(--gray-850); }
.btn.primary .ic { color: rgba(255, 255, 255, 0.5); }
.btn.secondary { background: var(--gray-50); border: 1px solid var(--gray-900-01); }
.btn.secondary:hover { background: var(--gray-100); }
.btn.secondary .ic { color: var(--gray-900-05); }
.btn.disabled { opacity: 0.2; cursor: default; pointer-events: none; }
.splitBtn { display: inline-flex; gap: 1px; height: 32px; border-radius: 4px; background: var(--gray-400); flex: none; }
.splitBtn .btn:first-child { border-radius: 4px 0 0 4px; }
.splitBtn .splitCaret { width: 32px; justify-content: center; border-radius: 0 4px 4px 0; padding: 0; }
.splitBtn .splitCaret .ic { color: #fff; }
.iconBtn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-400); border-radius: 4px; cursor: pointer; flex: none; background: transparent; }
.iconBtn:hover { background: var(--gray-100); }
.iconBtn.stale { background: rgb(40, 203, 70); border-color: rgb(32, 175, 63); }

/* Text boxes and drop-downs (newer style) */
.textInput { display: flex; align-items: center; height: 32px; padding: 0 4px; background: #fff; border: 1px solid var(--gray-400); border-radius: 4px; flex: 1; min-width: 0; }
.textInput .tiIcon { padding: 0 4px; display: flex; color: var(--gray-400); }
.textInput input { flex: 1; min-width: 0; height: 30px; padding: 8px 4px; border: 0; outline: 0; background: transparent; }
.textInput input::placeholder { color: var(--gray-400); }
.textInput:focus-within { border-color: var(--gray-700); }
.select { position: relative; display: flex; align-items: center; height: 32px; background: #fff; border: 1px solid var(--gray-400); border-radius: 4px; flex: 1; min-width: 0; cursor: pointer; }
.select .selValue { flex: 1; min-width: 0; padding: 0 8px; display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
.select .selPlaceholder { color: var(--gray-400); }
.select .selArrow { width: 32px; height: 24px; padding: 6px 8px; display: flex; align-items: center; justify-content: center; color: var(--gray-700); flex: none; }
.selChip { display: inline-flex; align-items: center; height: 26px; padding-left: 8px; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: 3px; font-size: 11px; flex: none; }
.selChip .x { width: 28px; height: 24px; padding: 4px 8px; display: flex; align-items: center; justify-content: center; color: var(--gray-700); cursor: pointer; }
.select .selUnit { color: var(--gray-400); margin-left: auto; padding-right: 4px; }

/* Toolbar of the newer panels */
.toolbar2 { display: flex; align-items: center; gap: 8px; height: 49px; padding: 8px; flex: none; background: var(--gray-50); border-bottom: 1px solid var(--line); box-shadow: 0 0 4px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.05); position: relative; z-index: 1; }
.toolbar2 .tbLeft { display: flex; gap: 8px; flex: 1; min-width: 0; }
.toolbar2 .tbRight { display: flex; gap: 8px; flex: none; }
.toolbar2.top { border-bottom: 0; border-top: 1px solid var(--line); }

/* Two- or three-way switch */
.segment { display: inline-flex; gap: 2px; height: 32px; padding: 2px; border-radius: 6px; background: var(--gray-900-01); flex: none; }
.segment .seg { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; }
.segment .seg:hover { background: var(--gray-900-01); }
.segment .seg.selected { background: var(--gray-900); color: #fff; }

/* Chips */
.chip { display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 1337px; font-size: 11px; border: 1px solid; white-space: nowrap; }
.badgeNum { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #fff; }

/* Radio pills */
.radioPill { display: inline-flex; align-items: center; height: 32px; padding: 8px; border-radius: 16px; background: var(--gray-100); cursor: pointer; }
.radioPill .circle { width: 16px; height: 16px; margin-right: 8px; border-radius: 8px; border: 1px solid var(--gray-400); background: #fff; display: flex; align-items: center; justify-content: center; }
.radioPill .circle i { width: 6px; height: 6px; border-radius: 3px; background: #fff; }
.radioPill.checked .circle { background: var(--gray-900); border-color: var(--gray-900); }

/* Grid (the older list style): header 25 px, rows 24 px */
.grid { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }
.gridHeader { display: flex; height: 26px; flex: none; background: var(--gray-50); border-bottom: 1px solid var(--line); overflow: hidden; }
.gridHeader .gh { position: relative; height: 25px; padding: 4px 3px 4px 4px; border-right: 1px solid var(--gray-900-01); white-space: nowrap; overflow: hidden; flex: none; display: flex; gap: 8px; align-items: center; }
.gridHeader .gh.sortable { cursor: pointer; }
.gridHeader .gh.b { font-weight: 600; }
.gridHeader .gh .sortArrow { color: var(--gray-400); display: flex; }
.gridBody { flex: 1; min-height: 0; overflow-y: scroll; overflow-x: hidden; position: relative; }
.gridBody::-webkit-scrollbar { width: 15px; }
.gridBody::-webkit-scrollbar-thumb { background: #7a7a7a; border-radius: 6px; border: 4px solid #fff; }
.gridBody::-webkit-scrollbar-track { background: #fff; }
.gridCanvas { position: relative; }
.gridRow { position: absolute; left: 0; right: 0; display: flex; height: 24px; background: #fff; cursor: default; }
.gridRow:hover { background: var(--gray-50); }
.gridRow.selected .gc { background: var(--gray-100); }
.gridRow .gc { height: 24px; padding: 0 4px; line-height: 24px; border-right: 1px solid var(--gray-900-01); white-space: nowrap; overflow: hidden; flex: none; }
.gridRow .gc > span, .gridRow .gc > input { vertical-align: middle; }
.gridRow .gc .statusIco { display: inline-flex; }
.gridRow .gc.right { text-align: right; }
.gridRow .gc.lined { border-bottom: 1px solid var(--gray-900-01); }
.gridRow .gc.center { text-align: center; }

/* Table (the newer list style): header 25 px, rows 24 px with a line under each */
.tbl { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tblHeader { display: flex; height: 25px; flex: none; padding: 0 15px 0 4px; background: var(--gray-50); border-bottom: 1px solid var(--line); font-weight: 600; }
.tblHeader .th { height: 24px; padding: 4px 4px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tblHeader .th:first-child { border-left: 0; }
.tblBody { flex: 1; min-height: 0; overflow-y: auto; }
.tblRow { display: flex; height: 24px; padding: 0 15px 0 4px; background: #fff; border-bottom: 1px solid var(--gray-900-01); }
.tblRow:hover { background: var(--gray-50); }
.tblRow .td { height: 23px; padding: 0 4px; display: flex; align-items: center; border-right: 1px solid var(--gray-900-01); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tblRow .td:last-child { border-right: 0; }

/* Empty-state box */
.infoBox { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--gray-50); text-align: center; }
.infoBox .ibIcon { color: var(--gray-400); height: 24px; margin-bottom: 16px; }
.infoBox .ibTitle { font-size: 14px; line-height: 24px; font-weight: 600; }
.infoBox .ibSub { margin-top: 4px; color: var(--gray-700); }

/* Date range picker */
.dtp { position: absolute; z-index: 1100; width: 353px; display: flex; background: #fff; border-radius: 4px; box-shadow: var(--shadow-md); padding: 12px 10px 12px 0; }
.dtpQuick { width: 104px; padding: 4px 0 0 18px; flex: none; }
.dtpQuick div { height: 31px; display: flex; align-items: center; cursor: pointer; }
.dtpQuick div:hover { text-decoration: underline; }
.dtpCal { flex: 1; }
.dtpHead { display: flex; align-items: center; gap: 6px; height: 30px; margin-bottom: 8px; }
.dtpHead select { height: 28px; border: 1px solid var(--gray-400); border-radius: 4px; background: #fff; padding: 0 6px; }
.dtpHead .dtpMonth { flex: 1; }
.dtpNav { width: 16px; display: flex; justify-content: center; cursor: pointer; }
.dtpNav:first-child svg { transform: rotate(180deg); }
.dtpGrid { display: grid; grid-template-columns: repeat(7, 32px); justify-content: space-between; }
.dtpGrid span { height: 32px; display: flex; align-items: center; justify-content: center; }
.dtpWeek span { height: 24px; font-size: 10px; font-weight: 600; }
.dtpDay { cursor: pointer; border-radius: 16px; }
.dtpDay:hover { background: var(--gray-100); }
.dtpDay.in { background: var(--gray-100); border-radius: 0; }
.dtpDay.sel { background: var(--gray-700); color: #fff; }
.dtpFT { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.dtpFT .l { font-size: 11px; color: var(--gray-700); }
.dtpRow { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 8px; }
.dtpRow .dt { padding-left: 8px; line-height: 15px; }
.dtpRow .dt i { font-style: normal; color: var(--gray-400); }
.dtpTime { display: flex; align-items: center; gap: 6px; width: 118px; height: 32px; padding: 0 8px; border: 1px solid var(--gray-400); border-radius: 4px; color: var(--gray-700); }
.dtpTime input { width: 60px; border: 0; outline: 0; }
.dtpFoot { display: flex; justify-content: flex-end; }
.dtpFoot .btn { height: 28px; }
