* { box-sizing: border-box; }
body { font-family: sans-serif; margin: 0; display: flex; flex-direction: column; height: 100vh; background: #fff;}
table { border-collapse: collapse; width: 100%; }
table, th, td { border: 1px solid #ccc; }
th, td { padding: 6px 10px; text-align: left; }
th { background: #f5f5f5; }
ul { list-style: none; padding: 0; margin: 0; }
li { padding: 4px 8px; cursor: pointer; }
li:hover { background: #e0e0e0; }
li.active { background: #4a90d9; color: #fff; }

#tab-bar { display: flex; background: #333; padding: 0; flex-shrink: 0; }
#tab-bar .tab { padding: 8px 20px; color: #ccc; cursor: pointer; font-size: 0.9em; border-bottom: 3px solid transparent; user-select: none; }
#tab-bar .tab:hover { color: #fff; background: #444; }
#tab-bar .tab.active { color: #fff; border-bottom-color: #4a90d9; background: #444; }

#main-layout { display: flex; flex: 1; overflow: hidden; }
#sidebar { width: 280px; min-width: 0; background: #fafafa; border-right: 1px solid #ddd; padding: 12px; overflow-y: auto; transition: width 0.15s, padding 0.15s; }
#sidebar.collapsed { width: 0; padding: 0; overflow: hidden; border-right: none; }
#sidebar h2, #sidebar h3 { margin: 8px 0; }
#sidebar h2 { font-size: 1em; }
#sidebar h3 { font-size: 0.85em; color: #666; }
#sidebar-resize-handle { width: 6px; cursor: col-resize; background: #ddd; flex-shrink: 0; position: relative; }
#sidebar-resize-handle:hover, #sidebar-resize-handle.active { background: #4a90d9; }
#sidebar-toggle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: none; background: #bbb; color: #fff; border-radius: 4px; width: 16px; height: 32px; font-size: 10px; cursor: pointer; padding: 0; line-height: 32px; text-align: center; z-index: 5; }
#sidebar-toggle:hover { background: #4a90d9; }

#content { flex: 1; padding: 16px; overflow-y: auto; min-width: 0; transition: padding-right 0.2s; }
#content.modal-active { padding-right: 48%; }
#class-view > h1 { margin-top: 0; }

.method-heading { margin-top: 24px; padding: 8px 12px; background: #f0f0f0; border-radius: 4px; display: flex; align-items: center; gap: 10px; }
.method-heading.method-failed { background: #fef0f0; border-left: 4px solid #e74c3c; }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.85em; font-weight: bold; color: #fff; }
.status-passed { background: #27ae60; }
.status-failed { background: #e74c3c; }
.status-skipped { background: #95a5a6; }

.label-row > td:first-child { font-weight: bold; width: 60px; color: #555; }
.label-detail { color: #666; font-style: italic; }
.label-detail td:first-child { width: 60px; }

.screenshot { display: inline; margin: 0; padding: 0; border: none; }
.screenshot figure { display: inline-block; margin: 2px; border: 1px solid #4a90d9; border-radius: 4px; padding: 4px 12px; cursor: pointer; }
.screenshot img { display: none; }
.screenshot figcaption { font-style: normal; font-size: inherit; text-align: center; }

.sampleData { margin: 8px 0; }
.sampleData span { background: #e8f4fd; display: inline-block; padding: 2px 10px; border-radius: 4px; }
.sampleData table { margin-top: 4px; }

.methodError { margin: 8px 0; padding: 8px; background: #fde8e8; border: 1px solid #e74c3c; border-radius: 4px; }
.error { background: #f39c12; color: #fff; padding: 4px 10px; border-radius: 4px; margin: 4px 0; cursor: pointer; border-left: 4px solid #c0392b; }
.error span { font-weight: bold; }
.extractable-text { display: none; white-space: pre-wrap; font-family: monospace; font-size: 0.85em; line-height: 1.5; }

.setupData { margin: 0; display: inline-block; cursor: pointer; }
.setupData h3 { margin: 0; padding: 2px 10px; font-size: 0.8em; font-weight: normal; background: #e8f4fd; border: 1px solid #c0d8e8; border-radius: 4px; cursor: pointer; }
.setupData h3:hover { background: #d0e8f8; }
.setupData td { white-space: pre-wrap; }

#modal { position: fixed; background: rgba(0,0,0,0.25); width: 50%; height: 100%; margin: 0; left: 50%; top: 0; display: flex; flex-direction: column; z-index: 20; border-left: 3px solid #4a90d9; }
#modal.dormant { display: none; }
.modal-header { background: #888; color: #fff; display: flex; align-items: center; padding: 4px 10px; flex-shrink: 0; gap: 8px; }
.modal-header .title { flex: 1; font-weight: bold; }
.modal-header button { border-radius: 12px; padding: 4px 12px; border: none; cursor: pointer; }
.modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.modal-slot { display: flex; flex-direction: column; overflow: hidden; border-bottom: 2px solid #4a90d9; flex: 1 1 0; min-height: 0; }
.modal-slot.empty { display: none; }
.modal-slot-header { background: #eee; display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; flex-shrink: 0; }
.modal-slot-header span { font-weight: bold; font-size: 0.9em; }
.modal-slot-close { cursor: pointer; border: none; background: none; font-size: 1.1em; color: #888; padding: 0 4px; line-height: 1; }
.modal-slot-close:hover { color: #e74c3c; }
.modal-slot-body { overflow: auto; padding: 8px; background: #fff; flex: 1; min-height: 0; }
.modal-slot-body table { width: auto; }
.modal-slot-body td { white-space: pre-wrap; }

.class-header { position: sticky; top: 0; background: #fff; z-index: 10; padding: 4px 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid #ddd; }
.class-header.class-failed { background: #fef0f0; border-left: 4px solid #e74c3c; border-bottom-color: #e74c3c; }
.class-header .class-name { font-size: 1em; font-weight: bold; }
.class-header .class-package { color: #666; font-size: 0.8em; }
.class-header .home-link { margin: 0; }
.class-header .home-link a { color: #4a90d9; font-size: 0.85em; }
.class-header h2 { margin: 0; font-size: 0.9em; flex-basis: 100%; color: #555; }
.home-link { margin-bottom: 8px; }
.home-link a { color: #4a90d9; }
