.panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.panel-header {
    margin-bottom: 2rem;
}

.panel-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.panel-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.loading {
    color: #666;
    padding: 2rem;
}

.error {
    color: #c00;
    padding: 1rem;
    background: #fee;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field-group {
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    padding: 0.9rem;
    background: #fafbfc;
}

.field-group + .field-group {
    margin-top: 0.85rem;
}

.field-group-title {
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 0.65rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field label {
    font-size: 0.8rem;
    color: #555;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field input,
.field textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

.field small {
    color: #666;
    font-size: 0.75rem;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: #005b80;
    box-shadow: 0 0 0 2px rgba(0, 91, 128, 0.15);
}

.field textarea {
    min-height: 3rem;
    resize: vertical;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: #005b80;
    color: white;
}

.btn-primary:hover {
    background: #004a6a;
}

.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.table-repeater {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 140px auto;
    gap: 0.5rem;
    align-items: center;
}

.btn-row-add,
.btn-row-remove {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}

.btn-row-remove {
    color: #9a1f1f;
}
