body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f7f7f9;
    margin: 0;
    padding: 0;
    /* overflow: hidden; */
    height: 100vh;
}
#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
header h1 {
    margin: 0;
    font-size: 2rem;
}
button {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    margin: 0.2rem;
    transition: background 0.2s;
}
button:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
}
button:hover:not(:disabled) {
    background: #1565c0;
}
section {
    margin-bottom: 2rem;
}
#data-section {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#data-table-container {
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1rem;
    margin-top: 1rem;
    height: 350px;
    min-height: 150px;
    max-height: 350px;
}
.add-row-btn {
    margin-bottom: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    border: 1px solid #bdbdbd;
    padding: 0.2em 0.5em;
    text-align: left;
    word-break: break-word;
    white-space: pre;
    max-width: 200px;
    height: 2.2em;
    min-height: 2.2em;
    max-height: 2.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fafbfc;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s;
}
table tr {
    height: 2.2em;
    min-height: 2.2em;
    max-height: 2.2em;
}
table td {
    position: relative;
}
table td::-webkit-scrollbar {
    width: 6px;
    background: #eee;
}
table td:focus {
    outline: 2px solid #1976d2;
    background: #e3f2fd;
}
table th {
    background: #f0f0f0;
    font-weight: 600;
}
table td:hover {
    background: #e3f2fd;
}
#logs {
    width: 100%;
    font-family: monospace;
    background: #222;
    color: #b9f6ca;
    border-radius: 4px;
    border: none;
    padding: 1rem;
    resize: none;
}
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.hidden {
    display: none;
}
#env-modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    min-width: 350px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
#env-modal-content label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}
#env-modal-content input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
#env-modal-content .modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}
#status {
    margin-top: 1rem;
    font-size: 1rem;
    color: #1976d2;
}
.data-table-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-start;
}
.modal-cell {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-cell-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    min-width: 350px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    font-size: 1.1rem;
    white-space: pre-wrap;
}
.modal-cell-close {
    margin-top: 1rem;
    display: block;
    margin-left: auto;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
}
.expanded-cell {
    background: #fffbe7 !important;
    z-index: 10;
    max-height: none !important;
    height: auto !important;
    white-space: pre-wrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}