body {
    font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 20px;
    color: #222;
    background: #f7f8fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(20, 30, 43, 0.06);
    border-radius: 8px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
}

.controls {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

button, input[type="submit"], .btn {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    transition: all .12s ease;
}

button:hover, input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.table th, .table td {
    border-bottom: 1px solid #eef2f6;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    background: transparent;
}

.table th {
    background: #f3f6f9;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
}

.table tr:hover td {
    background: #fbfdff;
}

.img-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: inline-block;
}

.notice {
    padding: 10px 12px;
    border-left: 4px solid #888;
    background: #fff;
    margin-bottom: 12px;
    border-radius: 6px;
}

.small {
    font-size: 0.9em;
    color: #6b7280;
}

.error {
    color: #991b1b;
    font-weight: 600;
    background: #fff5f5;
    padding: 8px;
    border-radius: 6px;
}

.success {
    color: #065f46;
    font-weight: 600;
    background: #ecfdf5;
    padding: 8px;
    border-radius: 6px;
}

.filter {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.field {
    display: block;
    margin-bottom: 10px;
}

.attribute-row, .mapping-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.attribute-row input, .mapping-row input, .mapping-row select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

input[type="text"], textarea, select {
    width: 300px;
    box-sizing: border-box;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.img-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-modal-inner {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-modal-content {
    max-width: 90%;
    max-height: 900px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.6);
    display: block;
    margin: 0 auto;
}

.img-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: #ffffff;
    color: #111827;
    font-size: 20px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.2);
}

.clickable {
    transition: transform .08s ease-in-out;
}

.clickable:hover {
    transform: scale(1.03);
}

@media (max-width:800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .attribute-row, .mapping-row {
        flex-direction: column;
        align-items: stretch;
    }

    .controls {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    input[type="text"], textarea, select {
        width: 100%;
    }
}