*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #f4f4f4;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #2d2d2d;
    color: #fff;
    padding: 12px 24px;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
}

main {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

footer {
    background: #2d2d2d;
    color: #aaa;
    text-align: center;
    padding: 8px 24px;
    font-size: 0.85rem;
}

h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.file-upload-label {
    display: inline-block;
    padding: 8px 20px;
    background: #0078d4;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.file-upload-label:hover {
    background: #005a9e;
}

.file-upload-label input[type="file"] {
    display: none;
}

.btn-save {
    padding: 8px 20px;
    background: #107c10;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #0b5e0b;
}

/* Status */
.status {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.status-ok {
    background: #dff6dd;
    color: #107c10;
    border: 1px solid #107c10;
}

.status-error {
    background: #fde7e9;
    color: #a80000;
    border: 1px solid #a80000;
}

/* Filter */
.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.filter-bar label {
    font-weight: 600;
}

.filter-bar input[type="text"] {
    width: 360px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.filter-bar button {
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.filter-bar button:hover {
    background: #e8e8e8;
}

/* Table */
.table-container {
    overflow: auto;
    max-height: calc(100vh - 320px);
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

th {
    background: #e8e8e8;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #bbb;
    font-weight: 600;
}

td {
    padding: 4px 12px;
    border-bottom: 1px solid #eee;
}

tr:hover td {
    background: #f0f6ff;
}

.col-path {
    width: 50%;
}

.col-type {
    width: 15%;
}

.col-value {
    width: 35%;
}

td.col-value input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    font-family: "Cascadia Code", "Consolas", monospace;
}

td.col-value input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}
