/* Excel-specific styles */
.workspace.excel-ws{background:#fff;padding:0;align-items:stretch;justify-content:flex-start}
.sheet-wrap{overflow:auto;width:100%;height:100%}

table#sheet{border-collapse:collapse;table-layout:fixed;background:#fff;font-family:Calibri,Arial,sans-serif;font-size:13px}
table#sheet th{background:#f0f0f0;border:1px solid #ccc;padding:2px 4px;font-weight:normal;color:#444;text-align:center;position:sticky;top:0;z-index:5;min-width:80px;height:22px;user-select:none}
table#sheet th.corner{position:sticky;left:0;z-index:10;width:40px;min-width:40px;max-width:40px}
table#sheet th.row-num{position:sticky;left:0;z-index:6;width:40px;min-width:40px;max-width:40px;background:#f0f0f0}
table#sheet td{border:1px solid #d4d4d4;padding:2px 6px;min-width:80px;width:80px;height:22px;overflow:hidden;white-space:nowrap;cursor:cell;vertical-align:middle}
table#sheet td.selected{background:#deecf9;outline:2px solid #9f1239;outline-offset:-2px;position:relative;z-index:2}
table#sheet td.range-sel{background:rgba(33,115,70,.12)}
table#sheet td:focus{outline:2px solid #9f1239;outline-offset:-2px;background:#fff;z-index:3}
table#sheet th.col-sel,table#sheet th.row-sel{background:#9f1239;color:#fff}
table#sheet.no-grid td{border-color:transparent}
table#sheet.no-head thead{display:none}
table#sheet.no-head th.row-num{display:none}

/* Formula bar */
.formula-bar{display:flex;align-items:center;background:#fafafa;border-bottom:1px solid #d4d4d4;padding:4px 8px;gap:8px}
.formula-bar .cell-name{min-width:90px;background:#fff;border:1px solid #c7c6c4;padding:4px 8px;border-radius:2px;font-family:Calibri;font-size:13px;text-align:center}
.formula-bar .fx{color:#888;font-style:italic;font-family:'Cambria Math',serif}
.formula-bar input{flex:1;border:1px solid #c7c6c4;padding:4px 8px;font-size:13px;font-family:Calibri,Arial;background:#fff;border-radius:2px}
.formula-bar input:focus{outline:none;border-color:#9f1239}

/* Sheet tabs */
.sheet-tabs{display:flex;background:#f7f7f7;border-top:1px solid #d4d4d4;padding:2px 4px;gap:2px;align-items:center;height:30px;overflow-x:auto}
.sheet-tabs .stab{background:#fff;border:1px solid #d4d4d4;border-bottom:none;padding:4px 14px;cursor:pointer;font-size:12px;color:#444;border-radius:3px 3px 0 0;position:relative;display:flex;align-items:center;gap:6px}
.sheet-tabs .stab.active{background:#9f1239;color:#fff;font-weight:600}
.sheet-tabs .stab .x{opacity:.6;font-size:14px;line-height:1}
.sheet-tabs .stab .x:hover{opacity:1}
.sheet-tabs .add-sheet{background:transparent;border:none;font-size:18px;color:#666;cursor:pointer;padding:0 8px}
.sheet-tabs .add-sheet:hover{color:#9f1239}

/* Advanced features */
.fill-preview{outline:2px dashed #9f1239 !important;outline-offset:-2px}
.fill-handle{box-shadow:0 0 2px rgba(0,0,0,.3)}
.col-resizer:hover,.row-resizer:hover{background:#9f1239 !important;opacity:.5}
.dv-dropdown{font-family:Calibri,Arial}

/* Chart overlay */
.chart-container{position:absolute;background:#fff;border:2px solid #9f1239;border-radius:4px;padding:10px;box-shadow:0 4px 16px rgba(0,0,0,.2);width:400px;height:280px;cursor:move;z-index:50;resize:both;overflow:hidden;min-width:200px;min-height:150px}
.chart-container .chart-close{position:absolute;top:2px;right:6px;cursor:pointer;color:#a44;font-weight:bold;z-index:5}
.chart-container canvas{width:100% !important;height:calc(100% - 6px) !important}
